Skip to content
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

error and container crash #740

Closed
spupuz opened this issue Jan 5, 2021 · 10 comments
Closed

error and container crash #740

spupuz opened this issue Jan 5, 2021 · 10 comments

Comments

@spupuz
Copy link

spupuz commented Jan 5, 2021

got this error when using the command docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once

root@openmediavault:~# docker run --rm     -v /var/run/docker.sock:/var/run/docker.sock     containrrr/watchtower     --run-once
Unable to find image 'containrrr/watchtower:latest' locally
latest: Pulling from containrrr/watchtower
221196c09472: Pull complete
e5a79688da17: Pull complete
2f5396a7cd15: Pull complete
Digest: sha256:daf7034c5c89775afe3008393ae033529913548243b84926931d7c84398ecda7
Status: Downloaded newer image for containrrr/watchtower:latest
time="2021-01-05T13:01:58Z" level=info msg="Running a one time update."
time="2021-01-05T13:01:59Z" level=warning msg="Failed to retrieve container image info: Error: No such image: sha256:d72bc7b330dea0ff83a638b596234ff1380423de8dda80d656fa8df22c06e215"
time="2021-01-05T13:02:03Z" level=info msg="Found new reallibrephotos/librephotos:dev image (sha256:60664514fdc11e87fb97157f4fd93f2c1a466a2129ecffaff25d9f3fee0f3b26)"
time="2021-01-05T13:02:10Z" level=info msg="Found new photoprism/photoprism:latest image (sha256:a79c3846b404dc67572a7790310d0a136c7b9167fb23bf226b1ce6945d69f060)"
time="2021-01-05T13:02:13Z" level=info msg="Found new hotio/ombi:testing image (sha256:760d1e76cc168f983b71f418b83673d87b5e28943f6bd9c914b3ec5e2ed63544)"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x9a5664]

goroutine 1 [running]:
github.com/containrrr/watchtower/pkg/registry/digest.CompareDigest(0xd32c00, 0xc00054ec40, 0x0, 0x0, 0x0, 0x0, 0x0)
        /home/circleci/repo/pkg/registry/digest/digest.go:41 +0x1e4
github.com/containrrr/watchtower/pkg/container.dockerClient.PullImage(0xd373e0, 0xc0003a6600, 0x1, 0xd28820, 0xc000036040, 0x410000, 0xc0004d1b60, 0x0, 0x0, 0x0)
        /home/circleci/repo/pkg/container/client.go:297 +0x497
github.com/containrrr/watchtower/pkg/container.dockerClient.IsContainerStale(0xd373e0, 0xc0003a6600, 0x1, 0xc000360000, 0xc0004d1b60, 0x0, 0xc0000a02a0, 0xc574e4, 0x2b)
        /home/circleci/repo/pkg/container/client.go:251 +0x9e
github.com/containrrr/watchtower/internal/actions.Update(0xd2f940, 0xc0003c4480, 0xc000393d90, 0x0, 0x2540be400, 0x0, 0xc00025fcd0, 0x757aa5)
        /home/circleci/repo/internal/actions/update.go:30 +0x18f
github.com/containrrr/watchtower/cmd.runUpdatesWithNotifications(0xc000393d90)
        /home/circleci/repo/cmd/root.go:231 +0xbe
github.com/containrrr/watchtower/cmd.Run(0x1134b80, 0xc000393d30, 0x0, 0x1)
        /home/circleci/repo/cmd/root.go:148 +0x15a
github.com/spf13/cobra.(*Command).execute(0x1134b80, 0xc00000c070, 0x1, 0x1, 0x1134b80, 0xc00000c070)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:766 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0x1134b80, 0x406325, 0xc000100058, 0x0)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x2fe
github.com/spf13/cobra.(*Command).Execute(...)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:800
github.com/containrrr/watchtower/cmd.Execute()
        /home/circleci/repo/cmd/root.go:57 +0x31
main.main()
        /home/circleci/repo/main.go:13 +0x25

@github-actions
Copy link

github-actions bot commented Jan 5, 2021

Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏

@spupuz
Copy link
Author

spupuz commented Jan 5, 2021

root@openmediavault:~# docker login
Authenticating with existing credentials...
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
root@openmediavault:~# docker run --rm     -v /var/run/docker.sock:/var/run/docker.sock     containrrr/watchtower:latest-dev     --run-once --debug
time="2021-01-05T13:52:49Z" level=debug
time="2021-01-05T13:52:49Z" level=info msg="Running a one time update."
time="2021-01-05T13:52:49Z" level=debug msg="Checking containers for updated images"
time="2021-01-05T13:52:49Z" level=debug msg="Retrieving running containers"
time="2021-01-05T13:52:49Z" level=warning msg="Failed to retrieve container image info: Error: No such image: sha256:d72bc7b330dea0ff83a638b596234ff1380423de8dda80d656fa8df22c06e215"
time="2021-01-05T13:52:49Z" level=debug msg="Trying to load authentication credentials." container=/admiring_swanson image="containrrr/watchtower:latest-dev"
time="2021-01-05T13:52:49Z" level=debug msg="No credentials for containrrr found" config_file=/config.json
time="2021-01-05T13:52:49Z" level=debug msg="Got image name: containrrr/watchtower:latest-dev"
time="2021-01-05T13:52:49Z" level=debug msg="Checking if pull is needed" container=/admiring_swanson image="containrrr/watchtower:latest-dev"
time="2021-01-05T13:52:49Z" level=debug msg="Building challenge URL" URL="https://index.docker.io/v2/"
time="2021-01-05T13:52:50Z" level=debug msg="Got response to challenge request" header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\"" status="401 Unauthorized"
time="2021-01-05T13:52:50Z" level=debug msg="Checking challenge header content" realm="https://auth.docker.io/token" service=registry.docker.io
time="2021-01-05T13:52:50Z" level=debug msg="Setting scope for auth token" image=containrrr/watchtower scope="repository:containrrr/watchtower:pull"
time="2021-01-05T13:52:50Z" level=debug msg="No credentials found."
time="2021-01-05T13:52:50Z" level=debug msg="Parsing image ref" host=index.docker.io image=containrrr/watchtower normalized="docker.io/containrrr/watchtower:latest-dev" tag=latest-dev
time="2021-01-05T13:52:50Z" level=debug msg="Doing a HEAD request to fetch a digest" url="https://index.docker.io/v2/containrrr/watchtower/manifests/latest-dev"
time="2021-01-05T13:52:51Z" level=debug msg="Found a remote digest to compare with" remote="sha256:270c429965d51dddaa8db9ae4a22f919ac35b47eafe7e0c4a0b5fb39ee497ad4"
time="2021-01-05T13:52:51Z" level=debug msg=Comparing local="sha256:270c429965d51dddaa8db9ae4a22f919ac35b47eafe7e0c4a0b5fb39ee497ad4" remote="sha256:270c429965d51dddaa8db9ae4a22f919ac35b47eafe7e0c4a0b5fb39ee497ad4"
time="2021-01-05T13:52:51Z" level=debug msg="Found a match"
time="2021-01-05T13:52:51Z" level=debug msg="No pull needed. Skipping image."
time="2021-01-05T13:52:51Z" level=debug msg="No new images found for /admiring_swanson"
time="2021-01-05T13:52:51Z" level=debug msg="Trying to load authentication credentials." container=/ombi image="hotio/ombi:testing"
time="2021-01-05T13:52:51Z" level=debug msg="No credentials for hotio found" config_file=/config.json
time="2021-01-05T13:52:51Z" level=debug msg="Got image name: hotio/ombi:testing"
time="2021-01-05T13:52:51Z" level=debug msg="Checking if pull is needed" container=/ombi image="hotio/ombi:testing"
time="2021-01-05T13:52:51Z" level=debug msg="Building challenge URL" URL="https://index.docker.io/v2/"
time="2021-01-05T13:52:51Z" level=debug msg="Got response to challenge request" header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\"" status="401 Unauthorized"
time="2021-01-05T13:52:51Z" level=debug msg="Checking challenge header content" realm="https://auth.docker.io/token" service=registry.docker.io
time="2021-01-05T13:52:51Z" level=debug msg="Setting scope for auth token" image=hotio/ombi scope="repository:hotio/ombi:pull"
time="2021-01-05T13:52:51Z" level=debug msg="No credentials found."
time="2021-01-05T13:52:51Z" level=debug msg="Parsing image ref" host=index.docker.io image=hotio/ombi normalized="docker.io/hotio/ombi:testing" tag=testing
time="2021-01-05T13:52:51Z" level=debug msg="Doing a HEAD request to fetch a digest" url="https://index.docker.io/v2/hotio/ombi/manifests/testing"
time="2021-01-05T13:52:52Z" level=debug msg="Found a remote digest to compare with" remote="sha256:3025e7766fa50ddddda560340fad57c1575671d168e55c7225411ceae54036b5"
time="2021-01-05T13:52:52Z" level=debug msg=Comparing local="sha256:3025e7766fa50ddddda560340fad57c1575671d168e55c7225411ceae54036b5" remote="sha256:3025e7766fa50ddddda560340fad57c1575671d168e55c7225411ceae54036b5"
time="2021-01-05T13:52:52Z" level=debug msg="Found a match"
time="2021-01-05T13:52:52Z" level=debug msg="No pull needed. Skipping image."
time="2021-01-05T13:52:52Z" level=debug msg="No new images found for /ombi"
time="2021-01-05T13:52:52Z" level=debug msg="Trying to load authentication credentials." container=/librephotos-backend image="reallibrephotos/librephotos:dev"
time="2021-01-05T13:52:52Z" level=debug msg="No credentials for reallibrephotos found" config_file=/config.json
time="2021-01-05T13:52:52Z" level=debug msg="Got image name: reallibrephotos/librephotos:dev"
time="2021-01-05T13:52:52Z" level=debug msg="Checking if pull is needed" container=/librephotos-backend image="reallibrephotos/librephotos:dev"
time="2021-01-05T13:52:52Z" level=debug msg="Building challenge URL" URL="https://index.docker.io/v2/"
time="2021-01-05T13:52:53Z" level=debug msg="Got response to challenge request" header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\"" status="401 Unauthorized"
time="2021-01-05T13:52:53Z" level=debug msg="Checking challenge header content" realm="https://auth.docker.io/token" service=registry.docker.io
time="2021-01-05T13:52:53Z" level=debug msg="Setting scope for auth token" image=reallibrephotos/librephotos scope="repository:reallibrephotos/librephotos:pull"
time="2021-01-05T13:52:53Z" level=debug msg="No credentials found."
time="2021-01-05T13:52:53Z" level=debug msg="Parsing image ref" host=index.docker.io image=reallibrephotos/librephotos normalized="docker.io/reallibrephotos/librephotos:dev" tag=dev
time="2021-01-05T13:52:53Z" level=debug msg="Doing a HEAD request to fetch a digest" url="https://index.docker.io/v2/reallibrephotos/librephotos/manifests/dev"
time="2021-01-05T13:52:53Z" level=debug msg="Found a remote digest to compare with" remote="sha256:d68e7625f4f20824f560ce6ab3913084f9dc7aa369bb018e2499495d5bc05609"
time="2021-01-05T13:52:53Z" level=debug msg=Comparing local="sha256:651335a9bf4b894eedb3e723d653b781d8baae7b28f30cbbe5213d3cf18f6ff4" remote="sha256:d68e7625f4f20824f560ce6ab3913084f9dc7aa369bb018e2499495d5bc05609"
time="2021-01-05T13:52:53Z" level=debug msg="Digests did not match, doing a pull."
time="2021-01-05T13:52:53Z" level=debug msg="Pulling image" container=/librephotos-backend image="reallibrephotos/librephotos:dev"
time="2021-01-05T13:52:55Z" level=info msg="Found new reallibrephotos/librephotos:dev image (sha256:60664514fdc11e87fb97157f4fd93f2c1a466a2129ecffaff25d9f3fee0f3b26)"
time="2021-01-05T13:52:55Z" level=debug msg="Trying to load authentication credentials." container=/librephotos-proxy image="reallibrephotos/librephotos-proxy:dev"
time="2021-01-05T13:52:55Z" level=debug msg="No credentials for reallibrephotos found" config_file=/config.json
time="2021-01-05T13:52:55Z" level=debug msg="Got image name: reallibrephotos/librephotos-proxy:dev"
time="2021-01-05T13:52:55Z" level=debug msg="Checking if pull is needed" container=/librephotos-proxy image="reallibrephotos/librephotos-proxy:dev"
time="2021-01-05T13:52:55Z" level=debug msg="Building challenge URL" URL="https://index.docker.io/v2/"
time="2021-01-05T13:52:55Z" level=debug msg="Got response to challenge request" header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\"" status="401 Unauthorized"
time="2021-01-05T13:52:55Z" level=debug msg="Checking challenge header content" realm="https://auth.docker.io/token" service=registry.docker.io
time="2021-01-05T13:52:55Z" level=debug msg="Setting scope for auth token" image=reallibrephotos/librephotos-proxy scope="repository:reallibrephotos/librephotos-proxy:pull"
time="2021-01-05T13:52:55Z" level=debug msg="No credentials found."
time="2021-01-05T13:52:55Z" level=debug msg="Parsing image ref" host=index.docker.io image=reallibrephotos/librephotos-proxy normalized="docker.io/reallibrephotos/librephotos-proxy:dev" tag=dev
time="2021-01-05T13:52:55Z" level=debug msg="Doing a HEAD request to fetch a digest" url="https://index.docker.io/v2/reallibrephotos/librephotos-proxy/manifests/dev"
time="2021-01-05T13:52:56Z" level=debug msg="Found a remote digest to compare with" remote="sha256:353fd5730396640d9ab490f6681540eaa35dd91960817c8a159ace3ce6f12e23"
time="2021-01-05T13:52:56Z" level=debug msg=Comparing local="sha256:353fd5730396640d9ab490f6681540eaa35dd91960817c8a159ace3ce6f12e23" remote="sha256:353fd5730396640d9ab490f6681540eaa35dd91960817c8a159ace3ce6f12e23"
time="2021-01-05T13:52:56Z" level=debug msg="Found a match"
time="2021-01-05T13:52:56Z" level=debug msg="No pull needed. Skipping image."
time="2021-01-05T13:52:56Z" level=debug msg="No new images found for /librephotos-proxy"
time="2021-01-05T13:52:56Z" level=debug msg="Trying to load authentication credentials." container=/librephotos-db image="postgres:latest"
time="2021-01-05T13:52:56Z" level=debug msg="No credentials for postgres:latest found" config_file=/config.json
time="2021-01-05T13:52:56Z" level=debug msg="Got image name: postgres:latest"
time="2021-01-05T13:52:56Z" level=debug msg="Checking if pull is needed" container=/librephotos-db image="postgres:latest"
time="2021-01-05T13:52:56Z" level=debug msg="Building challenge URL" URL="https://index.docker.io/v2/"
time="2021-01-05T13:52:56Z" level=debug msg="Got response to challenge request" header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\"" status="401 Unauthorized"
time="2021-01-05T13:52:56Z" level=debug msg="Checking challenge header content" realm="https://auth.docker.io/token" service=registry.docker.io
time="2021-01-05T13:52:56Z" level=debug msg="Setting scope for auth token" image=postgres scope="repository:library/postgres:pull"
time="2021-01-05T13:52:56Z" level=debug msg="No credentials found."
time="2021-01-05T13:52:56Z" level=debug msg="Parsing image ref" host=index.docker.io image=postgres normalized="docker.io/library/postgres:latest" tag=latest
time="2021-01-05T13:52:56Z" level=debug msg="Doing a HEAD request to fetch a digest" url="https://index.docker.io/v2/library/postgres/manifests/latest"
time="2021-01-05T13:52:57Z" level=debug msg="Found a remote digest to compare with" remote="sha256:a160a47b02773829c9927b1a85561e138f71f52ca7a517c309773c1c44137c1e"
time="2021-01-05T13:52:57Z" level=debug msg=Comparing local="sha256:a160a47b02773829c9927b1a85561e138f71f52ca7a517c309773c1c44137c1e" remote="sha256:a160a47b02773829c9927b1a85561e138f71f52ca7a517c309773c1c44137c1e"
time="2021-01-05T13:52:57Z" level=debug msg="Found a match"
time="2021-01-05T13:52:57Z" level=debug msg="No pull needed. Skipping image."
time="2021-01-05T13:52:57Z" level=debug msg="No new images found for /librephotos-db"
time="2021-01-05T13:52:57Z" level=debug msg="Trying to load authentication credentials." container=/librephotos-frontend image="reallibrephotos/librephotos-frontend:dev"
time="2021-01-05T13:52:57Z" level=debug msg="No credentials for reallibrephotos found" config_file=/config.json
time="2021-01-05T13:52:57Z" level=debug msg="Got image name: reallibrephotos/librephotos-frontend:dev"
time="2021-01-05T13:52:57Z" level=debug msg="Checking if pull is needed" container=/librephotos-frontend image="reallibrephotos/librephotos-frontend:dev"
time="2021-01-05T13:52:57Z" level=debug msg="Building challenge URL" URL="https://index.docker.io/v2/"
time="2021-01-05T13:52:57Z" level=debug msg="Got response to challenge request" header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\"" status="401 Unauthorized"
time="2021-01-05T13:52:57Z" level=debug msg="Checking challenge header content" realm="https://auth.docker.io/token" service=registry.docker.io
time="2021-01-05T13:52:57Z" level=debug msg="Setting scope for auth token" image=reallibrephotos/librephotos-frontend scope="repository:reallibrephotos/librephotos-frontend:pull"
time="2021-01-05T13:52:57Z" level=debug msg="No credentials found."
time="2021-01-05T13:52:57Z" level=debug msg="Parsing image ref" host=index.docker.io image=reallibrephotos/librephotos-frontend normalized="docker.io/reallibrephotos/librephotos-frontend:dev" tag=dev
time="2021-01-05T13:52:57Z" level=debug msg="Doing a HEAD request to fetch a digest" url="https://index.docker.io/v2/reallibrephotos/librephotos-frontend/manifests/dev"
time="2021-01-05T13:52:58Z" level=debug msg="Found a remote digest to compare with" remote="sha256:e8ffaa04a9ad818fa1b626dac469e14eaf4a62adf9cb93322d40b73fbc9b9f99"
time="2021-01-05T13:52:58Z" level=debug msg=Comparing local="sha256:e8ffaa04a9ad818fa1b626dac469e14eaf4a62adf9cb93322d40b73fbc9b9f99" remote="sha256:e8ffaa04a9ad818fa1b626dac469e14eaf4a62adf9cb93322d40b73fbc9b9f99"
time="2021-01-05T13:52:58Z" level=debug msg="Found a match"
time="2021-01-05T13:52:58Z" level=debug msg="No pull needed. Skipping image."
time="2021-01-05T13:52:58Z" level=debug msg="No new images found for /librephotos-frontend"
time="2021-01-05T13:52:58Z" level=debug msg="Trying to load authentication credentials." container=/librephotos-redis image="redis:alpine"
time="2021-01-05T13:52:58Z" level=debug msg="No credentials for redis:alpine found" config_file=/config.json
time="2021-01-05T13:52:58Z" level=debug msg="Got image name: redis:alpine"
time="2021-01-05T13:52:58Z" level=debug msg="Checking if pull is needed" container=/librephotos-redis image="redis:alpine"
time="2021-01-05T13:52:58Z" level=debug msg="Building challenge URL" URL="https://index.docker.io/v2/"
time="2021-01-05T13:52:58Z" level=debug msg="Got response to challenge request" header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\"" status="401 Unauthorized"
time="2021-01-05T13:52:58Z" level=debug msg="Checking challenge header content" realm="https://auth.docker.io/token" service=registry.docker.io
time="2021-01-05T13:52:58Z" level=debug msg="Setting scope for auth token" image=redis scope="repository:library/redis:pull"
time="2021-01-05T13:52:58Z" level=debug msg="No credentials found."
time="2021-01-05T13:52:59Z" level=debug msg="Parsing image ref" host=index.docker.io image=redis normalized="docker.io/library/redis:alpine" tag=alpine
time="2021-01-05T13:52:59Z" level=debug msg="Doing a HEAD request to fetch a digest" url="https://index.docker.io/v2/library/redis/manifests/alpine"
time="2021-01-05T13:52:59Z" level=debug msg="Found a remote digest to compare with" remote="sha256:68d4030e07912c418332ba6fdab4ac69f0293d9b1daaed4f1f77bdeb0a5eb048"
time="2021-01-05T13:52:59Z" level=debug msg=Comparing local="sha256:68d4030e07912c418332ba6fdab4ac69f0293d9b1daaed4f1f77bdeb0a5eb048" remote="sha256:68d4030e07912c418332ba6fdab4ac69f0293d9b1daaed4f1f77bdeb0a5eb048"
time="2021-01-05T13:52:59Z" level=debug msg="Found a match"
time="2021-01-05T13:52:59Z" level=debug msg="No pull needed. Skipping image."
time="2021-01-05T13:52:59Z" level=debug msg="No new images found for /librephotos-redis"
time="2021-01-05T13:52:59Z" level=debug msg="Trying to load authentication credentials." container=/photoprism_photoprism_1 image="photoprism/photoprism:latest"
time="2021-01-05T13:52:59Z" level=debug msg="No credentials for photoprism found" config_file=/config.json
time="2021-01-05T13:52:59Z" level=debug msg="Got image name: photoprism/photoprism:latest"
time="2021-01-05T13:52:59Z" level=debug msg="Checking if pull is needed" container=/photoprism_photoprism_1 image="photoprism/photoprism:latest"
time="2021-01-05T13:52:59Z" level=debug msg="Building challenge URL" URL="https://index.docker.io/v2/"
time="2021-01-05T13:53:00Z" level=debug msg="Got response to challenge request" header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\"" status="401 Unauthorized"
time="2021-01-05T13:53:00Z" level=debug msg="Checking challenge header content" realm="https://auth.docker.io/token" service=registry.docker.io
time="2021-01-05T13:53:00Z" level=debug msg="Setting scope for auth token" image=photoprism/photoprism scope="repository:photoprism/photoprism:pull"
time="2021-01-05T13:53:00Z" level=debug msg="No credentials found."
time="2021-01-05T13:53:00Z" level=debug msg="Parsing image ref" host=index.docker.io image=photoprism/photoprism normalized="docker.io/photoprism/photoprism:latest" tag=latest
time="2021-01-05T13:53:00Z" level=debug msg="Doing a HEAD request to fetch a digest" url="https://index.docker.io/v2/photoprism/photoprism/manifests/latest"
time="2021-01-05T13:53:00Z" level=debug msg="Found a remote digest to compare with" remote="sha256:a436d53e9675bc224b7aab1bb05b2623f02516d22927e8679956efc637fdeeea"
time="2021-01-05T13:53:00Z" level=debug msg=Comparing local="sha256:12eab72512a4b3813a9bd1fbab2040c35ab88d514321d3abe0754de3c9a17d87" remote="sha256:a436d53e9675bc224b7aab1bb05b2623f02516d22927e8679956efc637fdeeea"
time="2021-01-05T13:53:00Z" level=debug msg="Digests did not match, doing a pull."
time="2021-01-05T13:53:00Z" level=debug msg="Pulling image" container=/photoprism_photoprism_1 image="photoprism/photoprism:latest"
time="2021-01-05T13:53:02Z" level=info msg="Found new photoprism/photoprism:latest image (sha256:a79c3846b404dc67572a7790310d0a136c7b9167fb23bf226b1ce6945d69f060)"
time="2021-01-05T13:53:02Z" level=debug msg="Trying to load authentication credentials." container=/netdata image="netdata/netdata:latest"
time="2021-01-05T13:53:02Z" level=debug msg="No credentials for netdata found" config_file=/config.json
time="2021-01-05T13:53:02Z" level=debug msg="Got image name: netdata/netdata:latest"
time="2021-01-05T13:53:02Z" level=debug msg="Checking if pull is needed" container=/netdata image="netdata/netdata:latest"
time="2021-01-05T13:53:02Z" level=debug msg="Building challenge URL" URL="https://index.docker.io/v2/"
time="2021-01-05T13:53:02Z" level=debug msg="Got response to challenge request" header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\"" status="401 Unauthorized"
time="2021-01-05T13:53:02Z" level=debug msg="Checking challenge header content" realm="https://auth.docker.io/token" service=registry.docker.io
time="2021-01-05T13:53:02Z" level=debug msg="Setting scope for auth token" image=netdata/netdata scope="repository:netdata/netdata:pull"
time="2021-01-05T13:53:02Z" level=debug msg="No credentials found."
time="2021-01-05T13:53:02Z" level=debug msg="Parsing image ref" host=index.docker.io image=netdata/netdata normalized="docker.io/netdata/netdata:latest" tag=latest
time="2021-01-05T13:53:02Z" level=debug msg="Doing a HEAD request to fetch a digest" url="https://index.docker.io/v2/netdata/netdata/manifests/latest"
time="2021-01-05T13:53:03Z" level=debug msg="Found a remote digest to compare with" remote="sha256:ad305de774f5c2d903dae257efbd97082c29aa79e5a4f61216fcdd79af54db60"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x9a55a4]

goroutine 1 [running]:
github.com/containrrr/watchtower/pkg/registry/digest.CompareDigest(0xd32be0, 0xc0001e0cc0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /go/watchtower/pkg/registry/digest/digest.go:41 +0x1e4
github.com/containrrr/watchtower/pkg/container.dockerClient.PullImage(0xd373c0, 0xc0003a6600, 0x1, 0xd28800, 0xc000036040, 0xc0004a0000, 0xc0004bcd80, 0x0, 0x0, 0x0)
        /go/watchtower/pkg/container/client.go:297 +0x497
github.com/containrrr/watchtower/pkg/container.dockerClient.IsContainerStale(0xd373c0, 0xc0003a6600, 0x1, 0xc0000e0000, 0xc0004bcd80, 0x0, 0xc000417e90, 0xc574e4, 0x2b)
        /go/watchtower/pkg/container/client.go:251 +0x9e
github.com/containrrr/watchtower/internal/actions.Update(0xd2f920, 0xc0003c8480, 0xc000393dc0, 0x0, 0x2540be400, 0x0, 0xc00025fcd0, 0x757aa5)
        /go/watchtower/internal/actions/update.go:30 +0x18f
github.com/containrrr/watchtower/cmd.runUpdatesWithNotifications(0xc000393dc0)
        /go/watchtower/cmd/root.go:231 +0xbe
github.com/containrrr/watchtower/cmd.Run(0x1134b80, 0xc0003c8380, 0x0, 0x2)
        /go/watchtower/cmd/root.go:148 +0x15a
github.com/spf13/cobra.(*Command).execute(0x1134b80, 0xc000030100, 0x2, 0x2, 0x1134b80, 0xc000030100)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:766 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0x1134b80, 0x406325, 0xc000100058, 0x0)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x2fe
github.com/spf13/cobra.(*Command).Execute(...)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:800
github.com/containrrr/watchtower/cmd.Execute()
        /go/watchtower/cmd/root.go:57 +0x31
main.main()
        /go/watchtower/main.go:13 +0x25

@piksel
Copy link
Member

piksel commented Jan 5, 2021

Hm, looks like the ImageInfo is nil for some reason... Guess we could add a check for that and skip if it's nil. Not sure if the regular update would still work...
Wonder if this is the same problem as with docker on other NAS OSes...

@simskij
Copy link
Member

simskij commented Jan 5, 2021

Wonder if this is the same problem as with docker on other NAS OSes...

Sounds like a reasonable assumption. Why, however, is a totally different question. 🤔

@nicx
Copy link

nicx commented Mar 28, 2021

same here on my synology... anythin I can do as a workaround?

@lsascha
Copy link

lsascha commented May 25, 2021

same here.
is it possible that it happens that image hashes are getting deleted in the registry?
(because of the error `Failed to retrieve container image info: Error: No such image: sha256:****``)

Then just skipping that update would end up that these containers are never getting updated in the future?

@simskij
Copy link
Member

simskij commented Jun 23, 2021

Could be! However, if the digest is pinned down, you won't get any updates anyway as it will keep checking against that very exact commit. My immediate question is; do you have docker swarm enabled?

If so, would you mind turning it off and see if it makes a difference? We've seen this implicit pinning behavior with swarm users previously for some reason.

@k0tzl
Copy link

k0tzl commented Oct 8, 2021

Today i checked my watchtower logs and saw the exact same error message.

time="2021-10-08T17:06:56Z" level=warning msg="Failed to retrieve container image info: Error: No such image: sha256:5121527e11b8d8652f7f06be112af00026baac73083b12c181c63b80ab7c10f2",
time="2021-10-08T17:07:01Z" level=info msg="Found new linuxserver/bookstack:amd64-latest image (sha256:62b5f8e0e90197706bbdf2c50b42dcf273f38bddcf444e902f67d54faf073108)",
time="2021-10-08T17:07:02Z" level=info msg="Found new ghcr.io/linuxserver/mariadb:latest image (sha256:00bcd323dc1736e8637aa426d36d92478bf235888debedff94b999909ea0c6bd)",
time="2021-10-08T17:07:05Z" level=info msg="Found new nextcloud:fpm-alpine image (sha256:841ab7d90ab86fb541cdfd67f1574727ce8279170cb9b598ba57bc4eccb2b127)",
time="2021-10-08T17:07:08Z" level=info msg="Found new pihole/pihole:latest image (sha256:fe0b42c1ab4f89be3690a1985424adb6f41f29338be75ac06f134e1b39d9460c)",
time="2021-10-08T17:07:15Z" level=info msg="Found new linuxserver/ddclient:latest image (sha256:5237ab8cfb1f2f7061fb54b5444167c00a3400261d3f7d9cf8ba7a8b6e722e69)",
2021/10/08 17:07:19 cron: panic running job: runtime error: invalid memory address or nil pointer dereference,

With a google search I could luckily find out that the sha256 value 5121527e11b8d8652f... belongs to the portainer 2.6.3 image. After I pulled the portainer/portainer-ce:2.6.3 image, watchtower luckily ran again :)
(Why the fuck can't you search for the sha256 hash directly on dockerhub?!)

i have no idea what exactly bothered watchtower. But at least this is a functional workaround.

@lsascha
Copy link

lsascha commented Oct 8, 2021

Sorry. completely forgot about this issue. Also because i mainly started managing the containers a bit differently.

To answer the question from @simskij . No i am not using Docker Swarm. Its a default docker install on my Synology NAS. So that should not be the issue.

@piksel
Copy link
Member

piksel commented Oct 9, 2021

@k0tzl see #1050

something (probably docker compose v2) created the container without a reference to the image name, hence it's not possible to update with watchtower.

@simskij simskij closed this as completed Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants