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

Latests version crashes on request #230

Closed
100lv opened this issue Oct 17, 2023 · 8 comments · Fixed by #231
Closed

Latests version crashes on request #230

100lv opened this issue Oct 17, 2023 · 8 comments · Fixed by #231
Labels
bug Something isn't working

Comments

@100lv
Copy link

100lv commented Oct 17, 2023

Details

I'm using docker with tag for latest version. Since 1 week when I run container and on first attempt to request metrics containers crashes with:
sonarr-exporter | 2023-10-17T13:26:14.970Z INFO Starting exportarr {"app_name": "exportarr", "version": "vmaster", "buildTime": "2023-10-08T18:15:27.347Z", "revision": "b8426af721e5ec7cdeae612686ef9c8083ffc85a"}
sonarr-exporter | 2023-10-17T13:26:14.971Z INFO Starting HTTP Server {"interface": "0.0.0.0", "port": 9707}
sonarr-exporter | 2023-10-17T13:26:19.812Z INFO Sending HTTP request {"url": "http://sonarr:8989/api/v3/series"}
sonarr-exporter | 2023-10-17T13:26:19.812Z INFO Sending HTTP request {"url": "http://sonarr:8989/api/v3/system/status"}
sonarr-exporter | panic: assignment to entry in nil map
sonarr-exporter |
sonarr-exporter | goroutine 35 [running]:
sonarr-exporter | net/url.Values.Add(...)
sonarr-exporter | /usr/local/go/src/net/url/url.go:902
sonarr-exporter | github.com/onedr0p/exportarr/internal/arr/collector.(*queueCollector).Collect(0xc0000c1fc8, 0xc000293760?)
sonarr-exporter | /build/internal/arr/collector/queue.go:52 +0x225
sonarr-exporter | github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func1()
sonarr-exporter | /go/pkg/mod/github.com/prometheus/client_golang@v1.17.0/prometheus/registry.go:455 +0x102
sonarr-exporter | created by github.com/prometheus/client_golang/prometheus.(*Registry).Gather in goroutine 29
sonarr-exporter | /go/pkg/mod/github.com/prometheus/client_golang@v1.17.0/prometheus/registry.go:547 +0xbab

When I'm using v.1.5.5 - everything works OK.

@100lv 100lv added the bug Something isn't working label Oct 17, 2023
@onedr0p
Copy link
Owner

onedr0p commented Oct 17, 2023

Are you able to share the configuration you're using?

@100lv
Copy link
Author

100lv commented Oct 17, 2023

API key is correct and removed before post. And latest changed to v1.5.5 as with latest crashes

sonarr-exporter:
image: ghcr.io/onedr0p/exportarr:v1.5.5
container_name: sonarr-exporter
command: ["sonarr"]
environment:
PORT: 9707
URL: "http://sonarr:8989"
APIKEY: "xxxxxxxxxxxxxx"

  ENABLE_ADDITIONAL_METRICS: "true"

networks:
  - t2_proxy
ports:
  - "9707:9707"
restart: unless-stopped

@rdotts
Copy link

rdotts commented Oct 17, 2023

I'm getting this too. Like @100lv, specifying v1.5.5 works. I notice that while the repo says 1.5.5 is the latest, the docker repo has an image built about a week after that, and that's the image that the "latest" tag is pointing to. It also has the tag "vmaster", which seems to be some sort of Windows-based vm storage thing (???).

Anyway, while I don't mean to presume, it seems like the "latest" tag shouldn't be pointing at it. Hopefully this helps.

@onedr0p
Copy link
Owner

onedr0p commented Oct 17, 2023

I'm guessing something broke between the release and commits into master... In any case it's best to pin your image to the latest release semver tag.

@rtrox
Copy link
Collaborator

rtrox commented Oct 17, 2023

I can look at this tonight, it looks like there's a codepath where the map isn't getting initialized, should be a quick fix.

In anycase, the vmaster/latest tag should be looked at as pre-release, you want the semver tag as onedr0p mentioned.

rtrox added a commit that referenced this issue Oct 18, 2023

Verified

This commit was signed with the committer’s verified signature. The key has expired.
rtrox Russell Troxel
Signed-off-by: Russell Troxel <russell@troxel.io>
@RickyCook
Copy link

If it helps, according to my monitoring this seemed to start occurring a relatively long time ago (I update nightly and the first crash appeared at ~ 2023-10-09 06:52:00 UTC, so the commit/build would have been some time in the 24hr before that)

@rtrox
Copy link
Collaborator

rtrox commented Oct 18, 2023

Thanks Ricky, there's a PR up with the fix. Once that lands, it will get pushed to latest automatically.

onedr0p pushed a commit that referenced this issue Oct 18, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
* fix: Fix #230, Add tests for shared collectors

Signed-off-by: Russell Troxel <russell@troxel.io>

* Fix lint: common TestServer

Signed-off-by: Russell Troxel <russell@troxel.io>

---------

Signed-off-by: Russell Troxel <russell@troxel.io>
@100lv
Copy link
Author

100lv commented Oct 18, 2023

Thanks!

rtrox added a commit that referenced this issue Nov 29, 2023
* fix: Fix #230, Add tests for shared collectors

Signed-off-by: Russell Troxel <russell@troxel.io>

* Fix lint: common TestServer

Signed-off-by: Russell Troxel <russell@troxel.io>

---------

Signed-off-by: Russell Troxel <russell@troxel.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants