Headless Linux Factorio Server | Silent Failure

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
deliveryboys
New to forums
New to forums
Posts: 3
Joined: Wed May 08, 2019 1:47 pm

Headless Linux Factorio Server | Silent Failure

Post by deliveryboys » Wed May 08, 2019 2:04 pm

Hello there,

I've recently been trying to set up a headless Factorio server on my Ubuntu 18.04 VDS.

I've followed the guide given on their Wiki, went through the usual pain of figuring out what I set up wrong, and eventually got it running.

The problem:
  • The server appears in the server browser. However, I cannot connect to it, and neither can my friend (who is on a completely different network in another country).
  • Where the server browser displays ping, the value for ping is "can't reach". When trying to join anyway, I will receive the message "couldn't establish network connection to server." OR less often I will be able to join (although this is not true of my server; I've never been able to successfully connect.)
    • I thought this may be an issue on my end, but I looked at other servers in the server browser, and this error only occurs with some servers.
    • I can connect to servers for which I can determine a ping. I joined one of the servers so I could determine which port it ran on, just in case that was different than my server, but the port is the same for my server (default 34197 UDP).
    • Some servers that I have the "can't reach" error for do have players on them, so other players are able to connect.
  • I enabled verbose logging for the server to see if I received any errors, or specifically any errors that occur when players try to connect. No errors of any type are present in the logs.
To save you a little bit of research, here are some links (some are posts from the devs describing their network architecture):
[Client-server connections] https://www.factorio.com/blog/post/fff-99
[Lock step architecture] https://www.factorio.com/blog/post/fff-76
[UDP NAT punching] https://www.factorio.com/blog/post/fff-143
[Factorio Multiplayer Wiki Page] https://wiki.factorio.com/Multiplayer

deliveryboys
New to forums
New to forums
Posts: 3
Joined: Wed May 08, 2019 1:47 pm

Re: Headless Linux Factorio Server | Silent Failure

Post by deliveryboys » Fri May 10, 2019 10:31 pm

Bump/small update

I created a new user and installed the server with a different server management tool that I've used before called LGSM.

I followed the very simple steps to create the server, edited the Factorio server-settings.json file to contain my authentication token and username, and the server "runs". It appears in the server browser, just as last time, but I cannot connect. Once again, the logs do not produce any errors and there is no indication that players are even attempting to join in the logs.

I attempted a direct connection to the server, which also failed. I'm at a loss. I'm not sure if it's something wrong on my end, if it's something wrong with Factorio (and hours of Googling the problem has gotten me nowhere), or if it's something on NFO's end.

This is likely unrelated, but... I recently lost the ability to connect to my server via PuTTy or WinSCP. I can still connect with TightVNC, however.

User avatar
hiimcody1
Staff
Staff
Posts: 1246
Joined: Wed Dec 28, 2011 4:59 pm

Re: Headless Linux Factorio Server | Silent Failure

Post by hiimcody1 » Sat May 11, 2019 5:34 am

It has been a long time but I did successfully run a Factorio server for myself and a friend from one of our Linux VDSes. I did not use a server manager or panel however, I just placed it in a screen session through Putty.

If you aren't able to connect using SSH, this could come down to a firewall issue. Are you using iptables or ufw?

deliveryboys
New to forums
New to forums
Posts: 3
Joined: Wed May 08, 2019 1:47 pm

Re: Headless Linux Factorio Server | Silent Failure

Post by deliveryboys » Sat May 11, 2019 2:15 pm

Thank you hiimcody1, you got me looking in the right place.

In attempting to set up another server a few weeks ago (which would have had to run in WINE), I blindly followed a guide. The guide told me to perform the following commands:

Code: Select all

sudo ufw enable 
sudo ufw allow 8766 
sudo ufw allow 27015 
sudo ufw allow 27016
In retrospect, these obviously do not apply to me. I'm not trying to run a server on my local network.

After I ran those commands, I lost the ability to connect to the server with any client other than NFO's client in the browser and TightVNC. But your post made me curious, so I looked into ufw to see exactly what it was.

I realized that I had only explicitly allowed connections on very specific ports (hence PuTTY and WinSCP failing). I simply ran ufw disable and the problem is fixed.

PuTTY works (super happy about this -- I hate TightVNC), WinSCP works, and most importantly, the Factorio server is now working. Thanks again. Super simple solution, I just didn't know where to look :)

User avatar
hiimcody1
Staff
Staff
Posts: 1246
Joined: Wed Dec 28, 2011 4:59 pm

Re: Headless Linux Factorio Server | Silent Failure

Post by hiimcody1 » Mon May 13, 2019 5:21 am

I'm glad it ended up being a simple fix! :)

Post Reply