factoriotools / factorio-docker

Factorio headless server in a Docker container
https://hub.docker.com/r/factoriotools/factorio/
MIT License
888 stars 218 forks source link

krastorio 2 fails to load #419

Open davidfobar opened 2 years ago

davidfobar commented 2 years ago

I am successful in starting the map with all of the space exploration mods, however krastorio fails to load. Any thoughts on how to trouble shoot?

Fank commented 2 years ago

did you checked the logs?

davidfobar commented 2 years ago

I did, the current log file and the mod-list (as a txt) are attached.

Both show no mention of Krastorio2, even though I have Krastorio2_a.a.5.zip in the folder just like the other mods.

current.log mod-list.txt

nicolas-lang commented 2 years ago

The most recent K2 is called Krastorio2_1.1.6.zip, and afaik the mods json within the zip has a dependency on the zip-filename... Try re-downloading K2.

I would suggest to debug this issue locally without docker first. (Start with an empty mods folder, install all the required mods and use the factorio gameclient to generate valid mod settings and mod list, after you confirmed it works locally move to your container.)

P.S: Personally I prefer just uploading server-settings folder, mod-list.json, mod-settings.dat and the map.zip and letting the UPDATE_MODS_ON_START setting take care of collecting the correct individual mod files.

kustom06 commented 2 years ago

Hi, I got the same issue and in the log i can find this

2.080 Script @Krastorio2/lib/private/data-stages/utils/log.lua:102: Krastorio 2|LogLevel:WARNING 2.080 Script @Krastorio2/lib/private/data-stages/utils/log.lua:104: From Krastorio 2->file:Krastorio2/lib/private/data-stages/recipes.lua->function:findNotUnlockableRecipes->line:2060 2.080 Script @Krastorio2/lib/private/data-stages/utils/log.lua:111: Called in->file:...anilla-changes/optional/modify-science-packs-recipes.lua->line:23 2.081 Script @Krastorio2/lib/private/data-stages/utils/log.lua:113: Message: 'This recipes are not unlockable, maybe is an error: { "uranium-rounds-magazine", "nuclear-fuel", "imersite-rounds-magazine" } [from findNotUnlockableRecipes()]'

Factorio 1.1.48 flib 0.9.2 Krastorio2 1.1.16 Docker on synology dsm7 UPDATE_MODS_ON_START true

That's the only mods actvated. Did you have an idea to how to resolve ? thanks for answer

nicolas-lang commented 2 years ago

Did you try running everything locally un-containered with the same mods & settings ? If you get to the data stages it is rarely a container issue...

kustom06 commented 2 years ago

Hi , thanks for answer Yes this is running on my computer with the same mods without any problem. I also try to start a new game on the server but it's the same. I've copied the mods from my computer because i realize that the autoupdate don't work. If the .zip folder of mod is not present, the server is not starting.

nicolas-lang commented 2 years ago

I am using autoupdate with an AWS cloudformation docker-container successfully when I am just uploading settings and a modlist. Autoupdate has it's own issues but this is not one of them - it works even without mod-zips. I would start investigation if you have maybe an issue with the way your docker-factorio-config-folders are set up.

I would try the following:

kustom06 commented 2 years ago

Good Morning Sandro, Thank you for your help

I would try the following:

  • without mods: ensure that the generic config files are loaded (custom server name in server-settings.json)

That's working fine

  • pick the most simple mod you can find and ensure that the game is starting

RecipeBook and flib installed. for this test I deposit the .zip in the mods folder and i saw that the mod-list.json update at the shutdown of the server.

  • pick an older version of the simple mod and try using autoupdate

That's not working. I put an old version of recipebook and the serveur doesn't start. I set the environement varaible UPDATE_MODS_ON_START to false and the server is starting. So the problem is well the download of the mods update. For more security at docker installation, I created an user who have only whrites in the docker folder. Is that can be a problem ? Another think, I complete the login and the token variable in the server-setting.json file and not in the environment where the variable is not created. in attachement the log at sart

  • try K2 without autoupdate

D'ont work, same message in log tha in my previous message. in attachement the log at sart.

  • try K2 with autoupdate

no need to test i think

  • ... you should have found "something broken" at this point...

factorio-current.log

kustom06 commented 2 years ago

I just tried to change the PUID to an administrator user and the server don't start with UPDATE_MODS_ON_START set to true.

kustom06 commented 2 years ago

a question popped up in my mind while I was working: should I open any ports other than 34197 on the router?

kustom06 commented 2 years ago

OKKKK.... my mistake !!!! in the server-setting.json i entered my email instead of my username. I noticed this when I added this variable in the environment. Thanks a lot for your help who gave me a methodology to find the error. Best regards Kustom

Disorrder commented 2 years ago

@kustom06

I would try the following: without mods: ensure that the generic config files are loaded (custom server name in server-settings.json)

That's working fine

I have problems running save even without mods. How did you do that? Please, check this question #427