Can't configure new kapacitor instance: source.kapacitors is undefined
Chronograf version: 1.3.3.4-1
OS: Ubuntu 16.04, x86_64
Installed via deb package, sha1 6be476630e79c6a02fe3e081999ac167ff3f2f8b
Steps to reproduce:
- Install TICK components via .deb packages.
- Start TICK components via
sudo service $service_name start. - Configure Chronograf to talk to InfluxDB.
- Go to the Alerts page.
- Observe the message stating that there's no configured Kapacitor instance. Hit the 'Configure Kapacitor` link.
- Input URL, name, username, and password.
- Hit 'connect'.
Firefox says: "TypeError: source.kapacitors is undefined" with stacktrace:
handleSubmit webpack:///./src/kapacitor/containers/KapacitorPage.js?:172:11
bound handleSubmit self-hosted:913:17
invokeGuardedCallback webpack:///./~/react-dom/lib/ReactErrorUtils.js?:26:5
executeDispatch webpack:///./~/react-dom/lib/EventPluginUtils.js?:85:5
executeDispatchesInOrder webpack:///./~/react-dom/lib/EventPluginUtils.js?:108:5
executeDispatchesAndRelease webpack:///./~/react-dom/lib/EventPluginHub.js?:43:5
executeDispatchesAndReleaseTopLevel webpack:///./~/react-dom/lib/EventPluginHub.js?:54:10
forEach self-hosted:252:13
forEachAccumulated webpack:///./~/react-dom/lib/forEachAccumulated.js?:24:5
processEventQueue webpack:///./~/react-dom/lib/EventPluginHub.js?:257:7
runEventQueueInBatch webpack:///./~/react-dom/lib/ReactEventEmitterMixin.js?:17:3
handleTopLevel webpack:///./~/react-dom/lib/ReactEventEmitterMixin.js?:28:5
handleTopLevelImpl webpack:///./~/react-dom/lib/ReactEventListener.js?:72:5
perform webpack:///./~/react-dom/lib/Transaction.js?:140:13
batchedUpdates webpack:///./~/react-dom/lib/ReactDefaultBatchingStrategy.js?:62:14
batchedUpdates webpack:///./~/react-dom/lib/ReactUpdates.js?:97:10
dispatchEvent webpack:///./~/react-dom/lib/ReactEventListener.js?:147:7
bound dispatchEvent self-hosted:955:17
Chrome says:
ReactErrorUtils.js:51 Uncaught TypeError: Cannot read property 'map' of undefined
at KapacitorPage.handleSubmit (webpack:///./src/kapacitor/containers/KapacitorPage.js?:172:39)
at Object.invokeGuardedCallback (webpack:///./~/react-dom/lib/ReactErrorUtils.js?:26:5)
at executeDispatch (webpack:///./~/react-dom/lib/EventPluginUtils.js?:85:21)
at Object.executeDispatchesInOrder (webpack:///./~/react-dom/lib/EventPluginUtils.js?:108:5)
at executeDispatchesAndRelease (webpack:///./~/react-dom/lib/EventPluginHub.js?:43:22)
at executeDispatchesAndReleaseTopLevel (webpack:///./~/react-dom/lib/EventPluginHub.js?:54:10)
at Array.forEach (native)
at forEachAccumulated (webpack:///./~/react-dom/lib/forEachAccumulated.js?:24:9)
at Object.processEventQueue (webpack:///./~/react-dom/lib/EventPluginHub.js?:257:7)
at runEventQueueInBatch (webpack:///./~/react-dom/lib/ReactEventEmitterMixin.js?:17:18)
Workaround was to use REST API directly:
curl -X POST 'http://localhost:8888/chronograf/v1/sources/2/kapacitors' -d '{"name":"kapacitor","url":"http://localhost:9092"}'
Thanks for reporting this, @dhasenan
Same issue here on ubuntu 16.04.
To be honest this is an essential part of the application. As a "first timer" to TICK it is really weird to receive such bug on a clean install.
To add, the page "sources/1/alert-rules" also throws an error if kapacitor is not defined. It should give a page saying you should add a source rather than give a console error.
+1. Just hit this issue as well, ubuntu 16.04. Capturing the error on the front end and displaying it to the user would be ideal. Because even the console errors are just related to React, nothing that tells you what the issue actually is.
...I'm still not sure what the issue actually is. Appreciate @dhasenan's workaround though!
1.3.3.4 is quite old at this point. I will work on getting the debian packages updated. In the meantime this should not ben an issue on our latest release
https://dl.influxdata.com/chronograf/releases/chronograf_1.3.7.0_amd64.deb