CJ Harmath
CJ Harmath

Reputation: 1090

Service fabric and IPv4

After running DevClusterSetup.ps1, fabric gateway by default listens on IpV6 only even if the host doesn't even have an ipv6 IP address. Since in my lap we only have ipv4 I wonder how to bind it to ipv4 ?

PS C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup> netstat -ano | select-string 19000

  TCP    127.0.0.1:2880         127.0.0.1:19000        ESTABLISHED     7848
  TCP    127.0.0.1:19000        0.0.0.0:0              LISTENING       5764
  TCP    127.0.0.1:19000        127.0.0.1:2880         ESTABLISHED     5764
  TCP    [::1]:19000            [::]:0                 LISTENING       5764


PS C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup> get-process -id 5764

Handles  NPM(K)    PM(K)      WS(K) VM(M)   CPU(s)     Id ProcessName
-------  ------    -----      ----- -----   ------     -- -----------
    155      61     5436      13056    52     0.09   5764 FabricGateway


PS C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup> telnet 192.168.88.153 19000
Connecting To 192.168.88.153...Could not open connection to the host, on port 19000: Connect failed

As you can see FabricGateway is the one listening on port 19000 but I can't telnet to it with the IPv4 address.

When you have an IPv4 only environment somewhere, this is going to cause an interesting issue.

How can we configure this ?

Upvotes: 3

Views: 1331

Answers (1)

King Kong
King Kong

Reputation: 108

For security reasons, a DEV cluster by default listens on loopback addresses, 127.0.0.0:19000 for IPv4 and [::1]:19000 for IPv6, to disallow connections from outside the machine. telnet 192.168.88.153 19000 does not work as it tries to connect to non-loopback address 192.168.88.153 of your machine, there is no listener on 192.168.88.153:19000 by default. This is not about IPv4 vs IPv6. If you want to connect with 192.168.88.153, you will need to replace localhost with either 192.168.88.153 or FQDN of your machine in your cluster manifest file. Be aware that this makes your endpoint visible from outside your machine.

  <NodeList>
    <Node NodeTypeRef="NodeType01" IsSeedNode="true" IPAddressOrFQDN="localhost" NodeName="Node1" FaultDomain="fd:/RACK1" UpgradeDomain="MYUD1" />

Upvotes: 5

Related Questions