Settings up a server ?

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
notaduck
Burner Inserter
Burner Inserter
Posts: 7
Joined: Thu Apr 13, 2017 8:11 am
Contact:

Settings up a server ?

Post by notaduck »

Hi guys I have some questions here. I'm trying to setup a Factorio server on a headlless linux box.
But I'm missing a token, and I can't seem to figure out where I should get this?

And then there is also something about a conflicting address?! And I'm not really sure what to do here? So I hope some of you could reach out to me to make my day a lot better ;)

Code: Select all

   0.988 Info ServerRouter.cpp:604: Asking pingpong servers (pingpong1.factorio.com:34197, pingpong2.factorio.com:34197) for own address
   1.043 Warning ServerRouter.cpp:492: Received own adddress message reply with conflicting address (got xx.xxx.xx.xxx:50915, expected xx.xxx.xx.xxx::41154)
   1.043 Warning ServerMultiplayerManager.cpp:551: Determining own address has failed. Best guess: xx.xxx.xx.xxx::41154
   1.060 Error ServerMultiplayerManager.cpp:592: Matching server connection failed: Error when creating server game: Missing token.
Full Output

Code: Select all

[factorio@Factorio factorio]$ factorio --start-server /opt/factorio/saves/testtest.zip --server-settings /opt/factorio/data/server-settings.json 
   0.000 2017-04-13 18:58:03; Factorio 0.14.22 (build 25342, linux64, headless)
   0.000 Operating system: Linux
   0.000 Program arguments: "/opt/factorio/bin/x64/factorio" "--start-server" "/opt/factorio/saves/testtest.zip" "--server-settings" "/opt/factorio/data/server-settings.json" 
   0.000 Read data path: /opt/factorio/data
   0.000 Write data path: /opt/factorio
   0.000 Binaries path: /opt/factorio/bin
   0.008 System info: [CPU: Intel(R) Xeon(R) CPU E3-1240L v3 @ 2.00GHz, 8 cores, RAM: 2094MB]
   0.009 Running in headless mode
   0.010 Loading mod core 0.0.0 (data.lua)
   0.013 Loading mod base 0.14.22 (data.lua)
   0.080 Checksum for core: 1291735968
   0.080 Checksum for mod base: 786624017
   0.412 Info PlayerData.cpp:55: Local player-data.json available, timestamp 1492109845
   0.412 Info PlayerData.cpp:62: Cloud player-data.json unavailable
   0.413 Custom inputs active: 0
   0.414 Factorio initialised
   0.415 Info ServerSynchronizer.cpp:27: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
   0.415 Info ServerMultiplayerManager.cpp:658: mapTick(-1) changing state from(Ready) to(PreparedToHostGame)
   0.415 Info ServerMultiplayerManager.cpp:658: mapTick(-1) changing state from(PreparedToHostGame) to(CreatingGame)
   0.415 Loading map /opt/factorio/saves/testtest.zip
   0.416 Error FileUtil.cpp:284: Can't remove /opt/factorio/temp/currently-playing: No such file or directory
   0.430 Info Scenario.cpp:152: Map version 0.14.22-0
   0.465 Checksum for script /opt/factorio/temp/currently-playing/control.lua: 1057114497
   0.466 Info UDPSocket.cpp:27: Opening socket at (0.0.0.0:34197)
   0.466 Hosting game at 0.0.0.0:34197
   0.466 Info HttpSharedState.cpp:44: Downloading https://auth.factorio.com/generate-server-padlock
   0.988 Info HttpSharedState.cpp:111: Status code: 200
   0.988 Info AuthServerConnector.cpp:106: Obtained serverPadlock for serverHash (CMTARKf6IgXSQHy0lXVyFxPkLBZiXFQ5) from the auth server.
   0.988 Info ServerMultiplayerManager.cpp:658: mapTick(0) changing state from(CreatingGame) to(InGame)
   0.988 Info ServerRouter.cpp:604: Asking pingpong servers (pingpong1.factorio.com:34197, pingpong2.factorio.com:34197) for own address
   1.043 Warning ServerRouter.cpp:492: Received own adddress message reply with conflicting address (got xx.xxx.xx.xxx::50915, expected xx.xxx.xx.xxx::41154)
   1.043 Warning ServerMultiplayerManager.cpp:551: Determining own address has failed. Best guess: xx.xxx.xx.xxx::41154
   1.060 Error ServerMultiplayerManager.cpp:592: Matching server connection failed: Error when creating server game: Missing token.

noliVe
Filter Inserter
Filter Inserter
Posts: 327
Joined: Tue May 24, 2016 7:46 am
Contact:

Re: Settings up a server ?

Post by noliVe »

your TOKEN is missinig if you want to run the server PUBLIC you need that token

written in player-data.json in your %appdata%/factorio folder at the bottom line.

"SERVICE-TOKEN"

notaduck
Burner Inserter
Burner Inserter
Posts: 7
Joined: Thu Apr 13, 2017 8:11 am
Contact:

Re: Settings up a server ?

Post by notaduck »

noliVe wrote:your TOKEN is missinig if you want to run the server PUBLIC you need that token

written in player-data.json in your %appdata%/factorio folder at the bottom line.

"SERVICE-TOKEN"
Right know that file looks like this, and the "service-token" is empty?

Code: Select all

{
    "available-campaign-levels": {
        "demo": {
            "level-01": "hard"
        },
        "tight-spot": {
            "level-01": "hard"
        },
        "transport-belt-madness": {
            "level-01": "hard"
        }
    },
    "console-history": "",
    "latest-multiplayer-connections": "",
    "service-username": "",
    "service-token": ""
}

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Settings up a server ?

Post by daniel34 »

Your token is only in that file after you verified your credentials within the game. You should be able to do this after any of the following tasks:
  • Try to install mods in Mods --> Install mods
  • Try to see the current multiplayer games in Play --> Multiplayer --> Browse Public Games
  • Check for updates in About --> Check updates
In any of these cases a dialog will pop up and ask you for your username and password, after you entered them successfully and exited the game your username and token should be present in the player-data.json.
quick links: log file | graphical issues | wiki

notaduck
Burner Inserter
Burner Inserter
Posts: 7
Joined: Thu Apr 13, 2017 8:11 am
Contact:

Re: Settings up a server ?

Post by notaduck »

daniel34 wrote:Your token is only in that file after you verified your credentials within the game. You should be able to do this after any of the following tasks:
  • Try to install mods in Mods --> Install mods
  • Try to see the current multiplayer games in Play --> Multiplayer --> Browse Public Games
  • Check for updates in About --> Check updates
In any of these cases a dialog will pop up and ask you for your username and password, after you entered them successfully and exited the game your username and token should be present in the player-data.json.
I could start the game on my windows machine to get the token, and it is not because I'm lazy. But isn't it possible to obatin the token on a headless linux machine?
I'm currently trying to write a guide on how to setup a factorio server oon a linux headless system. So I'm just trying to udnerstand everything here ;)

User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Settings up a server ?

Post by prg »

https://wiki.factorio.com/Web_Authentication_API

Code: Select all

curl https://auth.factorio.com/api-login -d username=$USERNAME -d password=$PASSWORD
or pass @- to the second -d and type password=$PASSWORD into the terminal yourself if you don't want to see your password end up in .bash_history.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!

notaduck
Burner Inserter
Burner Inserter
Posts: 7
Joined: Thu Apr 13, 2017 8:11 am
Contact:

Re: Settings up a server ?

Post by notaduck »

prg wrote:https://wiki.factorio.com/Web_Authentication_API

Code: Select all

curl https://auth.factorio.com/api-login -d username=$USERNAME -d password=$PASSWORD
or pass @- to the second -d and type password=$PASSWORD into the terminal yourself if you don't want to see your password end up in .bash_history.
Thanks! That helped a lot.....

I can start the server, and see it in the public game list. But for some reason I'm unable to join the game, due to a connection fail and I'm still seeing this error

Code: Select all

   1.959 Info ServerRouter.cpp:604: Asking pingpong servers (pingpong1.factorio.com:34197, pingpong2.factorio.com:34197) for own address

   2.032 Warning ServerRouter.cpp:492: Received own adddress message reply with conflicting address (got xx.xxx.xx.xxx:53185, expected xx.xxx.xx.xxx:39051)

   2.032 Warning ServerMultiplayerManager.cpp:551: Determining own address has failed. Best guess: xx.xxx.xx.xxx:39051

   2.435 Info ServerMultiplayerManager.cpp:587: Matching server connection resumed



noliVe
Filter Inserter
Filter Inserter
Posts: 327
Joined: Tue May 24, 2016 7:46 am
Contact:

Re: Settings up a server ?

Post by noliVe »

you cannot connect to your own server on your own pc because of the same port you need or something like this.

just install/create another folder to start this or use the system inside the game > Multiplayer > create a game > start

notaduck
Burner Inserter
Burner Inserter
Posts: 7
Joined: Thu Apr 13, 2017 8:11 am
Contact:

Re: Settings up a server ?

Post by notaduck »

noliVe wrote:you cannot connect to your own server on your own pc because of the same port you need or something like this.

just install/create another folder to start this or use the system inside the game > Multiplayer > create a game > start
Ther server is all ready running on another machine, and port 34197 is portforrwared in my firewall(external).

Post Reply

Return to “Technical Help”