tkurki / signalk-to-influxdb2

Apache License 2.0
6 stars 4 forks source link

Error message when starting Signalk To InfluxDB 2 plugin #72

Closed geoffschultz closed 1 week ago

geoffschultz commented 1 week ago

On a new install of 64-bit Bookworm on a Pi 4, I installed the latest version of SignalK and InfluxDB 2 (2.7.10). I also installed the signalk-to-influxdb-v2-buffering plugin, and configured it with a URL of "http://127.0.0.1:8086" with a matching token, Organization Name, and Bucket. I have the debug log turned on.

I also configured several paths (navigation.courseOverGround and navigation.speedOverGround), which are being provided by the SignalK Delta Simulator (as I'm at home away from the boat).

When I start SignalK, I get the following:

signalk-to-influxdb-v2-buffering Signalk To Influxdbv2.0 Started... +0ms
error starting plugin: TypeError: Cannot read properties of undefined (reading 'forEach')
TypeError: Cannot read properties of undefined (reading 'forEach')
    at Object._start [as start] (/home/geoff/.signalk/node_modules/signalk-to-influxdb-v2-buffering/index.js:120:25)
    at doPluginStart (/usr/lib/node_modules/signalk-server/lib/interfaces/plugins.js:305:20)
    at doRegisterPlugin (/usr/lib/node_modules/signalk-server/lib/interfaces/plugins.js:459:13)
    at registerPlugin (/usr/lib/node_modules/signalk-server/lib/interfaces/plugins.js:258:13)
    at /usr/lib/node_modules/signalk-server/lib/interfaces/plugins.js:209:13
    at Array.forEach (<anonymous>)
    at startPlugins (/usr/lib/node_modules/signalk-server/lib/interfaces/plugins.js:208:85)
    at Object.start (/usr/lib/node_modules/signalk-server/lib/interfaces/plugins.js:46:13)
    at /usr/lib/node_modules/signalk-server/lib/index.js:503:50
    at /usr/lib/node_modules/signalk-server/node_modules/lodash/lodash.js:4967:15
    at Function.forIn (/usr/lib/node_modules/signalk-server/node_modules/lodash/lodash.js:13018:11)
    at startInterfaces (/usr/lib/node_modules/signalk-server/lib/index.js:480:22)
    at Server.<anonymous> (/usr/lib/node_modules/signalk-server/lib/index.js:328:17)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/lib/node_modules/signalk-server/lib/index.js:23:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Clearly, something is wrong. Any help would be appreciated.

tkurki commented 1 week ago

signalk-to-influxdb-v2-buffering is a separate plugin.

geoffschultz commented 1 week ago

Duh! Thank you. I did a clean install of Bookworm, SignalK, and InfluxDB, and then re-installed the plugins. I seem to have picked the wrong signalk-to-influxdb2, as it had been running before the rebuild.