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

issues with influxdb2 #39

Closed
douginoz opened this issue Jan 14, 2023 · 0 comments
Closed

issues with influxdb2 #39

douginoz opened this issue Jan 14, 2023 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@douginoz
Copy link

douginoz commented Jan 14, 2023

Running checkrr 3.0 in docker. The scheduled time to run comes and goes and nothing happens. Well, almost - looking at the docker logs in portainer, checkrr is idle and servicing web GET requests as normal. But just when it's scheduled to kick off again, the following occurs:

[GIN] 2023/01/14 - 03:59:56 | 200 |     122.738µs |    192.168.1.35 | GET      "/api/stats/historical"
[GIN] 2023/01/14 - 03:59:57 | 200 |    1.108937ms |    192.168.1.35 | GET      "/api/files/bad"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x60 pc=0x7a7c7b]
goroutine 734 [running]:
github.com/aetaric/checkrr/features.(*Stats).FromConfig(_, {{0x9ebf70, 0x1}, {0x0, 0x0, 0x0}, {0x1019360, 0x13bed20}, {0x0, 0x0, ...}, ...})
	/Users/aetaric/src/checkrr/features/stats.go:63 +0x4bb
github.com/aetaric/checkrr/check.(*Checkrr).Run(0xc000822300)
	/Users/aetaric/src/checkrr/check/checkrr.go:54 +0x20c
github.com/robfig/cron/v3.(*Cron).startJob.func1()
	/Users/aetaric/go/pkg/mod/github.com/robfig/cron/v3@v3.0.1/cron.go:312 +0x6a
created by github.com/robfig/cron/v3.(*Cron).startJob
	/Users/aetaric/go/pkg/mod/github.com/robfig/cron/v3@v3.0.1/cron.go:310 +0xad

checkrr/features/stats.go:63 is:

org, _ := s.influxdb1.OrganizationsAPI().FindOrganizationByName(context.Background(), influx.GetString("org"))

Which might be a bit strange since this line is within the "if config.Sub("influxdb2") != nil" block - influxdb2, not influxdb1.

My checkrr.yaml has the following:

stats: # These will slow down the runtime substantually, but... DATA
influxdb2:
url: "http://192.168.1.111:8086/"
token: "<removed but normally a valid token generated in influxdb2"
org: "sanityfromtheinside"
bucket: "checkrr"

This error occurs even if org: is left as the default in the example (org: "default").
The token, org and bucket values are valid and correct.

After the stack trace is displayed, checkrr continues (or may be restarting automatically) but doesn't ever start a scan.
Running InfluxDB v2.6.1 on ubuntu 20.04 with checkrr 3.0.0.

@aetaric aetaric changed the title segmentation violation issues with influxdb2 Jan 14, 2023
@aetaric aetaric added the bug Something isn't working label Jan 14, 2023
@aetaric aetaric added this to the 3.1.0 milestone Jan 14, 2023
aetaric added a commit that referenced this issue Jan 14, 2023
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

No branches or pull requests

2 participants