Steam Dedicated Server
- Tesse11ation
- Fast Inserter
- Posts: 186
- Joined: Sat Mar 05, 2016 12:59 am
- Contact:
Re: Steam Dedicated Server
I have forwarded the correct ports for Factorio. I'm not familiar with NAT setups though.
Re: Steam Dedicated Server
if you leave the server with your local client - can your friend connect to the public ip of your setup?
if that works, carry on with these:
- which port did you forward, to which internal ip?
- whats the port in your servers config set to?
- whats the port in your config set to?
( see cubes explanation of how factorio works behind a router - viewtopic.php?f=11&t=13634&start=10#p93014 however if you do not run with --peer-to-peer you really ought to only need a port forwarded)
if that works, carry on with these:
- which port did you forward, to which internal ip?
- whats the port in your servers config set to?
- whats the port in your config set to?
( see cubes explanation of how factorio works behind a router - viewtopic.php?f=11&t=13634&start=10#p93014 however if you do not run with --peer-to-peer you really ought to only need a port forwarded)
Hosting a factorio server? Take a look at this || init script ||.
- Tesse11ation
- Fast Inserter
- Posts: 186
- Joined: Sat Mar 05, 2016 12:59 am
- Contact:
Re: Steam Dedicated Server
I'm getting activity in my server's cmd window when my friend tries to connect but other than that they are unable to connect. I know it can't be an issue with my router because I have forwarded ports for other games and I know how to do it.
To answer your questions:
- I forwarded 34197, the default port for Factorio
- The port in my server's config file is set to 34197
- The port in my regular config file is set to 34198
To answer your questions:
- I forwarded 34197, the default port for Factorio
- The port in my server's config file is set to 34197
- The port in my regular config file is set to 34198
Re: Steam Dedicated Server
then at least the forward works, what kind of activity - can you paste a log?
Hosting a factorio server? Take a look at this || init script ||.
- Tesse11ation
- Fast Inserter
- Posts: 186
- Joined: Sat Mar 05, 2016 12:59 am
- Contact:
Re: Steam Dedicated Server
Sure can. Take a look.
EDIT: Sorry it's kind of a long log. I let a couple people from the IRC try to join while I was troubleshooting.
EDIT: Sorry it's kind of a long log. I let a couple people from the IRC try to join while I was troubleshooting.
- Attachments
-
- factorio-current.log
- (104.99 KiB) Downloaded 152 times
Re: Steam Dedicated Server
Thats just odd, looks like the client tries to connect while already trying to connect... or the same incoming ip has multiple clients trying to connect (either by actually sitting behind the same router or due to some hop between you and the others)12243.196 Connection request from 31.178.111.46:34197
12243.196 Info Router.cpp:647: NetworkTick(725529) replying to connectionRequest for address(31.178.111.46:34197).
12243.696 Connection request from 31.178.111.46:34197
12243.696 Refusing connection for address(31.178.111.46:34197). Another connection from this peer is in progress.
Not sure what to make of that tbh, can you join other servers online?
Hosting a factorio server? Take a look at this || init script ||.
Re: Steam Dedicated Server
actually, one more thing - how do you start the server? (give me the full command line you are using)
Hosting a factorio server? Take a look at this || init script ||.
Re: Steam Dedicated Server
never mind, it's in the log file...Bisa wrote:actually, one more thing - how do you start the server? (give me the full command line you are using)
Hosting a factorio server? Take a look at this || init script ||.
- Tesse11ation
- Fast Inserter
- Posts: 186
- Joined: Sat Mar 05, 2016 12:59 am
- Contact:
Re: Steam Dedicated Server
If I recall correctly, Bisa, don't you have a server that I could try joining?
Re: Steam Dedicated Server
sure, check my signature - ull have to download some mods to connect tho, either that or hook me up on irc (named Bisa as well) and you can try to connect to my test server without modsKoblerMan wrote:If I recall correctly, Bisa, don't you have a server that I could try joining?
Hosting a factorio server? Take a look at this || init script ||.
- Tesse11ation
- Fast Inserter
- Posts: 186
- Joined: Sat Mar 05, 2016 12:59 am
- Contact:
Re: Steam Dedicated Server
I try not to install mods unless I absolutely have to. I'd rather play vanilla Factorio.
Re: Steam Dedicated Server
give this one a shot:KoblerMan wrote:I try not to install mods unless I absolutely have to. I'd rather play vanilla Factorio.
viewtopic.php?f=53&t=13579
also, the mods on my server are not overly game changing but rather enhances the vanilla experience - it up to you tho
Hosting a factorio server? Take a look at this || init script ||.
-
- Burner Inserter
- Posts: 5
- Joined: Mon Apr 11, 2016 4:58 am
- Contact:
Re: Steam Dedicated Server
I've managed to get my dedicated server + client on the same PC up and running using the info in this thread. Thanks.
I have a remaining issue though:
DESIRED BEHAVIOUR: When shutting down the server from the cmd window using CTRL + C, the server should save the game in the original save file (in my case, "dedicatedsave.zip")
OBSERVED BEHAVIOUR: Pressing CTRL + C shows the normal shutting down messages, but before the window closes there is "Terminate batch job <Y/N>?". Typing either Y or N has the same effect - the window closes, and the game is not saved (confirmed that modified date of save file does not change, and rehosted file to check for changes).
My launch script is
Has anyone else had this?
Here is my log:
I have a remaining issue though:
DESIRED BEHAVIOUR: When shutting down the server from the cmd window using CTRL + C, the server should save the game in the original save file (in my case, "dedicatedsave.zip")
OBSERVED BEHAVIOUR: Pressing CTRL + C shows the normal shutting down messages, but before the window closes there is "Terminate batch job <Y/N>?". Typing either Y or N has the same effect - the window closes, and the game is not saved (confirmed that modified date of save file does not change, and rehosted file to check for changes).
My launch script is
Code: Select all
Factorio.exe --start-server dedicatedsave.zip -c "%appdata%"\Factorio\config\config-server.ini --latency-ms 150
Here is my log:
Code: Select all
0.002 2016-04-11 14:34:06; Factorio 0.12.30 (Build 17998, win64, steam)
0.002 Operating system: Windows 7 Service Pack 1
0.002 Program arguments: "Factorio.exe" "--start-server" "dedicatedsave.zip" "-c" "C:\Users\alexander_q\AppData\Roaming\Factorio\config\config-server.ini" "--latency-ms" "150"
0.002 Read data path: N:/_Games/SteamLibrary/SteamApps/common/Factorio/data
0.002 Write data path: C:/Users/alexander_q/AppData/Roaming/Factorio/server
0.002 Binaries path: N:/_Games/SteamLibrary/SteamApps/common/Factorio/bin
0.012 Running in headless mode
0.296 Loading mod core 0.0.0 (data.lua)
0.299 Loading mod base 0.12.30 (data.lua)
0.351 Loading mod rso-mod 1.5.1 (data-updates.lua)
0.392 Loading mod WaiTex 1.0.0 (data-final-fixes.lua)
0.492 Checksum for core: 3711505753
0.493 Checksum for mod base: 2829195351
0.493 Checksum for mod rso-mod: 4065594479
0.493 Checksum for mod WaiTex: 3203424500
1.029 Factorio initialised
1.030 Info Router.cpp:509: Router peerID(65535) shutting down.
1.031 Info Router.cpp:536: Router state -> Disconnected
1.031 Info MultiplayerManager.cpp:913: networkTick(0) mapTick(-1) changing state from(Ready) to(PreparedToHostGame)
1.032 Info MultiplayerManager.cpp:913: networkTick(0) mapTick(-1) changing state from(PreparedToHostGame) to(CreatingGame)
1.033 Loading map C:/Users\alexander_q\AppData\Roaming\Factorio\server\saves\dedicatedsave.zip
1.061 Info Scenario.cpp:124: Map version 0.12.30-0
2.397 Checksum for script C:/Users/alexander_q/AppData/Roaming/Factorio/server/temp/currently-playing/control.lua: 393467729
2.407 Checksum for script __rso-mod__/control.lua: 2291904497
2.474 Info MultiplayerManager.cpp:282: 000000002804A960, 0000000000000000
2.474 Info WindowsUDPSocket.cpp:73: Opening socket at port (34197)
2.476 Info Router.cpp:536: Router state -> Connected
2.476 Info Synchronizer.cpp:54: NetworkTick(0) initialized Synchronizer local peer(0) latency(9).
2.476 Hosting game at port 34197, peerID 0, session magic 2463
2.476 Info MultiplayerManager.cpp:304: 000000002804A960, 000000002804A960
2.476 Info MultiplayerManager.cpp:913: networkTick(0) mapTick(16161022) changing state from(CreatingGame) to(InGame)
2.477 Info NetworkInputHandler.cpp:45: mapTick(16161022) networkTick(0) initialized NetworkInputHandler local peer(0).
2.644 Info MultiplayerManager.cpp:1433: Received peer info for peer(0) username(<server>).
2.645 Info MultiplayerManager.cpp:1060: networkTick(9) mapTick(16161022) received stateChanged peerID(0) oldState(Ready) newState(CreatingGame)
2.645 Info MultiplayerManager.cpp:1060: networkTick(9) mapTick(16161022) received stateChanged peerID(0) oldState(CreatingGame) newState(InGame)
14.380 Received SIGINT, shutting down
14.393 Info MultiplayerManager.cpp:134: NetworkTick(714) disconnecting multiplayer connection.
14.394 Info NetworkInputHandler.cpp:64: expectedMapTick(16161022) sending PlayerLeaveGame
14.543 Info MultiplayerManager.cpp:1477: Disconnect notification for peer (0)
14.544 Info MultiplayerManager.cpp:1010: networkTick(723) mapTick(16161022) removing peer(0) dropout(false)
14.544 Info MultiplayerManager.cpp:913: networkTick(723) mapTick(16161022) changing state from(InGame) to(InGameAligning)
14.545 Info MultiplayerManager.cpp:1719: networkTick(723) mapTick(16161022) starting mapAlign
14.545 Info MultiplayerManager.cpp:1633: networkTick(723) mapTick(16161022) adding mapAlignTask(RemovePlayerAlignTask)
14.693 Info MultiplayerManager.cpp:1060: networkTick(732) mapTick(16161022) received stateChanged peerID(0) oldState(InGame) newState(InGameAligning)
14.694 Info MultiplayerManager.cpp:1653: networkTick(732) mapTick(16161022) sending mapAlignAction
14.843 Info MultiplayerManager.cpp:1307: networkTick(741) mapTick(16161022) received MapAlignAction from peer(0), mapAlignTick(16161023) appliedTickClosuresCount(0)
14.844 Info MultiplayerManager.cpp:1735: networkTick(742) mapTick(16161022) mapAlign finished targetTick(16161023) updating map and running the tasks ...
14.845 Info MultiplayerManager.cpp:1607: networkTick(742) mapTick(16161022) peerID(0) fullStateLog: local state(InGameAligning) local peers(((peerID(0) state(InGameAligning) mapAlignTick(16161023))
)
14.869 Info MultiplayerManager.cpp:1754: maptick(16161023) crc before applying all ticks: -453922752
14.870 Info NetworkInputHandler.cpp:654: applyAllTickClosures: expectedMapTick(16161023) lastTickApplied(-1) referenceMapTick(16161023) networkTick(742)
14.871 Info NetworkInputHandler.cpp:678: applyAllTickClosures: applying tickClosure(tick(16161022) inputActions((MultiplayerInit) (SetAllowCommands) ) ) for peer(0)
14.872 Info MultiplayerManager.cpp:1762: maptick(16161023) crc after applying all ticks: 788996239
14.872 Info MultiplayerManager.cpp:913: networkTick(742) mapTick(16161023) changing state from(InGameAligning) to(InGameAligned)
15.010 Info MultiplayerManager.cpp:1060: networkTick(751) mapTick(16161023) received stateChanged peerID(0) oldState(InGameAligning) newState(InGameAligned)
15.011 Info MultiplayerManager.cpp:913: networkTick(751) mapTick(16161023) changing state from(InGameAligned) to(InGameWaitingForOthers)
15.160 Info MultiplayerManager.cpp:1060: networkTick(760) mapTick(16161023) received stateChanged peerID(0) oldState(InGameAligned) newState(InGameWaitingForOthers)
15.161 Info MultiplayerManager.cpp:1259: networkTick(760) mapTick(16161023) stopping mapAlign
15.162 Info MultiplayerManager.cpp:1785: performing map align task (RemovePlayerAlignTask)
15.162 Info MultiplayerManager.cpp:913: networkTick(760) mapTick(16161023) changing state from(InGameWaitingForOthers) to(Disconnecting)
15.162 Info MultiplayerManager.cpp:1607: networkTick(760) mapTick(16161023) peerID(0) fullStateLog: local state(Disconnecting) local peers(((peerID(0) state(InGameWaitingForOthers) mapAlignTick(-1))
)
15.627 Info MultiplayerManager.cpp:913: networkTick(788) mapTick(16161023) changing state from(Disconnecting) to(QuitScheduled)
15.628 Info MultiplayerManager.cpp:161: NetworkTick(788) quitting multiplayer connection.
15.628 Info MultiplayerManager.cpp:913: networkTick(788) mapTick(16161023) changing state from(QuitScheduled) to(Disconnected)
15.631 Warning NetworkInputHandler.cpp:749: mapTick(16161023) networkTick(788) disconnecting from player but already disconnected.
15.906 Info Router.cpp:509: Router peerID(0) shutting down.
15.907 Info WindowsUDPSocket.cpp:160: Socket closed
15.907 Info Router.cpp:536: Router state -> Disconnected
15.918 Goodbye
Re: Steam Dedicated Server
[quote="alexander_q"]
DESIRED BEHAVIOUR: When shutting down the server from the cmd window using CTRL + C, the server should save the game in the original save file (in my case, "dedicatedsave.zip")
0.12.30 has a bug, at least on linux preventing the server from saving on exit:
viewtopic.php?f=30&t=23342
fixed for the next release, until then you need to keep your autosaves running frequently
DESIRED BEHAVIOUR: When shutting down the server from the cmd window using CTRL + C, the server should save the game in the original save file (in my case, "dedicatedsave.zip")
0.12.30 has a bug, at least on linux preventing the server from saving on exit:
viewtopic.php?f=30&t=23342
fixed for the next release, until then you need to keep your autosaves running frequently
Hosting a factorio server? Take a look at this || init script ||.
Re: Steam Dedicated Server
What I did was I went to the config folder for factorio, copied the config file and named the copy as config-server. Then I changed the system-write-data_ to system-write-data_/server, just like you said. I also changed the port in the original config to 34198. Then I started up the bat file and then tried to start factorio from steam. SAME FUCKING RESPONSE.
Re: Steam Dedicated Server
Where do i start the server whith that parameter? You're not very specific
Re: Steam Dedicated Server
Code: Select all
0.002 2016-07-03 22:46:00; Factorio 0.12.35 (Build 18124, win64, alpha)
0.002 Operating system: Windows 8.1
0.003 Program arguments: "Factorio.exe" "--start-server" "Xoni.zip" "-c" "C:\Users\Egzon PC\AppData\Roaming\Factorio\config\config-server.ini"
0.003 Read data path: D:/Factorio/data
0.004 Write data path: C:/Users/Egzon PC/AppData/Roaming/Factorio/server
0.004 Binaries path: D:/Factorio/bin
0.029 Running in headless mode
0.034 Loading mod core 0.0.0 (data.lua)
0.042 Loading mod base 0.12.35 (data.lua)
0.162 Checksum for core: 3711505753
0.162 Checksum for mod base: 2829195351
0.607 Factorio initialised
0.608 Info Router.cpp:509: Router peerID(65535) shutting down.
0.610 Info Router.cpp:536: Router state -> Disconnected
0.610 Info MultiplayerManager.cpp:913: networkTick(0) mapTick(-1) changing state from(Ready) to(PreparedToHostGame)
0.610 Info MultiplayerManager.cpp:913: networkTick(0) mapTick(-1) changing state from(PreparedToHostGame) to(CreatingGame)
0.610 Loading map C:/Users\Egzon PC\AppData\Roaming\Factorio\server\saves\Xoni.zip
0.637 Error MultiplayerManager.cpp:110: MultiplayerManager failed: "Opening zip C:/Users/Egzon PC/AppData/Roaming/Factorio/server/saves/Xoni.zip failed"
0.638 Info MultiplayerManager.cpp:913: networkTick(0) mapTick(-1) changing state from(CreatingGame) to(InitializationFailed)
0.638 Error Main.cpp:340: Couldn't load the game for MP: Opening zip C:/Users/Egzon PC/AppData/Roaming/Factorio/server/saves/Xoni.zip failed
Re: Steam Dedicated Server
why cant i load my map correctly
-
- Manual Inserter
- Posts: 1
- Joined: Mon Jul 04, 2016 12:05 am
- Contact:
Re: Steam Dedicated Server
After trying to follow the steps on this Thread, I've run into the same problem. After a few hours I found out these steps that made it work for me:Xoni wrote:why cant i load my map correctly
1. Go to the "Factorio" folder in %Appdata%
2. Copy all files and folders (Except the "config" and "server" folder) and put them all into the "server" folder (Or any other folder you've set in the server .ini file)
3. Start the server again, and it should be fixed
If it still doesn't work, edit the "server.bat" file and set the save path to simply "YourSaveGame.zip". No need for the path there.
Re: Steam Dedicated Server
Works!!! Thank you soooo much...After trying to follow the steps on this Thread, I've run into the same problem. After a few hours I found out these steps that made it work for me:
1. Go to the "Factorio" folder in %Appdata%
2. Copy all files and folders (Except the "config" and "server" folder) and put them all into the "server" folder (Or any other folder you've set in the server .ini file)
3. Start the server again, and it should be fixed
If it still doesn't work, edit the "server.bat" file and set the save path to simply "YourSaveGame.zip". No need for the path there.