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

SABnzbd - runtime error: index out of range [-1] #252

Closed
andrewtwelch opened this issue Jan 10, 2024 · 2 comments · Fixed by #259
Closed

SABnzbd - runtime error: index out of range [-1] #252

andrewtwelch opened this issue Jan 10, 2024 · 2 comments · Fixed by #259
Labels
bug Something isn't working

Comments

@andrewtwelch
Copy link

Details

What steps did you take and what happened:

Ran the exportarr container configured for SABnzbd (docker compose config below), and all requests return the following error:

`An error has occurred while serving metrics:

error collecting metric Desc{fqName: "sabnzbd_collector_error", help: "Error getting stats", constLabels: {target=""}, variableLabels: {}}: failed to get server stats: Failed to get server stats: Recovered from panic: runtime error: index out of range [-1]`

What did you expect to happen:

exportarr to present metrics from SABnzbd

Anything else you would like to add:

Currently running the container image tagged latest, and SABnzbd 4.2.1

Additional Information:

docker-compose.yml contents (relevant sections):
exportarr-sabnzbd: image: ghcr.io/onedr0p/exportarr:latest container_name: 'exportarr-sabnzbd' command: ['sabnzbd'] restart: unless-stopped environment: PORT: 9709 URL: '<SABNZBD URL>' APIKEY: '<SABNZBD API KEY>' ports: - '9709:9709'

@andrewtwelch andrewtwelch added the bug Something isn't working label Jan 10, 2024
@andrewtwelch
Copy link
Author

An error has occurred while serving metrics:
error collecting metric Desc{fqName: "sabnzbd_collector_error", help: "Error getting stats", constLabels: {target=""}, variableLabels: {}}: failed to get server stats: Failed to get server stats: Recovered from panic: runtime error: index out of range [-1]

exportarr-sabnzbd:
image: ghcr.io/onedr0p/exportarr:latest
container_name: 'exportarr-sabnzbd'
command: ['sabnzbd']
restart: unless-stopped
environment:
PORT: 9709
URL: '<SABNZBD URL>'
APIKEY: '<SABNZBD API KEY>'
ports:
- '9709:9709'

@rtrox
Copy link
Collaborator

rtrox commented Jan 25, 2024

Looks like the issue described in #246 - as far as I can tell from that PR, this happens when the statistic map coming back from Sabnzbd empty. AFAIK, this should only be true when a new sabnzbd instance is spun up, and no downloads have happened, in which case it should start returning stats once your first download starts. Does that match your situation?

rtrox added a commit that referenced this issue Jan 25, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Signed-off-by: Russell Troxel <russell@troxel.io>
onedr0p pushed a commit that referenced this issue Jan 25, 2024
Signed-off-by: Russell Troxel <russell@troxel.io>
@rtrox rtrox mentioned this issue Jan 25, 2024
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.

2 participants