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

cron: panic running job: duplicate metrics collector registration attempted #1864

Open
4-FLOSS-Free-Libre-Open-Source-Software opened this issue Nov 30, 2023 · 2 comments

Comments

@4-FLOSS-Free-Libre-Open-Source-Software

Describe the bug

Scheduling panic

Steps to reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

check will be performed

Screenshots

No response

Environment

  • Platform
    linux
  • Architecture
    x64
  • Docker Version
    Docker Desktop 4.25.2 (129061)

Your logs

time="2023-11-30T19:06:45+01:00" level=info msg="Watchtower 1.7.1"
time="2023-11-30T19:06:46+01:00" level=info msg="Using no notifications"
time="2023-11-30T19:06:46+01:00" level=info msg="Checking all containers (except explicitly disabled with label)"
time="2023-11-30T19:06:46+01:00" level=info msg="Scheduling first run: 2023-11-30 19:06:46 +0100 CET"
time="2023-11-30T19:06:46+01:00" level=info msg="Note that the first check will be performed in 0 seconds"
2023/11/30 19:06:53 cron: panic running job: duplicate metrics collector registration attempted
goroutine 82 [running]:
github.com/robfig/cron.(*Cron).runWithRecovery.func1()
        /home/runner/go/pkg/mod/github.com/robfig/[email protected]/cron.go:161 +0x69
panic({0xaec580, 0xc0003ae1a0})
        /opt/hostedtoolcache/go/1.18.10/x64/src/runtime/panic.go:838 +0x207
github.com/prometheus/client_golang/prometheus.(*Registry).MustRegister(0xc0001bb770?, {0xc0003a8870?, 0x1, 0x1?})
        /home/runner/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:405 +0x7f
github.com/prometheus/client_golang/prometheus/promauto.Factory.NewGauge({{0xc80de0?, 0xc0001bb770?}}, {{0x0, 0x0}, {0x0, 0x0}, {0xb7d533, 0x1d}, {0xb94759, 0x4b}, ...})
        /home/runner/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/promauto/auto.go:297 +0xd3
github.com/prometheus/client_golang/prometheus/promauto.NewGauge(...)
        /home/runner/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/promauto/auto.go:191
github.com/containrrr/watchtower/pkg/metrics.Default()
        /home/runner/work/watchtower/watchtower/pkg/metrics/metrics.go:55 +0x8d
github.com/containrrr/watchtower/pkg/metrics.RegisterScan(...)
        /home/runner/work/watchtower/watchtower/pkg/metrics/metrics.go:85
github.com/containrrr/watchtower/cmd.runUpgradesOnSchedule.func1()
        /home/runner/work/watchtower/watchtower/cmd/root.go:329 +0x105
github.com/robfig/cron.FuncJob.Run(0x0?)
        /home/runner/go/pkg/mod/github.com/robfig/[email protected]/cron.go:92 +0x1a
github.com/robfig/cron.(*Cron).runWithRecovery(0x0?, {0xc7e060?, 0xc0001cc5a0?})
        /home/runner/go/pkg/mod/github.com/robfig/[email protected]/cron.go:165 +0x62
created by github.com/robfig/cron.(*Cron).run
        /home/runner/go/pkg/mod/github.com/robfig/[email protected]/cron.go:199 +0x79f

Additional context

No response

Copy link

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! 🙏

@piksel
Copy link
Member

piksel commented Dec 1, 2023

Please fill in the form. What configuration are you using? How are you starting watchtower? Did this work on a previous version?

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

2 participants