aetaric / checkrr

Checkrr Scans your library files for corrupt media and replace the files via sonarr and radarr
MIT License
184 stars 8 forks source link

More Issues with Influxdb2 #47

Closed mookeyj79 closed 1 year ago

mookeyj79 commented 1 year ago

I am running Checkrr 3.1.1. When clicking the run now button in the UI, I receive the following error in the container log:

[GIN] 2023/01/23 - 21:26:40 | 200 |      21.581µs |   192.168.240.1 | POST     "/api/run"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x91b8ae]

goroutine 57 [running]:
github.com/influxdata/influxdb-client-go/v2/api.(*bucketsAPI).CreateBucketWithName(0xc000802180?, {0x14f8990?, 0xc00003a040?}, 0xc0002666a0?, {0xc0002666b0?, 0x3?}, {0x0?, 0x40e1eb?, 0x110?})
        /Users/aetaric/go/pkg/mod/github.com/influxdata/influxdb-client-go/v2@v2.12.1/api/buckets.go:154 +0x2e
github.com/aetaric/checkrr/features.(*Stats).FromConfig(_, {{0xdf5e90, 0x1}, {0x0, 0x0, 0x0}, {0x14fc920, 0x1abb318}, {0x0, 0x0, ...}, ...})
        /Users/aetaric/src/checkrr/features/stats.go:63 +0x5a8
github.com/aetaric/checkrr/check.(*Checkrr).Run(0xc000142600)
        /Users/aetaric/src/checkrr/check/checkrr.go:57 +0x1e5
created by github.com/aetaric/checkrr/webserver.runCheckrr
        /Users/aetaric/src/checkrr/webserver/webserver.go:194 +0x6a

This looks very similar to #39

My Settings are as follows

stats: # These will slow down the runtime substantually, but... DATA
  influxdb2:
    url: "http://influxdb:8086/"
    token: "VALID API TOKEN"
    org: "MyOrg"
    bucket: "checkrr"
webserver:
  port: 8585
  baseurl: "/"
  trustedproxies:
    - 127.0.0.1
    - 192.168.246.126

Running Influxdb 2.6.1 & Checkrr 3.1.1 Using Docker Hub Container - Latest

Please let me know if I could provide you with any additional information!

aetaric commented 1 year ago

Can you wrap the config in triple backticks? yaml is space sensitive and quotes murder the spaces

aetaric commented 1 year ago

@mookeyj79 does the bucket "checkrr" already exist?

mookeyj79 commented 1 year ago

Yes it does. The API code also gives read/write access to that bucket. I also verified influxdb is accessible from the checkrr container.