0

I am trying to use multiple ip addresses and run the same port. This is for multicraft and dedicated ip addresses.

I have the network interfaces setup as:

ifcfg-eno1
ifcfg-eno1:0 
ifcfg-eno1:1
ifcfg-eno1:2
ifcfg-eno1:3

and just changed the ip addresses to 192.xxx.xxx.147,148,149,150.

When I ping it does return to the server but when I try to use multicraft it has failed to bind to the port.

Here is the interfaces (just ip changed per one)

DEVICE="eno1"
ONBOOT=yes
NETBOOT=yes
UUID="14081356-1da3-49ca-a25d-3ed9fe2fcd32"
IPV6INIT=yes
BOOTPROTO=none
TYPE=Ethernet
DNS1=127.0.0.1
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPADDR=192.xxx.xxx.146
PREFIX=29
GATEWAY=192.xxx.xxx.145
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes

The error:

WARN **** FAILED TO BIND TO PORT!
13.03 01:41:25 [Server] WARN The exception was: java.net.BindException: Address already in use
13.03 01:41:25 [Server] WARN Perhaps a server is already running on that port?

Netstat output:

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:21              0.0.0.0:*               LISTEN      11397/multicraft    
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      24745/named         
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      24771/sshd          
tcp        0      0 0.0.0.0:25465           0.0.0.0:*               LISTEN      11397/multicraft    
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      24745/named         
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1841/master         
tcp        0      0 0.0.0.0:25565           0.0.0.0:*               LISTEN      7912/java           
tcp6       0      0 :::3306                 :::*                    LISTEN      22341/mysqld        
tcp6       0      0 :::80                   :::*                    LISTEN      1555/httpd          
tcp6       0      0 ::1:53                  :::*                    LISTEN      24745/named         
tcp6       0      0 :::8118                 :::*                    LISTEN      19667/java          
tcp6       0      0 :::22                   :::*                    LISTEN      24771/sshd          
tcp6       0      0 ::1:953                 :::*                    LISTEN      24745/named         
tcp6       0      0 ::1:25                  :::*                    LISTEN      1841/master         
tcp6       0      0 :::443                  :::*                    LISTEN      1555/httpd          
tcp6       0      0 192.xxx.xxx.146:25567   :::*                    LISTEN      22781/java          
tcp6       0      0 192.xxx.xxx.146:8192    :::*                    LISTEN      19667/java          
tcp6       0      0 192.xxx.xxx.146:25568   :::*                    LISTEN      19667/java          
tcp6       0      0 192.xxx.xxx.146:8193    :::*                    LISTEN      15346/java          
tcp6       0      0 192.xxx.xxx.146:25569   :::*                    LISTEN      11462/java          
tcp6       0      0 192.xxx.xxx.146:25570   :::*                    LISTEN      15346/java          
tcp6       0      0 192.xxx.xxx.147:25571   :::*                    LISTEN      20296/java          
tcp6       0      0 :::25575                :::*                    LISTEN      7912/java           
udp        0      0 127.0.0.1:53            0.0.0.0:*                           24745/named         
udp        0      0 0.0.0.0:25565           0.0.0.0:*                           7912/java           
udp6       0      0 ::1:53                  :::*                                24745/named         
udp6       0      0 192.xxx.xxx.146:25568   :::*                                19667/java          
raw6       0      0 :::58                   :::*                    7           673/NetworkManager  
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   PID/Program name     Path
unix  2      [ ACC ]     STREAM     LISTENING     8458     1/systemd            /run/systemd/journal/stdout
unix  2      [ ACC ]     STREAM     LISTENING     9741     1/systemd            /run/lvm/lvmetad.socket
unix  2      [ ACC ]     STREAM     LISTENING     9761     1/systemd            /run/lvm/lvmpolld.socket
unix  2      [ ACC ]     STREAM     LISTENING     12606    1/systemd            /var/run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     15793    1841/master          public/pickup
unix  2      [ ACC ]     STREAM     LISTENING     15797    1841/master          public/cleanup
unix  2      [ ACC ]     STREAM     LISTENING     15800    1841/master          public/qmgr
unix  2      [ ACC ]     STREAM     LISTENING     15804    1841/master          private/tlsmgr
unix  2      [ ACC ]     STREAM     LISTENING     15807    1841/master          private/rewrite
unix  2      [ ACC ]     STREAM     LISTENING     15810    1841/master          private/bounce
unix  2      [ ACC ]     STREAM     LISTENING     15813    1841/master          private/defer
unix  2      [ ACC ]     STREAM     LISTENING     15816    1841/master          private/trace
unix  2      [ ACC ]     STREAM     LISTENING     80989    1/systemd            /run/systemd/private
unix  2      [ ACC ]     STREAM     LISTENING     15819    1841/master          private/verify
unix  2      [ ACC ]     STREAM     LISTENING     15822    1841/master          public/flush
unix  2      [ ACC ]     STREAM     LISTENING     15825    1841/master          private/proxymap
unix  2      [ ACC ]     STREAM     LISTENING     15828    1841/master          private/proxywrite
unix  2      [ ACC ]     STREAM     LISTENING     15831    1841/master          private/smtp
unix  2      [ ACC ]     STREAM     LISTENING     15834    1841/master          private/relay
unix  2      [ ACC ]     STREAM     LISTENING     15837    1841/master          public/showq
unix  2      [ ACC ]     STREAM     LISTENING     15840    1841/master          private/error
unix  2      [ ACC ]     STREAM     LISTENING     15843    1841/master          private/retry
unix  2      [ ACC ]     STREAM     LISTENING     15846    1841/master          private/discard
unix  2      [ ACC ]     STREAM     LISTENING     15849    1841/master          private/local
unix  2      [ ACC ]     STREAM     LISTENING     15852    1841/master          private/virtual
unix  2      [ ACC ]     STREAM     LISTENING     15855    1841/master          private/lmtp
unix  2      [ ACC ]     STREAM     LISTENING     15858    1841/master          private/anvil
unix  2      [ ACC ]     STREAM     LISTENING     15861    1841/master          private/scache
unix  2      [ ACC ]     STREAM     LISTENING     67741    22341/mysqld         /var/lib/mysql/mysql.sock
unix  2      [ ACC ]     SEQPACKET  LISTENING     78068    1/systemd            /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING     14841    673/NetworkManager   /var/run/NetworkManager/private

ifconfig:

eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.xxx.xxx.146  netmask 255.255.255.248  broadcast 192.xxx.xxx.151
    inet6 fe80::7254:d2ff:feab:bebf  prefixlen 64  scopeid 0x20<link>
    ether 70:54:d2:ab:be:bf  txqueuelen 1000  (Ethernet)
    RX packets 177249286  bytes 48701330667 (45.3 GiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 282601048  bytes 51923351153 (48.3 GiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    device interrupt 20  memory 0xf7f00000-f7f20000  

eno1:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.xxx.xxx.147  netmask 255.255.255.248  broadcast 192.xxx.xxx.151
        ether 70:54:d2:ab:be:bf  txqueuelen 1000  (Ethernet)
        device interrupt 20  memory 0xf7f00000-f7f20000  

eno1:1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.xxx.xxx.148  netmask 255.255.255.248  broadcast 192.xxx.xxx.151
        ether 70:54:d2:ab:be:bf  txqueuelen 1000  (Ethernet)
        device interrupt 20  memory 0xf7f00000-f7f20000  

eno1:2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.xxx.xxx.149  netmask 255.255.255.248  broadcast 192.xxx.xxx.151
        ether 70:54:d2:ab:be:bf  txqueuelen 1000  (Ethernet)
        device interrupt 20  memory 0xf7f00000-f7f20000  

eno1:3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.xxx.xxx.150  netmask 255.255.255.248  broadcast 192.xxx.xxx.151
        ether 70:54:d2:ab:be:bf  txqueuelen 1000  (Ethernet)
        device interrupt 20  memory 0xf7f00000-f7f20000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 1815319739  bytes 455426211814 (424.1 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1815319739  bytes 455426211814 (424.1 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Multicraft Conf: http://pastebin.com/q006LR24

  • Can you give us some info about the bind failures? Also maybe some netstat output. – Stephen Rauch Mar 13 '17 at 1:59
  • edited the post – Tom Grozev Mar 13 '17 at 3:05
  • OK, so that is a start. Someone else is using the port. Now we need the netstat output to see who is using the port. something like maybe sudo netstat -lnp – Stephen Rauch Mar 13 '17 at 3:13
  • added the output – Tom Grozev Mar 13 '17 at 3:18
  • 1
    All right, now since I know nothing about multicraft, what were you expecting from the failed port bind? From netstat you can see that the pid 11397 instance of multicraft owns port 21 and 25465 for all addresses. Is this not what you wanted? – Stephen Rauch Mar 13 '17 at 3:23
0

The allow multiple instances of multicraft on the same machine, all using the same port, you will need to set a specific address to use for each instance. If the instance is configured to use 0.0.0.0 it will bind to all interfaces, and any other instances will fail to bind.

Example of One instance, one address:

## The daemon will listen on the following IP/port.
## 0.0.0.0 to listen on all available interfaces (all IPs). Note that
## you will have to use the "externalIp" setting below if you set this
## to 0.0.0.0 as the control panel needs to know where to connect.
ip = 192.xxx.xxx.147
port = 25465

Note that you will need to change the 192.xxx.xxx.147 to a real address.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.