FiveM FX Server won't respond to queries

GTA V version? Latest
Up to date? Yes
Legit or Pirate copy? Legit
Steam/CD/Social Club? Steam
Windows version? 10 Pro x64
Did you try to disable/uninstall your Anti-virus? Linux
Did you try to delete caches.xml and try again? Doesn’t apply, fresh server
Error screenshot No error, just isn’t responding to queries
GTA V folder screenshot Not a client issue
GTA V/update/x64/dlcpacks screenshot Not a client issue
Filepath to FiveM folder Not a client issue
FiveM client folder screenshot Not a client issue
System specifications AMD - FX-8370E, 32GB DDR3
CitizenFX.log file Not a client issue
.dmp files/crash IDs Not a client issue/No Error


All of this is after following the article here:

So I got everything configured and the log looks good (I think) after startup:

#/fx-server/run.sh +exec server.cfg
Initializing Mono
Initializing Mono completed
Hello!
Failed to get instance for guid a7242855-0350-4cb5-a0fe-61021e7eafaa and iid 567634c6-3bdd-4d0e-af39-7472aed479b7: System.InvalidOperationException: Sequence contains no matching element
  at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x00011] in <fb8f7831037a4d3481e7bbe63117e3d0>:0
  at CitizenFX.Core.RuntimeManager.CreateObjectInstance (System.Guid guid, System.Guid iid) [0x00014] in /src/code/client/clrcore/RuntimeManager.cs:39
Found new resource fivem-awesome1501 in /servers/gtarp/fx-server-data/resources//fivem-awesome1501
Found new resource ragdoll in /servers/gtarp/fx-server-data/resources//ragdoll
Found new resource fivem-map-skater in /servers/gtarp/fx-server-data/resources//fivem-map-skater
Found new resource fivem in /servers/gtarp/fx-server-data/resources//fivem
Found new resource fivem-map-hipster in /servers/gtarp/fx-server-data/resources//fivem-map-hipster
Found new resource obituary in /servers/gtarp/fx-server-data/resources//[gameplay]/obituary
Found new resource channelfeed in /servers/gtarp/fx-server-data/resources//[gameplay]/channelfeed
Found new resource obituary-deaths in /servers/gtarp/fx-server-data/resources//[gameplay]/obituary-deaths
Found new resource irc in /servers/gtarp/fx-server-data/resources//[gameplay]/irc
Found new resource mapmanager in /servers/gtarp/fx-server-data/resources//[managers]/mapmanager
Found new resource scoreboard in /servers/gtarp/fx-server-data/resources//[system]/scoreboard
Found new resource chat in /servers/gtarp/fx-server-data/resources//[system]/chat
Found new resource baseevents in /servers/gtarp/fx-server-data/resources//[system]/baseevents
Found new resource sessionmanager in /servers/gtarp/fx-server-data/resources//[system]/sessionmanager
Found new resource ■■■■■■■ in /servers/gtarp/fx-server-data/resources//[system]/■■■■■■■
Found new resource spawnmanager in /servers/gtarp/fx-server-data/resources//[system]/spawnmanager
Found new resource hardcap in /servers/gtarp/fx-server-data/resources//[system]/hardcap
Found new resource keks in /servers/gtarp/fx-server-data/resources//[test]/keks
Found new resource gameInit in /servers/gtarp/fx-server-data/resources//[test]/gameInit
Found new resource betaguns in /servers/gtarp/fx-server-data/resources//[test]/betaguns
Found new resource race-test in /servers/gtarp/fx-server-data/resources//[gamemodes]/race-test
Found new resource race in /servers/gtarp/fx-server-data/resources//[gamemodes]/race
Started resource sessionmanager
Started resource mapmanager
Started resource chat
Started resource spawnmanager
Started resource fivem
Started gametype Freeroam
Started resource hardcap
Started resource ■■■■■■■
Started resource ragdoll
Resolved live-internal.fivem.net:30110 to 151.80.44.223:30110
Sending heartbeat to live-internal.fivem.net:30110
Started resource fivem-map-hipster
Started map fivem-map-hipster

The ports are forwarded (not that it matters, because) I cannot connect, even over LAN, using the local IP of the server…

Imgur

So what the hell could be the problem? I ran an lsof and everything seems to be listening, and the port is open on the firewall. I have plenty of other servers running just fine from this hardware and network setup.

#lsof -i -P -n | grep FXServer
FXServer  23116     root   11u  IPv4 8371930      0t0  TCP *:30120 (LISTEN)
FXServer  23116     root   12u  IPv6 8371931      0t0  UDP *:30120

Firewall:

#ufw status
Status: active

To                         Action      From
--                         ------      ----
30120                      ALLOW       Anywhere
30120 (v6)                 ALLOW       Anywhere (v6)

This isn’t a VPS, it’s a personal server. It’s on my private, local network. My gaming rig is connected to the same network. I can’t access it even from my gaming rig on the same subnet. All other services work fine, from other game servers, to discord bots, and more. So let’s break it down:

  • The server is outside of the network firewall, fully exposed to the internet, protected only by it’s own firewall. It’s called De-Militarized Zone (DMZ) and so it does not require port forwarding. (All other services hosted work fine, and there’s quite a few of them, none of which are port forwarded)
  • I showed you the log, you said it looks right.
  • I showed you the port is open to any traffic from any interface (port 30120) from the firewall
  • I showed you the lsof that proves the service is listening on the correct port on any interface (*:30120)
  • I also cannot cURL the info.json, from the server, using curl 127.0.0.1:30120/info.json

Here is my server config with some info redacted:

# you probably don't want to change these!
# only change them if you're using a server with multiple network interfaces
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"

start mapmanager
start chat
start spawnmanager
start fivem
start hardcap
start ■■■■■■■

sv_scriptHookAllowed 1

# change this
rcon_password redacted

sv_hostname "Redacted"

# nested configs!
#exec server_internal.cfg

# loading a server icon (96x96 PNG file)
load_server_icon redacted.png

# convars for use from script
set temp_convar "hey world!"

# disable announcing? clear out the master by uncommenting this
#sv_master1 ""

# want to only allow players authenticated with a third-party provider like Steam?
sv_authMaxVariance 1
sv_authMinTrust 5

# add system admins
add_ace group.admin command allow # allow all commands
add_ace group.admin command.quit deny # but don't allow quit
add_principal identifier.steam:0000000000000000 group.admin # add the admin to the group

# player endpoint protection
sv_endpointprivacy true

I’d rather not show what ports are exposed on my server, but know this. I’m extremely competent when it comes to networking, and I can assure you there are no DROP or REJECT prior to these rules in the chains that would be overriding them.

pkts bytes target     prot opt in     out     source               destination
707 41244 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:30120
263 11517 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:30120

Just to prove it’s not a firewall issue, I removed all protection and tried it using the default server.cfg from OP and everything loaded up fine, but same issue. (Yes, I know, I’m a madman)

# ufw disable && iptables -F && iptables -Z
Firewall stopped and disabled on system startup

# iptables -nvL
Chain INPUT (policy ACCEPT 399 packets, 52159 bytes)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain OUTPUT (policy ACCEPT 332 packets, 32497 bytes)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain ufw-after-forward (0 references)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain ufw-after-input (0 references)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain ufw-after-logging-forward (0 references)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain ufw-after-logging-input (0 references)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain ufw-after-logging-output (0 references)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain ufw-after-output (0 references)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain ufw-before-forward (0 references)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain ufw-before-input (0 references)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain ufw-before-logging-forward (0 references)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain ufw-before-logging-input (0 references)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain ufw-before-logging-output (0 references)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain ufw-before-output (0 references)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain ufw-reject-forward (0 references)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain ufw-reject-input (0 references)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain ufw-reject-output (0 references)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain ufw-track-forward (0 references)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain ufw-track-input (0 references)
 pkts bytes target     prot opt in     out     source               destination                                                                                                  

Chain ufw-track-output (0 references)
 pkts bytes target     prot opt in     out     source               destination

Same problem.
You cannot expose a server any more than this configuration. Default ACCEPT, no rules, and DMZ’d. Still nothing.

I don’t know why it doesn’t work. I’m getting re-transmissions when I shark the packets on my server while trying to query with FiveM…

1 0.000000000 151.80.44.223 → 192.168.1.2  UDP 74 30110 → 30120 Len=32
2 0.000629147 151.80.44.223 → 192.168.1.2  TCP 74 35880 → 30120 [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=1427502982 TSecr=0 WS=128
3 0.046607019  192.168.1.2 → 151.80.44.223 UDP 254 30120 → 30110 Len=212
4 0.997995828 151.80.44.223 → 192.168.1.2  TCP 74 [TCP Retransmission] 35880 → 30120 [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=1427503232 TSecr=0 WS=128
5 3.004786271 151.80.44.223 → 192.168.1.2  TCP 74 [TCP Retransmission] 35880 → 30120 [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=1427503733 TSecr=0 WS=128
6 19.687560225  192.168.1.4 → 192.168.1.2  UDP 60 49720 → 30120 Len=15
7 19.709553843  192.168.1.2 → 192.168.1.4  UDP 249 30120 → 49720 Len=207
8 19.758612860  192.168.1.4 → 192.168.1.2  TCP 66 49349 → 30120 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 WS=256 SACK_PERM=1
9 22.759189032  192.168.1.4 → 192.168.1.2  TCP 66 [TCP Retransmission] 49349 → 30120 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 WS=256 SACK_PERM=1
10 28.759220409  192.168.1.4 → 192.168.1.2  TCP 66 [TCP Retransmission] 49349 → 30120 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 WS=256 SACK_PERM=1
11 35.461702999 88.198.50.201 → 192.168.1.2  UDP 60 55006 → 30120 Len=16
12 35.466609905  192.168.1.2 → 88.198.50.201 UDP 250 30120 → 55006 Len=208

We already know that:

Resolved live-internal.fivem.net:30110 to 151.80.44.223:30110

So it’s getting re-transmits consistently, even with the heartbeat server.

2 0.000629147 151.80.44.223 → 192.168.1.2  TCP 74 35880 → 30120 [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=1427502982 TSecr=0 WS=128
3 0.046607019  192.168.1.2 → 151.80.44.223 UDP 254 30120 → 30110 Len=212

^ pcap showing listening and replying to the heartbeat server ^

tcp        0      0 0.0.0.0:30120           0.0.0.0:*               LISTEN
udp6       0      0 0.0.0.0:30120           :::*```

Keep in mind these results were WITH ufw enabled, back up and running again. So it's not network issues. The traffic is making it there, but still no dice with server responding to queries on LAN or through the internet.

I did follow the wiki.

I host several other servers that work fine. I have 15 years of experience doing this. The log shows that the server is running fine. lsof shows the server is listening on the correct ports. The root user is running the server process, so it's not a permissions issue. I cert-sync'd as requested in step 3 with no issues. I completely disabled the firewall and fully exposed my server and STILL cannot get a query from fx on fivem. I even tried a bone stock server.cfg with nothing but the rcon password changed to something else simple only to protect it. Go back and look at my previous replies, I have covered every inch of what could be happening on my end.

I don't know what else to do at this point. The server isn't replying to queries.
4 Likes

I hope you can get a response from an element regarding this issue. Sorry I wasn’t able to help more.

Dude, you wrote a badass fucking tutorial on how to get it setup to begin with. Such a well written tutorial, in fact, that someone like me, who had zero experience with FiveM server management felt immediately comfortable diving in and had it setup and running in 5-10 minutes. This is beyond your control, and you still spent time trying to help figure it out. Sit down, be humble, you did good man. A damn fine job!

2 Likes

Hm - is netstat supposed to show UDP binds? It seems the UDP bind doesn’t show up at all in there, which of course wouldn’t be related to TCP issues (perhaps due to proot? unsure, this normally doesn’t cause issues) but is possibly related.

1 Like

Ok, so to make this thread, I basically copied over all the stuff I already wrote in the thread I reference at the beginning. I accidently cut off the UDP portion. It’s been updated. Sorry, and thanks for any help you give!

1 Like

This wasn’t fixed by updating to 290-04e034829f75169f11ee33abf67281ecd74728e3
It’s still the same issue.

Something I’m noticing here is the default route for TCP is ipv4 while the default route for udp is ipv6…

Edit: I disabled ipv6 entirely as I don’t utilize it.

That might be bad. ENet supports IPv4 through an IPv6 compatibility mapping ([::ffff:1.2.3.4], v4mapping), and does not use raw IPv4 at all, so you’ll need to have the IPv6 stack enabled.

I did it as a troubleshooting step. It hasn’t worked either way. I’ll re-enable it, but the issue is still there either way. Server appears fine but doesn’t respond to queries. I’m honestly pretty frustrated at this point. It’s been days and I feel like there’s a solution in reach, but I need help getting it.

I can see the ACCEPT packet count increasing when using iptables -L -v -n | grep 30120 while trying to send packets to the server port using Putty and FiveM direct connect searches, so I KNOW the server is receiving packets.

In a new revelation I saw, if only for a brief moment, the “My New FXServer!” with a connect button, before FiveM jumped back to http://imgur.com/p4QLZN2

Something is up with the server. I’ve completely wiped out the directories and re-done it step-by-step 3 times now. Again, any help is greatly appreciated.

Tried renice-ing the server process to -1 to make sure it takes priority for processing, still nada.

After using Ctrl+C to kill the server, I see a lot of pids from proot, is this normal?

proot info: pid 6746: terminated with signal 2
proot info: pid 6754: terminated with signal 2
proot info: pid 6758: terminated with signal 2
proot info: pid 6760: terminated with signal 2
proot info: pid 6757: terminated with signal 2
proot info: pid 6756: terminated with signal 2
proot info: pid 6755: terminated with signal 2
proot info: pid 6753: terminated with signal 2
proot info: pid 6752: terminated with signal 2
proot info: pid 6751: terminated with signal 2
proot info: pid 6750: terminated with signal 2
proot info: pid 6749: terminated with signal 2
proot info: pid 6748: terminated with signal 2
proot info: pid 6747: terminated with signal 2
proot info: pid 6744: terminated with signal 2
proot info: pid 6745: terminated with signal 2
proot info: pid 6742: terminated with signal 2
proot info: pid 6743: terminated with signal 2
proot info: pid 6739: terminated with signal 2
proot info: pid 6741: terminated with signal 2
proot info: pid 6737: terminated with signal 2
proot info: pid 6738: terminated with signal 2
proot info: pid 6735: terminated with signal 2
proot info: pid 6736: terminated with signal 2
proot info: pid 6732: terminated with signal 2
proot info: pid 6734: terminated with signal 2
proot info: pid 6730: terminated with signal 2
proot info: pid 6740: terminated with signal 2
proot info: pid 6733: terminated with signal 2
proot info: pid 6731: terminated with signal 2
proot info: pid 6728: terminated with signal 2
proot info: pid 6729: terminated with signal 2
proot info: pid 6726: terminated with signal 2
proot info: pid 6727: terminated with signal 2
proot info: pid 6725: terminated with signal 2
proot info: pid 6724: terminated with signal 2
proot info: pid 6723: terminated with signal 2
proot info: pid 6722: terminated with signal 2
proot info: pid 6721: terminated with signal 2
proot info: pid 6720: terminated with signal 2
proot info: pid 6719: terminated with signal 2
proot info: pid 6718: terminated with signal 2
proot info: pid 6717: terminated with signal 2
proot info: pid 6716: terminated with signal 2
proot info: pid 6715: terminated with signal 2

It does this every time.

Do you have an external VPS you can try with? Also I get that too. http://i.imgur.com/8RNJHea.png

No, I don’t, but I’m about to host it from a VM from the same server to see if a clean linux installation fixes the issue.

Worked on the clean install, running inside a VM with a bridged VNIC, that’s hosted by the machine it won’t work on… smh

It’d be nice if we could still look into this and see why. I dont want to have to “guess” at how many resources I should dedicate to my VM when I could just run it off the main server… This could probably help a few people in the future…

I’m all ears.

If it makes you feel any better I run my server on 2gigs of ram and I don’t think it’s ever gone above like 200mb of resources for FiveM.

Each player is like 10-15mb and I don’t think it scales linear due to most of the work being offloaded to the client (It’s all peer to peer except for the server scripts)

So you never found out what caused it? Having the exact same problem on my VPS. It’s a standard Ubuntu 16.04 installation. Running multiple other game servers and websites but this is the only game server that does not work. Starting it works fine without any errors but I am unable to query it in any way on the 30120 port. Even with UFW and IPtables completely off. I’m at a loss here what it could be.

Is there any way the docker ethernet adapter could be causing any issue? And I also have ipv6 completely disabled because I only have an ipv4 address.

Enable ipv6 because it uses a loopback for the UDP protocal, otherwise no, I never figured it out unfortunately.

1 Like

Enabled ipv6 now and even got ipv6 addresses from my provider. Added it to my eth0 adapter. But still no connection.

Tried a FiveM server in a docker container and it works perfectly fine. The docker image didnt feel too stable so I would love to just run it natively instead of in docker.

Got any tips to check if that loopback to the UDP is actually functional on my system?

Hi,

Got the exactly same problem here, trying for about 10 hours. I’ve enabled IPv6 on my dedicated server, nothing. I’ve tried on such virtual machines with Ubuntu 16.04 and Debian 9 clean install, and same problem. After I’ve tried on Windows and everything work. The dedicated server is on Ubuntu 16.04 too with many others games servers. Maybe the linux version is broken or I forgot something? Thanks.