factoriotools / factorio-docker

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

Error on Server load with latest docker image #411

Closed leouzz closed 2 years ago

leouzz commented 2 years ago

fail to load the game 0.000 Error Util.cpp:83: filesystem error: cannot make canonical path: Operation not permitted [/opt/factorio/bin/x64/../../config/config.ini]

s-bauer commented 2 years ago

Having the same issue!

ianchak commented 2 years ago

Is there any fix for this issue?

Fank commented 2 years ago

Will look into this tomorrow

AgenttiX commented 2 years ago

We're having the same issue as well. The save worked fine in 1.1.38, and we're using the following mods:

Unfortunately it seems that a new autosave is created every time the server crashes, and therefore our old autosaves have been overwritten with 1.1.39 ones, so we can't continue playing by reverting to an older version, as the 1.1.39 saves can't be loaded in 1.1.38. Therefore it might be a good idea to add such a feature to the container that it would create a copy of the saves directory when it detects that it has been updated. (Our container was accidentally updated automatically by an unrelated Ouroboros container running on the same host, so we didn't manage to create backups before the upgrade.)

Here's our docker-compose.yml.

version: "3"
services:
  factorio:
    image: factoriotools/factorio
    ports:
      - "34197:34197/udp"
      - "27015:27015/tcp"
    volumes:
      - "./data:/factorio"
    restart: always
MacaroonCookie commented 2 years ago

I'm having the same issue. The error I am receiving is (full logs found in Pastebin):

sg-factorio |    0.000 Error Util.cpp:83: filesystem error: cannot make canonical path: Operation not permitted [/opt/factorio/bin/x64/../../config/config.ini]

I'm running:

I have reproduced the error by using an existing save, and by attempting to generate a new save using the following Docker Compose file:

version: "3.3"
services:
    factorio:
        container_name: sg-factorio
        image: factoriotools/factorio:stable
        restart: unless-stopped
        ports:
            - "34197:34197/udp"
            - "27015:27015/tcp"
        volumes:
            - "/opt/factorio:/factorio"
        environment:
            SAVE_NAME: testsave
            GENERATE_NEW_SAVE: 'true'
            LOAD_LATEST_SAVE: 'false'

Actions I have taken:

MacaroonCookie commented 2 years ago

I did some testing, it looks like there is an issue with parsing relative paths and symlinks in the Docker image frolvlad/alpine-glibc:alpine-3.13+. I was able to resolve the errors by switching the Docker image back to frolvlad/alpine-glibc:alpine-3.12

Fank commented 2 years ago

Thx, patching dow is easy

Fank commented 2 years ago

I am sure its causes by https://github.com/factoriotools/factorio-docker/pull/410

Fank commented 2 years ago

The commit is reverted, can you please check again if this works now?
There is still an open issue to chang the base image to debian, which may fix all of this stuff in the future https://github.com/factoriotools/factorio-docker/issues/402

mishugashu commented 2 years ago

Not OP, but I was having this problem yesterday and now I am not!

ianchak commented 2 years ago

I can confirm, it is working now.