[0.16.51] Unable to Connect from Internet. Some times Can Connect from LAN [Solved]

Anything that prevents you play the game properly. Do you have issues with paying for the game, downloading it or properly running it on your computer? Let us know here.
Post Reply
VanillaWaferX
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Jan 23, 2019 8:04 pm
Contact:

[0.16.51] Unable to Connect from Internet. Some times Can Connect from LAN [Solved]

Post by VanillaWaferX » Sat Jan 26, 2019 5:53 am

I have a Freenas Box running an Ubuntu 16.04 VM. Have factorio headless installed. Port forwarding set up for 34180(tried the default port and many other ports no change). The log shows the server wouldn't find its rxternal IP so I had found a post saying to "--bind" the ip. If I bind the external IP the server just won't start and from looking at other posts it looks like the UDP socket should be the servers internal IP anyways.I have also completely disabled (enabled now) the fire wall in my junky comcast router. Didn't change anything. We are attempting to connect from the public games list, my lan list, and also direct "Connect to server". The user verification has been toggled on and off. No change. I have also tried limiting the kbps in the server-settings.json no change.

Now I am at a point when any time I launch the server sometimes it determines its external IP and sometimes it doesn't. I can't really determine why. No one can connect from WAN. And on LAN I can connect about 25% of the time (doesn't seem related to having its external IP or not. Which makes sense for LAN.) As well I don't get a ping in the list 50% of the time. Now just banging my head against the wall as this is all quite strange behavior.

Code: Select all

  0.000 2019-01-25 21:46:34; Factorio 0.16.51 (build 36654, linux64, headless)
   0.031 Operating system: Linux (Ubuntu 16.04)
   0.031 Program arguments: "/home/frunner/factorio/bin/x64/factorio" "--server-settings" "/home/frunner/factorio/data/server-settings.json" "--start-server-load-latest" "--bind" "10.0.0.11" "--console-log" "/home/frunner/Factorio.log" 
   0.031 Read data path: /home/frunner/factorio/data
   0.031 Write data path: /home/frunner/factorio [41940/46466MB]
   0.031 Binaries path: /home/frunner/factorio/bin
   0.037 System info: [CPU: Intel(R) Xeon(R) CPU E3-1241 v3 @ 3.50GHz, 2 cores, RAM: 1999 MB]
   0.037 Environment: DISPLAY=<unset>, WAYLAND_DISPLAY=<unset>
   0.038 Running in headless mode
   0.051 Loading mod settings a-better-start 0.3.0 (settings.lua)
   0.051 Loading mod settings Bottleneck 0.9.3 (settings.lua)
   0.051 Loading mod settings Factorissimo2 2.2.3 (settings.lua)
   0.051 Loading mod settings far-reach 0.0.8 (settings.lua)
   0.051 Loading mod settings LoaderRedux 1.3.1 (settings.lua)
   0.051 Loading mod settings LogisticTrainNetwork 1.9.7 (settings.lua)
   0.053 Loading mod core 0.0.0 (data.lua)
   0.060 Loading mod base 0.16.51 (data.lua)
   0.149 Loading mod Bottleneck 0.9.3 (data.lua)
   0.179 Loading mod Factorissimo2 2.2.3 (data.lua)
   0.245 Loading mod LoaderRedux 1.3.1 (data.lua)
   0.305 Loading mod LogisticTrainNetwork 1.9.7 (data.lua)
   0.366 Loading mod base 0.16.51 (data-updates.lua)
   0.429 Loading mod LoaderRedux 1.3.1 (data-updates.lua)
   0.488 Loading mod Squeak Through 1.2.2 (data-updates.lua)
   0.547 Loading mod LogisticTrainNetwork 1.9.7 (data-final-fixes.lua)
   0.553 Script @__LogisticTrainNetwork__/data-final-fixes.lua:99: [LTN] found 511 items, 8 fluids, 1 locomotives, 3 wagons
   0.617 Checksum for core: 840319042
   0.617 Checksum of base: 3323233190
   0.617 Checksum of a-better-start: 2324304144
   0.617 Checksum of Bottleneck: 3138809866
   0.617 Checksum of Factorissimo2: 1394394679
   0.617 Checksum of far-reach: 1707614877
   0.617 Checksum of LoaderRedux: 655948058
   0.617 Checksum of LogisticTrainNetwork: 3117850550
   0.617 Checksum of Squeak Through: 3677677690
   0.730 Info PlayerData.cpp:65: Local player-data.json available, timestamp 1548481591
   0.730 Info PlayerData.cpp:72: Cloud player-data.json unavailable
   0.731 Custom inputs active: 0
   1.975 0 packages available to download (experimental updates disabled).
   1.977 Factorio initialised
   1.978 Info ServerSynchronizer.cpp:29: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
   1.978 Info ServerMultiplayerManager.cpp:699: mapTick(4294967295) changing state from(Ready) to(PreparedToHostGame)
   1.978 Info ServerMultiplayerManager.cpp:699: mapTick(4294967295) changing state from(PreparedToHostGame) to(CreatingGame)
   1.978 Loading map /home/frunner/factorio/saves/UBUNTUSERVER.zip: 780578 bytes.
   1.987 Loading Level.dat: 1585480 bytes.
   1.993 Info Scenario.cpp:136: Map version 0.16.51-0
   2.036 Loading script.dat: 6759 bytes.
   2.038 Checksum for script /home/frunner/factorio/temp/currently-playing/control.lua: 950616531
   2.039 Checksum for script __a-better-start__/control.lua: 1097292100
   2.041 Checksum for script __Bottleneck__/control.lua: 730129785
   2.046 Checksum for script __Factorissimo2__/control.lua: 3203797068
   2.046 Checksum for script __far-reach__/control.lua: 105203498
   2.048 Checksum for script __LoaderRedux__/control.lua: 1646914820
   2.051 Checksum for script __LogisticTrainNetwork__/control.lua: 3890104038
   2.054 Script @__LoaderRedux__/control.lua:23: supported_loaders: {
  loader = true
}
   2.054 Script @__LoaderRedux__/control.lua:23: supported_loaders: {
  ["fast-loader"] = true,
  loader = true
}
   2.055 Script @__LoaderRedux__/control.lua:23: supported_loaders: {
  ["express-loader"] = true,
  ["fast-loader"] = true,
  loader = true
}
   2.055 Script @__LoaderRedux__/control.lua:23: supported_loaders: {
  ["express-loader"] = true,
  ["fast-loader"] = true,
  loader = true,
  ["purple-loader"] = true
}
   2.056 Script @__LoaderRedux__/control.lua:23: supported_loaders: {
  ["express-loader"] = true,
  ["fast-loader"] = true,
  ["green-loader"] = true,
  loader = true,
  ["purple-loader"] = true
}
   2.056 Script @__LogisticTrainNetwork__/control.lua:302: [LTN] on_load: complete
   2.057 Info UDPSocket.cpp:27: Opening socket at (IP ADDR:({10.0.0.11:34180}))
   2.057 Hosting game at IP ADDR:({10.0.0.11:34180})
   2.057 Info HttpSharedState.cpp:54: Downloading https://auth.factorio.com/generate-server-padlock-2
   2.526 Info HttpSharedState.cpp:145: Status code: 200
   2.526 Info AuthServerConnector.cpp:109: Obtained serverPadlock for serverHash (h3CZiRGzqTzTOSHSJHqL6WIswDoyAxpM) from the auth server.
   2.526 Info ServerMultiplayerManager.cpp:699: mapTick(13246) changing state from(CreatingGame) to(InGame)
   2.526 Info ServerRouter.cpp:596: Asking pingpong servers (pingpong1.factorio.com:34197, pingpong2.factorio.com:34197) for own address
   2.554 Info UDPSocket.cpp:39: Opening socket for broadcast
   2.575 Error InterruptibleStdioStream.cpp:54: Reading stdin failed
   2.735 Info ServerRouter.cpp:491: Own address is IP ADDR:({x.x.x.x:34180})
   3.659 Info MatchingServer.cpp:86: Matching server game `4195198` has been created.
   3.671 Info ServerMultiplayerManager.cpp:628: Matching server connection resumed
Last edited by VanillaWaferX on Thu Jan 31, 2019 6:37 am, edited 1 time in total.

Eiermann
Burner Inserter
Burner Inserter
Posts: 14
Joined: Tue Jan 08, 2019 7:27 am
Contact:

Re: [0.16.51] Unable to Connect from Internet. Some times Can Connect from LAN

Post by Eiermann » Sat Jan 26, 2019 12:57 pm

The initial binding in your log seems correct, because it binds to the adress you declared at start-up. Can you post additional information like the output of "netstat -tulpen" and "ifconfig" when the server is running but not reachable (your server-configuration would also be usefull)? Are you running your server as FreeNAS VM or Docker Image?

VanillaWaferX
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Jan 23, 2019 8:04 pm
Contact:

Re: [0.16.51] Unable to Connect from Internet. Some times Can Connect from LAN

Post by VanillaWaferX » Sat Jan 26, 2019 8:43 pm

Eiermann wrote:
Sat Jan 26, 2019 12:57 pm
The initial binding in your log seems correct, because it binds to the adress you declared at start-up. Can you post additional information like the output of "netstat -tulpen" and "ifconfig" when the server is running but not reachable (your server-configuration would also be usefull)? Are you running your server as FreeNAS VM or Docker Image?
Its a freenas VM not docker.

"ifconfig -a"

Code: Select all

enp0s4    Link encap:Ethernet  HWaddr 00:a0:98:07:e1:dd  
          inet addr:10.0.0.11  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::2a0:98ff:fe07:e1dd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1256070 errors:0 dropped:0 overruns:0 frame:0
          TX packets:65009 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:207022477 (207.0 MB)  TX bytes:5518354 (5.5 MB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:5783 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5783 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:267702 (267.7 KB)  TX bytes:267702 (267.7 KB)
"netstat -tulpen"

Code: Select all

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          14836       1038/sshd       
tcp6       0      0 :::22                   :::*                    LISTEN      0          14845       1038/sshd       
udp        0      0 0.0.0.0:52142           0.0.0.0:*                           1001       41704       4140/factorio   
udp        0      0 10.0.0.11:34180         0.0.0.0:*                           1001       41694       4140/factorio   
"server-settings.json"

Code: Select all

{
  "name": "VanillaWaferX",
  "description": "VanillaWaferX Server",
  "tags": ["game", "vanillawaferx"],

  "_comment_max_players": "8",
  "max_players": 8,

  "_comment_visibility": ["public: Game will be published on the official Factorio matching server",
                          "lan: Game will be broadcast on LAN"],
  "visibility":
  {
    "public": true,
    "lan": true
  },

  "_comment_credentials": "Your factorio.com login credentials. Required for games with visibility public",
  "username": "vanillawaferx",
  "password": "",

  "_comment_token": "Authentication token. May be used instead of 'password' above.",
  "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",

  "game_password": "",

  "_comment_require_user_verification": "When set to true, the server will only allow clients that have a valid Factorio.com account",
  "require_user_verification": true,

  "_comment_max_upload_in_kilobytes_per_second" : "optional, default value is 0. 0 means unlimited.",
  "max_upload_in_kilobytes_per_second": 1500,

  "_comment_minimum_latency_in_ticks": "optional one tick is 16ms in default speed, default value is 0. 0 means no minimum.",
  "minimum_latency_in_ticks": 0,

  "_comment_ignore_player_limit_for_returning_players": "Players that played on this map already can join even when the max player limit was reached.",
  "ignore_player_limit_for_returning_players": false,

  "_comment_allow_commands": "possible values are, true, false and admins-only",
  "allow_commands": "admins-only",

  "_comment_autosave_interval": "Autosave interval in minutes",
  "autosave_interval": 10,

  "_comment_autosave_slots": "server autosave slots, it is cycled through when the server autosaves.",
  "autosave_slots": 10,

  "_comment_afk_autokick_interval": "How many minutes until someone is kicked when doing nothing, 0 for never.",
  "afk_autokick_interval": 0,

  "_comment_auto_pause": "Whether should the server be paused when no players are present.",
  "auto_pause": true,

  "only_admins_can_pause_the_game": true,

  "_comment_autosave_only_on_server": "Whether autosaves should be saved only on server or also on all connected clients. Default is true.",
  "autosave_only_on_server": true,
  
  "_comment_non_blocking_saving": "Highly experimental feature, enable only at your own risk of losing your saves. On UNIX systems, server will fork itself to create an autosave. Autosaving on connected Windows clients will be disabled regardless of autosave_only_on_server option.",
  "non_blocking_saving": false,

  "_comment_admins": "List of case insensitive usernames, that will be promoted immediately",
  "admins": []
}
Last edited by VanillaWaferX on Sun Jan 27, 2019 11:41 pm, edited 2 times in total.

Eiermann
Burner Inserter
Burner Inserter
Posts: 14
Joined: Tue Jan 08, 2019 7:27 am
Contact:

Re: [0.16.51] Unable to Connect from Internet. Some times Can Connect from LAN

Post by Eiermann » Sat Jan 26, 2019 11:27 pm

Since your VM doesnt have any external-ip adresses you need to bind the server to 10.0.0.11, which is absolutly fine. Can you configure port-forwarding in your router or freeNAS gui?

VanillaWaferX
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Jan 23, 2019 8:04 pm
Contact:

Re: [0.16.51] Unable to Connect from Internet. Some times Can Connect from LAN

Post by VanillaWaferX » Sun Jan 27, 2019 12:00 am

Eiermann wrote:
Sat Jan 26, 2019 11:27 pm
Since your VM doesnt have any external-ip adresses you need to bind the server to 10.0.0.11, which is absolutly fine. Can you configure port-forwarding in your router or freeNAS gui?
Port forwarding already set up in my router. And I actually don't know that much into freenas. So I'm not sure if it actually has its own port forwarding for VMs.

VanillaWaferX
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Jan 23, 2019 8:04 pm
Contact:

Re: [0.16.51] Unable to Connect from Internet. Some times Can Connect from LAN

Post by VanillaWaferX » Tue Jan 29, 2019 5:45 am

Well I'm going to update this Incase anyone else having this issue reads. I have not fully fixed the issue. Still very intermittent. I have successfully been able to connect from LAN while 2 other clients connected from internet once and that never happened again. I can not tell you why that worked that one time. The log is identical to the one I have posted above.

In the meantimeI have a new to me server coming from fleabay soon. Which I have other plans for, BUT before I do that I am going to try testing putting this on its own dedicated machine and see if that changes anything. Will update in the future.

Two things I'm suspecting at the moment is Freenas host passing through its connection to the guest. And my ISP Crapcast Comcast being of bunch of no fun zone people(less suspect this as I can host from in game and we can connect just fine).

Edit: Finally Figured it out. The FreeNas host has been set up with a LACP connection from day one. Apparently. something happened and its not working very well anymore(other problems I need to figure out). I gave the Ubuntu guest a dedicated NIC and everything seems to be working fine. We can connect to the headless server just fine now.

Post Reply

Return to “Technical Help”

Who is online

Users browsing this forum: No registered users and 3 guests