cloudfoundry-community / splunk-firehose-nozzle

Send CF component metrics, CF app logs, and CF app metrics to Splunk
Apache License 2.0
29 stars 29 forks source link

panic: non-positive interval for NewTicker #240

Closed skertz closed 2 years ago

skertz commented 4 years ago

Recent update to PCF from 2.7.10 to 2.7.14, the splunk-firehose-nozzle is now crashing with:

2020-05-19T10:06:15.989-07:00 [APP/PROC/WEB/2] [ERR] panic: non-positive interval for NewTicker 2020-05-19T10:06:15.989-07:00 [APP/PROC/WEB/2] [ERR] goroutine 1 [running]: 2020-05-19T10:06:15.989-07:00 [APP/PROC/WEB/2] [ERR] time.NewTicker(0x0, 0xc0000b9090) 2020-05-19T10:06:15.989-07:00 [APP/PROC/WEB/2] [ERR] /usr/local/go/src/time/tick.go:23 +0x190 2020-05-19T10:06:15.989-07:00 [APP/PROC/WEB/2] [ERR] github.com/cloudfoundry-community/splunk-firehose-nozzle/cache.(Boltdb).invalidateCache(0xc000130bd0) 2020-05-19T10:06:15.989-07:00 [APP/PROC/WEB/2] [ERR] /Users/shujain/go/src/github.com/cloudfoundry-community/splunk-firehose-nozzle/cache/boltdb.go:310 +0x57 2020-05-19T10:06:15.989-07:00 [APP/PROC/WEB/2] [ERR] github.com/cloudfoundry-community/splunk-firehose-nozzle/cache.(Boltdb).Open(0xc000130bd0, 0xc000130bd0, 0xc000082d80) 2020-05-19T10:06:15.989-07:00 [APP/PROC/WEB/2] [ERR] /Users/shujain/go/src/github.com/cloudfoundry-community/splunk-firehose-nozzle/cache/boltdb.go:92 +0x110 2020-05-19T10:06:15.989-07:00 [APP/PROC/WEB/2] [ERR] github.com/cloudfoundry-community/splunk-firehose-nozzle/splunknozzle.(*SplunkFirehoseNozzle).Run(0xc0000ea208, 0xc000102540, 0xa1cee0, 0xc000102480, 0x0, 0x0) 2020-05-19T10:06:15.989-07:00 [APP/PROC/WEB/2] [ERR] /Users/shujain/go/src/github.com/cloudfoundry-community/splunk-firehose-nozzle/splunknozzle/nozzle.go:162 +0x3b0 2020-05-19T10:06:15.989-07:00 [APP/PROC/WEB/2] [ERR] main.main() 2020-05-19T10:06:15.989-07:00 [APP/PROC/WEB/2] [ERR] /Users/shujain/go/src/github.com/cloudfoundry-community/splunk-firehose-nozzle/main.go:35 +0x1f5

skertz commented 4 years ago

May have found issue. Two user environment settings were set to 0s. MISSING_APP_CACHE_INVALIDATE_TTL ORG_SPACE_CACHE_INVALIDATE_TTL

set the first to 2s and the second to 72h to match another environment. But setting them to anything other than 0s fixed the crash.

luckyj5 commented 4 years ago

@skertz Thanks for reaching out. Org and space caching happens solely because apps are cached and splunk nozzle does log a message at startup Apps are not being cached. When apps are not cached, the org and space caching TTL is ineffective if the app cache TTL == 0 and the org and space cache TTL > 0.

Let me know if any questions.

luckyj5 commented 2 years ago

Closing due to no activity. Please open a new ticket if any issues. Thanks !