OpenFactorioServerManager / factorio-server-manager

A tool to help manage Factorio multiplayer servers including mods and save games.
MIT License
541 stars 130 forks source link

Error while starting Docker container #251

Closed BobWhite2017 closed 3 years ago

BobWhite2017 commented 3 years ago

I get the following errors when trying to start the docker container using the docker-compose.simple.yaml I have tried multiple different directories with no change in the error. This error just loops, restarting the container doesnt fix it either.

2021/01/30 19:55:46 Loaded Factorio settings from /opt/factorio/config/server-settings.json
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xf0 pc=0x76630a]

goroutine 1 [running]:
net/http.(*Request).Context(...)
        /opt/hostedtoolcache/go/1.14.13/x64/src/net/http/request.go:339
github.com/gorilla/sessions.GetRegistry(0x0, 0xc0000f1460)
        /home/runner/go/pkg/mod/github.com/gorilla/sessions@v1.2.0/sessions.go:110 +0x3a
github.com/gorilla/sessions.(*CookieStore).Get(0xc00000fa00, 0x0, 0x989fec, 0x4, 0xc0000a4028, 0xc0000a4028, 0xc0000f1520)
        /home/runner/go/pkg/mod/github.com/gorilla/sessions@v1.2.0/store.go:77 +0x2b
github.com/apexskier/httpauth.Authorizer.Update(0xc00000fa00, 0xa52ca0, 0xc00000f9e0, 0x98a108, 0x4, 0xc00006c5d0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/runner/go/pkg/mod/github.com/apexskier/httpauth@v1.3.2/auth.go:220 +0x68c
github.com/mroote/factorio-server-manager/api.(*AuthHTTP).CreateOrUpdateUser(0xc0000da190, 0x0, 0x0, 0x0, 0x0, 0x98a2ee, 0x5, 0x0, 0x0, 0x0, ...)
        /home/runner/work/factorio-server-manager/factorio-server-manager/src/api/auth.go:69 +0x353
github.com/mroote/factorio-server-manager/api.GetAuth.func1()
        /home/runner/work/factorio-server-manager/factorio-server-manager/src/api/auth.go:32 +0x168
sync.(*Once).doSlow(0xddb0a0, 0x9ae768)
        /opt/hostedtoolcache/go/1.14.13/x64/src/sync/once.go:66 +0xec
sync.(*Once).Do(...)
        /opt/hostedtoolcache/go/1.14.13/x64/src/sync/once.go:57
github.com/mroote/factorio-server-manager/api.GetAuth(0x0)
        /home/runner/work/factorio-server-manager/factorio-server-manager/src/api/auth.go:28 +0x59
main.main()
        /home/runner/work/factorio-server-manager/factorio-server-manager/src/main.go:27 +0x10d
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   447  100   447    0     0    697      0 --:--:-- --:--:-- --:--:--   697

Docker Info:

Client: Docker Engine - Community
 Version:           20.10.2
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        2291f61
 Built:             Mon Dec 28 16:17:43 2020
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.2
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       8891c58
  Built:            Mon Dec 28 16:15:19 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.3
  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Host Info:

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal
knoxfighter commented 3 years ago

The used code is not up to date anymore. I will not fix this, the subsystem was completely rewritten. We currently are planning to create a new pre-release with the rework next week. To get the new version faster, use the docker image ofsm/ofsm:develop (where the newest successful develop build is pushed to).

BobWhite2017 commented 3 years ago

Thanks, I think that's a fair answer and I would agree its not worth fixing if you already rewrote that subsystem. I am having a new issue just getting logged into the manager using the developer branch, but I will open a new issue for that if it doesn't exist already.