nextcloud / all-in-one

📦 The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.
https://hub.docker.com/r/nextcloud/all-in-one
GNU Affero General Public License v3.0
4.6k stars 553 forks source link

AIO 7.7.0 Fails to update #4309

Closed lvets closed 4 months ago

lvets commented 4 months ago

I've installed Nextcloud AIO on a docker rootless setup. I'm trying to update the mastercontainer by stopping all containers and then clicking "Update mastercontainer". This shows "Mastercontainer update currently running. It will restart the mastercontainer soon which will make it unavailable for a moment. Please wait until that's done. (Logs)" for a couple of seconds then goes back to the main AIO screen. Nothing seems to happen...

Steps to reproduce

  1. Stop containers.
  2. Click "Update mastercontainer"

Expected behavior

Mastercontainer is updated :)

Actual behavior

I've installed Nextcloud AIO on a docker rootless setup. I'm trying to update the mastercontainer by stopping all containers and then clicking "Update mastercontainer". This shows "Mastercontainer update currently running. It will restart the mastercontainer soon which will make it unavailable for a moment. Please wait until that's done. (Logs)" for a couple of seconds then goes back to the main AIO screen. Nothing seems to happen...

The logs show:

time="2024-03-03T22:07:00Z" level=debug msg="Sleeping for a second to ensure the docker api client has been properly initialized."
time="2024-03-03T22:07:01Z" level=debug msg="Making sure everything is sane before starting"
time="2024-03-03T22:07:01Z" level=info msg="Watchtower 1.7.1"
time="2024-03-03T22:07:01Z" level=info msg="Using no notifications"
time="2024-03-03T22:07:01Z" level=info msg="Only checking containers which name matches \"nextcloud-aio-mastercontainer\""
time="2024-03-03T22:07:01Z" level=info msg="Running a one time update."
time="2024-03-03T22:07:01Z" level=debug msg="Checking containers for updated images"
time="2024-03-03T22:07:01Z" level=debug msg="Retrieving running containers"
time="2024-03-03T22:07:01Z" level=error msg="Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x9fa4e2]

goroutine 1 [running]:
github.com/containrrr/watchtower/pkg/metrics.NewMetric({0x0, 0x0})
    /home/runner/work/watchtower/watchtower/pkg/metrics/metrics.go:31 +0x22
github.com/containrrr/watchtower/cmd.runUpdatesWithNotifications(0xc00031f490)
    /home/runner/work/watchtower/watchtower/cmd/root.go:377 +0x171
github.com/containrrr/watchtower/cmd.Run(0xc00031a300?, {0xc000332080?, 0x4?, 0x4?})
    /home/runner/work/watchtower/watchtower/cmd/root.go:168 +0x658
github.com/spf13/cobra.(*Command).execute(0xc00031a300, {0xc000138010, 0x4, 0x4})
    /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:987 +0xaa7
github.com/spf13/cobra.(*Command).ExecuteC(0xc00031a300)
    /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x417
github.com/spf13/cobra.(*Command).Execute(...)
    /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/containrrr/watchtower/cmd.Execute()
    /home/runner/work/watchtower/watchtower/cmd/root.go:75 +0x52
main.main()
    /home/runner/work/watchtower/watchtower/main.go:13 +0x17

Host OS

Ubuntu 22.04.4 LTS

Nextcloud AIO version

7.7.0

Current channel

latest

Other valuable info

I also tried to do the steps in https://github.com/nextcloud/all-in-one/blob/main/manual-upgrade.md, but with docker run --rm -v /run/user/1001/docker.sock:/var/run/docker.sock:ro assaflavie/runlike -p nextcloud-aio-nextcloud >> /tmp/nextcloud-aio-nextcloud instead of sudo docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike -p nextcloud-aio-nextcloud >> /tmp/nextcloud-aio-nextcloud.

szaimen commented 4 months ago
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x9fa4e2]

goroutine 1 [running]:
github.com/containrrr/watchtower/pkg/metrics.NewMetric({0x0, 0x0})
  /home/runner/work/watchtower/watchtower/pkg/metrics/metrics.go:31 +0x22
github.com/containrrr/watchtower/cmd.runUpdatesWithNotifications(0xc00031f490)
  /home/runner/work/watchtower/watchtower/cmd/root.go:377 +0x171
github.com/containrrr/watchtower/cmd.Run(0xc00031a300?, {0xc000332080?, 0x4?, 0x4?})
  /home/runner/work/watchtower/watchtower/cmd/root.go:168 +0x658
github.com/spf13/cobra.(*Command).execute(0xc00031a300, {0xc000138010, 0x4, 0x4})
  /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:987 +0xaa7
github.com/spf13/cobra.(*Command).ExecuteC(0xc00031a300)
  /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x417
github.com/spf13/cobra.(*Command).Execute(...)
  /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/containrrr/watchtower/cmd.Execute()
  /home/runner/work/watchtower/watchtower/cmd/root.go:75 +0x52
main.main()
  /home/runner/work/watchtower/watchtower/main.go:13 +0x17

Hi, this looks like a bug in watchtower. Please report this to https://github.com/containrrr/watchtower. Thanks!