Error on Server start. "Could not bind on 0.0.0.0:30120 - is this address valid and not already in use?" (Ubuntu 18.04 LTS)

I am very new first off to Fivem and fully admit I could be doing things wrong first off… I host many other game server and projects but this one has me very stumped…

Here is the deal I have tried in server.cfg to change the 0.0.0.0 to the actual servers adress internally on the network of 10.10.10.131 we are a nat forward from one of our many outside ip’s etc… The server sees the correct outside ip and the ports have been forward to the server… The default port 30120 is not in use as far as we can tell on the box however no matter what port we put in the config file it does not accept it… I believe i have the latest version of the software. Just started working on this project 3 days ago and have had some help from another user but the person was more into Windows hosting rather then linux so that made things a bit more difficult but feel i have sorted out the differences between the windows stuff and the linux stuff…

Server System Specs: Intel® Core™ i7-2600 CPU @ 3.40GHz 32 Gigs of ram
Running: Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-47-generic x86_64)

Here is the start up logs. Server Startup Logs

Here is a sample of my current server.cfg

Please take it easy on me I am new to the community as far as understand your coding and the way you guys are doing things.

Here is a netstat

root@gaming-server:/etc/systemd/system# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 10.10.10.131:27015      0.0.0.0:*               LISTEN      5449/./srcds_linux
tcp        0      0 10.10.10.131:27016      0.0.0.0:*               LISTEN      5537/./srcds_linux
tcp        0      0 10.10.10.131:27017      0.0.0.0:*               LISTEN      5626/./srcds_linux
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      1171/mysqld
tcp        0      0 10.10.10.131:27019      0.0.0.0:*               LISTEN      6899/./srcds_linux
tcp        0      0 127.0.0.1:11211         0.0.0.0:*               LISTEN      1067/memcached
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      6533/apache2
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      4881/AMP_Linux_x86_
tcp        0      0 0.0.0.0:8083            0.0.0.0:*               LISTEN      4894/AMP_Linux_x86_
tcp        0      0 0.0.0.0:8084            0.0.0.0:*               LISTEN      4943/AMP_Linux_x86_
tcp        0      0 0.0.0.0:8085            0.0.0.0:*               LISTEN      4913/AMP_Linux_x86_
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      738/systemd-resolve
tcp        0      0 0.0.0.0:8086            0.0.0.0:*               LISTEN      4977/AMP_Linux_x86_
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1109/sshd
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      21741/cupsd
tcp        0      0 0.0.0.0:8087            0.0.0.0:*               LISTEN      5131/AMP_Linux_x86_
tcp        0      0 0.0.0.0:8088            0.0.0.0:*               LISTEN      5008/AMP_Linux_x86_
tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN      26514/sshd: loren@p
tcp        0      0 0.0.0.0:8090            0.0.0.0:*               LISTEN      5052/AMP_Linux_x86_
tcp        0      0 127.0.0.1:6011          0.0.0.0:*               LISTEN      11335/sshd: loren@p
tcp        0      0 0.0.0.0:8091            0.0.0.0:*               LISTEN      5028/AMP_Linux_x86_
tcp        0      0 0.0.0.0:8092            0.0.0.0:*               LISTEN      5104/AMP_Linux_x86_
tcp        0      0 0.0.0.0:8094            0.0.0.0:*               LISTEN      5081/AMP_Linux_x86_
tcp        0      0 10.10.10.131:25567      0.0.0.0:*               LISTEN      5839/java
tcp        0      0 0.0.0.0:25569           0.0.0.0:*               LISTEN      22509/java
tcp        0      0 0.0.0.0:25571           0.0.0.0:*               LISTEN      5322/java
tcp        0      0 127.0.0.1:2628          0.0.0.0:*               LISTEN      1032/dictd 1.12.1:
udp        0      0 0.0.0.0:52831           0.0.0.0:*                           902/avahi-daemon: r
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           902/avahi-daemon: r
udp        0      0 10.10.10.131:56195      0.0.0.0:*                           5008/AMP_Linux_x86_
udp        0      0 0.0.0.0:25569           0.0.0.0:*                           22509/java
udp        0      0 10.10.10.131:25592      0.0.0.0:*                           5839/java
udp        0      0 10.10.10.131:27005      0.0.0.0:*                           6899/./srcds_linux
udp        0      0 10.10.10.131:27006      0.0.0.0:*                           5449/./srcds_linux
udp        0      0 10.10.10.131:27007      0.0.0.0:*                           5537/./srcds_linux
udp        0      0 10.10.10.131:27008      0.0.0.0:*                           5626/./srcds_linux
udp        0      0 10.10.10.131:27015      0.0.0.0:*                           5449/./srcds_linux
udp        0      0 10.10.10.131:27016      0.0.0.0:*                           5537/./srcds_linux
udp        0      0 10.10.10.131:27017      0.0.0.0:*                           5626/./srcds_linux
udp        0      0 10.10.10.131:27019      0.0.0.0:*                           6899/./srcds_linux
udp        0      0 10.10.10.131:27020      0.0.0.0:*                           6899/./srcds_linux
udp        0      0 10.10.10.131:27021      0.0.0.0:*                           5449/./srcds_linux
udp        0      0 10.10.10.131:27022      0.0.0.0:*                           5537/./srcds_linux
udp        0      0 10.10.10.131:27023      0.0.0.0:*                           5626/./srcds_linux
udp        0      0 10.10.10.131:43481      0.0.0.0:*                           5131/AMP_Linux_x86_
udp        0      0 10.10.10.131:45769      0.0.0.0:*                           4977/AMP_Linux_x86_
udp        0      0 10.10.10.131:45832      0.0.0.0:*                           5081/AMP_Linux_x86_
udp        0      0 127.0.0.53:53           0.0.0.0:*                           738/systemd-resolve
udp        0      0 0.0.0.0:631             0.0.0.0:*                           21742/cups-browsed
root@gaming-server:/etc/systemd/system#

Lastly here is a screen shot of the nat forward to this game server.

Also ufw firewall ports that are opened up.

root@gaming-server:/etc/systemd/system# ufw status
Status: active

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere
27015                      ALLOW       Anywhere
27016                      ALLOW       Anywhere
27020                      ALLOW       Anywhere
27021                      ALLOW       Anywhere
8080                       ALLOW       Anywhere
8081                       ALLOW       Anywhere
8082                       ALLOW       Anywhere
8083                       ALLOW       Anywhere
8084                       ALLOW       Anywhere
8085                       ALLOW       Anywhere
8086                       ALLOW       Anywhere
8087                       ALLOW       Anywhere
8088                       ALLOW       Anywhere
8089                       ALLOW       Anywhere
8090                       ALLOW       Anywhere
Anywhere                   ALLOW       10.10.10.0/24
Anywhere                   ALLOW       192.168.9.0/24
Anywhere                   DENY        10.10.11.0/24
3306                       ALLOW       Anywhere
Anywhere                   ALLOW       10.10.10.10
Anywhere                   ALLOW       192.168.9.143
80                         ALLOW       Anywhere
81                         ALLOW       Anywhere
3307                       ALLOW       Anywhere
27017                      ALLOW       Anywhere
27022                      ALLOW       Anywhere
Anywhere                   ALLOW       10.10.10.131
Anywhere                   ALLOW       10.10.10.11
Anywhere                   ALLOW       127.0.0.0/8
Anywhere on lo             ALLOW       Anywhere
25592                      ALLOW       Anywhere
Anywhere                   ALLOW       10.10.10.132
Anywhere                   ALLOW       10.10.10.130
22                         ALLOW       Anywhere
222                        ALLOW       Anywhere
8192                       ALLOW       Anywhere
8123                       ALLOW       Anywhere
8091                       ALLOW       Anywhere
8092                       ALLOW       Anywhere
8093                       ALLOW       Anywhere
8094                       ALLOW       Anywhere
27018                      ALLOW       Anywhere
27019                      ALLOW       Anywhere
27023                      ALLOW       Anywhere
27024                      ALLOW       Anywhere
27025                      ALLOW       Anywhere
30120                      ALLOW       Anywhere

Anywhere                   ALLOW OUT   Anywhere on lo

root@gaming-server:/etc/systemd/system#

Also here is the systems network interfaces that are current.

root@gaming-server:/etc/systemd/system# ifconfig
enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.10.10.131  netmask 255.255.255.128  broadcast 10.10.10.255
        ether 00:08:54:6e:71:fb  txqueuelen 1000  (Ethernet)
        RX packets 836141  bytes 180827035 (180.8 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 846817  bytes 216304864 (216.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp7s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 54:04:a6:94:f2:bb  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 22248  bytes 2682060 (2.6 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 22248  bytes 2682060 (2.6 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@gaming-server:/etc/systemd/system#

It’s usually due to a zombie fivem process(using CTRL+z instead of CTRL+c to shut down, for instance). Use the command fg to bring that process to the foreground and it should kill it properly. After that, you should be able to start the server without issue.

3 Likes

Thanks for the thought but i don’t think that’s the issue…

loren@gaming-server:~$ fg
-bash: fg: current: no such job
loren@gaming-server:~$ sudo su
[sudo] password for loren:
root@gaming-server:/home/loren# fg
bash: fg: current: no such job
root@gaming-server:/home/loren# su fivem
fivem@gaming-server:/home/loren$ fg
bash: fg: current: no such job
fivem@gaming-server:/home/loren$

Out of curiosity, what do you get if you enter

ps aux | grep Z 

Here is what i get.


root@gaming-server:/home/loren# ps aux | grep Z
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root     18821  0.0  0.0  21536  1052 pts/0    S+   10:52   0:00 grep --color=auto Z
root@gaming-server:/home/loren#

Here is under the fivem user

fivem@gaming-server:~$ ps aux | grep Z

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
fivem    18982  0.0  0.0  21536  1080 pts/0    S+   10:53   0:00 grep Z
fivem@gaming-server:~$

And the port tests as open? https://www.yougetsignal.com/tools/open-ports/

1 Like

Let’s kinda ignore the fact that you can’t see it from the outside and get back to the real issue which is why can’t the fivem server bind to port 30120 udp/tcp on a machine where the port is not in use… As shown above…

Ok so I decided to screen shot everything to prove that the ports are forwarded and that even though this error is occuring that the server is listening to the port for what ever reason…

I am still feeling that this is a development issue with the fivem server side of the linux repo…

This is also with the error…
Could not bind on 0.0.0.0:30120 - is this address valid and not already in use?

So I decided to do some testing tonight rebooting the main server and restarting the server… The first time I start the script i get this error in relation to our topic.

Could not bind on 10.10.10.131:30120 - is this address valid and not already in use?

The second time I get this error… Both times the port opens up when ever the software is started…

Listening on socket failed - libuv error address already in use.
net-tcp-server failed to create server: couldn't listenCould not bind MultiplexTcpServer to 10.10.10.131:30120.
Could not bind on 10.10.10.131:30120 - is this address valid and not already in use?

I am starting to think that maybe i need to fake the outside ip onto the port if this is so this will make it difficult for the 192.168.9.* addresses to connect to the server because we can’t send server back outside our network and then back in… Its routing thing… Typically what has solved this issue with other server side software is that we bind the address to its networked address internally then port nat forward the ip and port we wish to to the server we require…

Tried binding to the outside ip used vpn access back into the network from my data center in Atlanta. Over all not a good idea needs to be bound to the internal ip port or 0.0.0.0 from what i have tested so far…

I have stopped the server which closes the port if your doing port forwarding testings… Here is my last start log…

https://pastebin.com/MKR4uj7B

Any other thoughts?? Anyone??

1 Like

Another post was created that is similar to mine here it is for reference for those of you that are having this issue…

1 Like

that did not work

Sorry to hear it.

has any one gotten back to you because im having the same problem

Hello guys, I had this issues because I disabled the ipv6.

I cant get the figure out how to use the comman when i type it it does nothing but show im in the cfx.re server

What do you mean by this? How did you disable it and how can you re-enable it?

Have you fixed it?

Worked for me, Thanks for your help!

???
how