Forum: Managing VoltDB

Post: Internal Server Port always binding to the default port

Internal Server Port always binding to the default port
MarcinD
Feb 24, 2014
Hi,

I am running VoltDB enterprise edition version 4.0.1.

I have two clusters running on the same machine and for simplicity those clusters consist of only one node each.
One cluster (let's name it Cluster1) is started with the default set of ports (although passed in as parameter explicitly) and the other one (Cluster2) has different set of ports.

I can successfully start up two clusters only if I start Cluster1 as first and then Cluster2 as a second.
The problem appears when I try to start them in the reverse order. The log file of Cluster1 shows the following error:


FATAL: Failed to bind to /10.0.22.6:3021
java.net.BindException: Address already in use


So the port 3021 is taken even though the Cluster2 was started with option to use the port 3025


2014-02-24 14:30:49 voltdb create bm_spike.jar -d deployment.xml -H 10.0.22.6:3025 --client 21213 --admin 21214 --zookeeper 2185 --replication 5560 --externalinterface 10.0.22.6 --internalinterface 10.0.22.6


When there is only Cluster2 running doing 'netstat -tulpn' reveals the following:


[dub-001784-VM01]Cluster2$ sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 0.0.0.0:21093               0.0.0.0:*                   LISTEN      2805/skype          
tcp        0      0 0.0.0.0:902                 0.0.0.0:*                   LISTEN      1562/ypbind         
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      1348/rpcbind        
tcp        0      0 192.168.122.1:53            0.0.0.0:*                   LISTEN      2072/dnsmasq        
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1779/sshd           
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      1463/cupsd          
tcp        0      0 0.0.0.0:56535               0.0.0.0:*                   LISTEN      1409/rpc.statd      
tcp        0      0 0.0.0.0:5560                0.0.0.0:*                   LISTEN      19038/java          
tcp        0      0 0.0.0.0:5561                0.0.0.0:*                   LISTEN      19038/java          
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1875/master         
tcp        0      0 0.0.0.0:5562                0.0.0.0:*                   LISTEN      19038/java          
tcp        0      0 0.0.0.0:42810               0.0.0.0:*                   LISTEN      -                   
tcp        0      0 :::53318                    :::*                        LISTEN      -                   
tcp        0      0 ::ffff:127.0.0.1:2185       :::*                        LISTEN      19038/java          
tcp        0      0 :::51914                    :::*                        LISTEN      1409/rpc.statd      
tcp        0      0 ::ffff:10.0.22.6:3021       :::*                        LISTEN      19038/java          
tcp        0      0 :::111                      :::*                        LISTEN      1348/rpcbind        
tcp        0      0 ::ffff:10.0.22.6:3025       :::*                        LISTEN      19038/java          
tcp        0      0 :::22                       :::*                        LISTEN      1779/sshd           
tcp        0      0 :::23                       :::*                        LISTEN      1787/xinetd         
tcp        0      0 ::1:631                     :::*                        LISTEN      1463/cupsd      
...
...
...


You can see that internal server port binds to two ports, the one which is explicitly specified as a parameter and also to the default one.
Is this some expected behaviour or we have a bug here?
rmorgenstein
Feb 24, 2014
Hi Marcin,

To get the listener on 3025, you will need to specify --internal=3025

--internal=INTERNALPORT
specify the internal port number used to communicate
between cluster nodes

The -H argument is used to specify a host:port that will coordinate startup.
MarcinD
Feb 25, 2014
Hi,

Thanks for your answer. That solved the problem.