-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't start dedicated server loaging savedgame #4618
Comments
I found the issue in nightlies and can fix. The -host command resolves the path, the -dedicated does not. |
Hi, thank you, it's one of the approeaches I tried, but then, it loads the map, but ignores port specified. For example: java -Xms2048m -Xmx2048m -jar MegaMek.jar -dedicated ./savegames/Savedgame.sav.gz -port 3346 But then on megameklog.txt it shows that yes it loads the map but port is getting setted at random, doesn't use 3346 as especified for example. ######## 06:23:19,272 INFO [megamek.server.Server] {main} 06:23:19,272 INFO [megamek.server.Server] {main} 06:23:19,277 INFO [megamek.server.Server] {main} 06:23:19,277 INFO [megamek.server.Server] {Connection Listener} On Operating system you can see it was specified port 3346 but instead listening on 33993 root# ps -ef | grep 3346 <<<<<------- check PID of command executed root# netstat -pan | grep 279548 <<<<<-------- check port used by PID |
savegame should be last argument: -dedicated -port 3333 ./savegames/mysave.sav.gz |
Hi htank you, but using savegame path parameter on last argument it doesn't take (savegame) on account. Putting both cases down here (remember this is on megamek 0.48) Command: java -jar MegaMek.jar -dedicated -port 3346 ./savegames/WoM-Cliff.sav.gz 10:04:56,441 INFO [megamek.MegaMek] {main} 10:04:56,744 INFO [megamek.server.Server] {main} 10:04:56,748 INFO [megamek.server.Server] {main} 10:04:56,748 INFO [megamek.server.Server] {main} 10:04:56,753 INFO [megamek.server.Server] {Connection Listener} ################# Command: java -jar MegaMek.jar -dedicated ./savegames/WoM-Cliff.sav.gz -port 3346 10:09:11,245 INFO [megamek.MegaMek] {main} 10:09:11,553 INFO [megamek.server.Server] {main} 10:09:11,557 INFO [megamek.server.Server] {main} 10:09:11,557 INFO [megamek.server.Server] {main} 10:09:11,561 INFO [megamek.server.Server] {main} 10:09:11,561 INFO [megamek.server.Server] {Connection Listener} |
Hmm, OK, I guess I con't help you with 0.48, but I have submitted a fix to the development version that fixes this in the next release. |
Hi,
I'm currently running about 8 megamek server (4 on 0.48.0, 2 on 0.49.X, and 2 other on 0.49.latest) Each one iwth it's own configuration ports and such.
A user requested to run a new dedicated server wich automatically loads a savedgame. Looking on the description of the project...
It says:
If you want the dedicated server to load a saved game, supply the filename after the -dedicated switch, like this: "-dedicated savedgame.sav". To stop the server, you will need to tell the Java machine to halt execution, which is CTRL + C on most platforms.
Well, I'm working on megamek 0.48.0 and I'm trying to setup that server requested (which loads a saved game). And I'm unable to.
Command Tries / output:
TEST A
java -jar MegaMek.jar -dedicated savedgame.sav --> Seems to ignore savegame
java -jar MegaMek.jar -dedicated savedgame.sav.gz --> Seems to ignore savegame
java -jar MegaMek.jar -dedicated <full_path>/savedgame.sav --> Seems to ignore savegame
java -jar MegaMek.jar -dedicated <full_path>/savedgame.sav.gz --> Seems to ignore savegame
TEST B
java -jar MegaMek.jar -dedicated savedgame.sav -port 3346 --> Megameklog.txt says it is ignoring parameter -port and says it is unable to load savegame 3346
(and all it's variants playing with PATH/savegame file name report same behaviour)
(Extract from log)
##########
##########
13:58:59,081 INFO [megamek.server.Server] {main}
loadGame(), line 1325 : s: loading saved game file '3346'
13:58:59,081 INFO [megamek.server.Server] {Connection Listener}
run(), line 31558 : s: listening for clients...
13:58:59,082 ERROR [megamek.server.Server] {main}
loadGame(), line 1332 : Unable to load file: 3346
java.io.FileNotFoundException: 3346 (No such file or directory)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
at java.base/java.io.FileInputStream.(FileInputStream.java:157)
at megamek.server.Server.loadGame(Server.java:1328)
at megamek.server.Server.loadGame(Server.java:1310)
at megamek.server.DedicatedServer.start(DedicatedServer.java:57)
at megamek.MegaMek.startDedicatedServer(MegaMek.java:289)
##########
##########
TEST C
java -jar MegaMek.jar -dedicated -port 3346 savedgame.sav --> Megameklog.txt says it is ignoring savedgame
(and all it's variants playing with PATH/savegame file name report same behaviour)
(Extract from log)
##########
##########
14:18:29,639 INFO [megamek.server.Server] {main}
(), line 442 : s: starting a new server...
14:18:29,642 INFO [megamek.server.Server] {main}
(), line 459 : s: hostname = '' port = 3346
s: hosting on address = 127.0.1.1
14:18:29,642 INFO [megamek.server.Server] {main}
(), line 464 : s: password = null
14:18:29,647 INFO [megamek.server.Server] {Connection Listener}
run(), line 31558 : s: listening for clients...
##########
##########
The text was updated successfully, but these errors were encountered: