ioBroker / ioBroker.influxdb

Store history data in InfluxDB (not for Windows)
MIT License
36 stars 25 forks source link

invalid float value for field value... #195

Closed Ilovegym66 closed 2 years ago

Ilovegym66 commented 2 years ago

Hi, with latest version I got this error messages, and the instance stops completly. I have two instances, first one is connected to a influxdb V1.x, the second one to influxdb V2.x. ( both are different VMs)

2021-12-15 20:00:05.735  - error: influxdb.1 (898310) Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
2021-12-15 20:00:05.784  - info: influxdb.0 (305031) Store 31 buffered influxDB history points
2021-12-15 20:00:05.736  - error: influxdb.1 (898310) unhandled promise rejection: invalid float value for field 'value': Infinity
2021-12-15 20:00:05.791  - error: influxdb.1 (898310) Error: invalid float value for field 'value': Infinity
    at exports.Point.floatField (/opt/iobroker/node_modules/@influxdata/influxdb-client/src/Point.ts:148:13)
    at DatabaseInfluxDB2x.stateValueToPoint (/opt/iobroker/node_modules/iobroker.influxdb/lib/DatabaseInfluxDB2x.js:235:23)
    at /opt/iobroker/node_modules/iobroker.influxdb/lib/DatabaseInfluxDB2x.js:163:38
    at Array.forEach (<anonymous>)
    at /opt/iobroker/node_modules/iobroker.influxdb/lib/DatabaseInfluxDB2x.js:162:24
    at Array.forEach (<anonymous>)
    at DatabaseInfluxDB2x.writeSeries (/opt/iobroker/node_modules/iobroker.influxdb/lib/DatabaseInfluxDB2x.js:161:23)
    at writeAllSeriesAtOnce (/opt/iobroker/node_modules/iobroker.influxdb/main.js:965:21)
    at storeBufferedSeries (/opt/iobroker/node_modules/iobroker.influxdb/main.js:955:9)
    at Immediate.<anonymous> (/opt/iobroker/node_modules/iobroker.influxdb/main.js:923:28)
2021-12-15 20:00:05.791  - error: influxdb.1 (898310) invalid float value for field 'value': Infinity
2021-12-15 20:00:05.845  - warn: influxdb.1 (898310) Terminated (UNCAUGHT_EXCEPTION): Without reason
2021-12-15 20:00:05.999  - info: influxdb.0 (305031) Store 31 buffered influxDB history points
2021-12-15 20:00:06.173  - info: host.VMC123-iobroker instance system.adapter.dwd.0 terminated with code 11 (ADAPTER_REQUESTED_TERMINATION)
2021-12-15 20:00:06.365  - warn: influxdb.1 (898310) Cannot get view: Connection is closed.
2021-12-15 20:00:06.686  - error: host.VMC123-iobroker Caught by controller[0]: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
2021-12-15 20:00:06.686  - error: host.VMC123-iobroker Caught by controller[1]: Error: invalid float value for field 'value': Infinity
2021-12-15 20:00:06.686  - error: host.VMC123-iobroker Caught by controller[1]:     at exports.Point.floatField (/opt/iobroker/node_modules/@influxdata/influxdb-client/src/Point.ts:148:13)
2021-12-15 20:00:06.687  - error: host.VMC123-iobroker Caught by controller[1]:     at DatabaseInfluxDB2x.stateValueToPoint (/opt/iobroker/node_modules/iobroker.influxdb/lib/DatabaseInfluxDB2x.js:235:23)
2021-12-15 20:00:06.687  - error: host.VMC123-iobroker Caught by controller[1]:     at /opt/iobroker/node_modules/iobroker.influxdb/lib/DatabaseInfluxDB2x.js:163:38
2021-12-15 20:00:06.687  - error: host.VMC123-iobroker Caught by controller[1]:     at Array.forEach (<anonymous>)
2021-12-15 20:00:06.687  - error: host.VMC123-iobroker Caught by controller[1]:     at /opt/iobroker/node_modules/iobroker.influxdb/lib/DatabaseInfluxDB2x.js:162:24
2021-12-15 20:00:06.687  - error: host.VMC123-iobroker Caught by controller[1]:     at Array.forEach (<anonymous>)
2021-12-15 20:00:06.687  - error: host.VMC123-iobroker Caught by controller[1]:     at DatabaseInfluxDB2x.writeSeries (/opt/iobroker/node_modules/iobroker.influxdb/lib/DatabaseInfluxDB2x.js:161:23)
2021-12-15 20:00:06.687  - error: host.VMC123-iobroker Caught by controller[1]:     at writeAllSeriesAtOnce (/opt/iobroker/node_modules/iobroker.influxdb/main.js:965:21)
2021-12-15 20:00:06.687  - error: host.VMC123-iobroker Caught by controller[1]:     at storeBufferedSeries (/opt/iobroker/node_modules/iobroker.influxdb/main.js:955:9)
2021-12-15 20:00:06.688  - error: host.VMC123-iobroker Caught by controller[1]:     at Immediate.<anonymous> (/opt/iobroker/node_modules/iobroker.influxdb/main.js:923:28)
2021-12-15 20:00:06.688  - error: host.VMC123-iobroker instance system.adapter.influxdb.1 terminated with code 6 (UNCAUGHT_EXCEPTION)
2021-12-15 20:00:06.688  - info: host.VMC123-iobroker Restart adapter system.adapter.influxdb.1 because enabled
2021-12-15 20:00:06.784  - info: influxdb.0 (305031) Store 31 buffered influxDB history points
2021-12-15 20:00:07.184  - info: influxdb.0 (305031) Store 31 buffered influxDB history points
2021-12-15 20:00:07.585  - info: web.0 (3617) ==>Connected system.user.admin from ::ffff:192.168.4.63
2021-12-15 20:00:07.593  - info: influxdb.0 (305031) Store 31 buffered influxDB history points
2021-12-15 20:00:07.766  - info: web.0 (3617) ==>Connected system.user.admin from ::ffff:192.168.4.63
2021-12-15 20:00:08.130  - info: host.VMC123-iobroker instance system.adapter.odl.0 started with pid 898695
2021-12-15 20:00:08.223  - info: influxdb.0 (305031) Store 31 buffered influxDB history points
2021-12-15 20:00:08.621  - info: influxdb.0 (305031) Store 31 buffered influxDB history points
2021-12-15 20:00:08.901  - info: odl.0 (898695) starting. Version 1.1.4 in /opt/iobroker/node_modules/iobroker.odl, node: v14.18.2, js-controller: 3.3.21
2021-12-15 20:00:09.137  - info: influxdb.0 (305031) Store 31 buffered influxDB history points
2021-12-15 20:00:09.228  - info: web.0 (3617) <==Disconnect system.user.admin from ::ffff:192.168.4.63 minuvis.0
2021-12-15 20:00:09.532  - info: odl.0 (898695) Terminated (NO_ERROR): Without reason
2021-12-15 20:00:09.625  - info: influxdb.0 (305031) Store 31 buffered influxDB history points
2021-12-15 20:00:09.883  - info: linux-control.0 (301975) getting data from octoPiMegaI3 (192.168.4.18:22, Adapter start)
2021-12-15 20:00:10.045  - info: host.VMC123-iobroker instance system.adapter.odl.0 terminated with code 0 (NO_ERROR)
2021-12-15 20:00:10.107  - info: influxdb.0 (305031) Store 34 buffered influxDB history points
2021-12-15 20:00:10.642  - info: influxdb.0 (305031) Store 31 buffered influxDB history points
Apollon77 commented 2 years ago

Any idea where an "infinity" value comes from? Please provide a debug log with the crash

Ilovegym66 commented 2 years ago

Hi, sorry.. something mysterios.. I'd yesterday disabled the instance and don't use it any more. Today I'd nothing done on the system, it's running up since 7 days. I don't know what infinity is and I can't found something with the word on it.. Now I set the instance to debug mode, start it, and no error is shown any more.. absolut no glue what this was.. and I'd done 5 tries to start the instance and everytime come the crash.

Ilovegym66 commented 2 years ago

und da isser wieder.. mich gewundert, warum die Instance auf einmal gestoppt war.. Adapter auf Debug gestellt, lief erstmal ganz normal los.. aber dann .. siehe unten. Ist n bisschen was.. ich schick mal alles.. Erstmal hat er damit gestoppt, dann hab ich ihn auf debug gestellt. Das ist das erste log, da stand er auf warn:

2021-12-19 17:46:38.441  - warn: influxdb.1 (2123057) Point could not be written to database: iobroker
2021-12-19 17:46:38.442  - warn: influxdb.1 (2123057) Error on writePoint("{"value":null,"time":"2021-12-19T16:46:37.440Z","from":"system.adapter.sonoff.0","q":0,"ack":true}): Error: invalid float value for field 'value': Infinity / "invalid float value for field 'value': Infinity""
2021-12-19 17:46:38.442  - warn: influxdb.1 (2123057) Point could not be written to database: iobroker
2021-12-19 17:46:38.442  - warn: influxdb.1 (2123057) Error on writePoint("{"value":null,"time":"2021-12-19T16:46:37.440Z","from":"system.adapter.sonoff.0","q":0,"ack":true}): Error: invalid float value for field 'value': Infinity / "invalid float value for field 'value': Infinity""
2021-12-19 17:46:38.442  - warn: influxdb.1 (2123057) Point could not be written to database: iobroker
2021-12-19 17:46:38.442  - warn: influxdb.1 (2123057) Error on writePoint("{"value":null,"time":"2021-12-19T16:46:37.440Z","from":"system.adapter.sonoff.0","q":0,"ack":true}): Error: invalid float value for field 'value': Infinity / "invalid float value for field 'value': Infinity""
2021-12-19 17:46:38.443  - warn: influxdb.1 (2123057) Point could not be written to database: iobroker
2021-12-19 17:46:38.443  - warn: influxdb.1 (2123057) Error on writePoint("{"value":null,"time":"2021-12-19T16:46:37.440Z","from":"system.adapter.sonoff.0","q":0,"ack":true}): Error: invalid float value for field 'value': Infinity / "invalid float value for field 'value': Infinity""
2021-12-19 17:46:38.443  - warn: influxdb.1 (2123057) Point could not be written to database: iobroker
2021-12-19 17:46:38.443  - warn: influxdb.1 (2123057) Error on writePoint("{"value":null,"time":"2021-12-19T16:46:37.440Z","from":"system.adapter.sonoff.0","q":0,"ack":true}): Error: invalid float value for field 'value': Infinity / "invalid float value for field 'value': Infinity""
2021-12-19 17:46:38.444  - warn: influxdb.1 (2123057) Point could not be written to database: iobroker
2021-12-19 17:46:38.444  - warn: influxdb.1 (2123057) Error on writePoint("{"value":null,"time":"2021-12-19T16:46:37.440Z","from":"system.adapter.sonoff.0","q":0,"ack":true}): Error: invalid float value for field 'value': Infinity / "invalid float value for field 'value': Infinity""
2021-12-19 17:46:38.444  - warn: influxdb.1 (2123057) Point could not be written to database: iobroker
2021-12-19 17:46:38.444  - warn: influxdb.1 (2123057) Error on writePoint("{"value":null,"time":"2021-12-19T16:46:37.440Z","from":"system.adapter.sonoff.0","q":0,"ack":true}): Error: invalid float value for field 'value': Infinity / "invalid float value for field 'value': Infinity""
2021-12-19 17:46:38.444  - warn: influxdb.1 (2123057) Point could not be written to database: iobroker
2021-12-19 17:46:38.444  - warn: influxdb.1 (2123057) Error on writePoint("{"value":null,"time":"2021-12-19T16:46:37.440Z","from":"system.adapter.sonoff.0","q":0,"ack":true}): Error: invalid float value for field 'value': Infinity / "invalid float value for field 'value': Infinity""
2021-12-19 17:46:38.445  - warn: influxdb.1 (2123057) Point could not be written to database: iobroker
2021-12-19 17:46:38.445  - warn: influxdb.1 (2123057) Error on writePoint("{"value":null,"time":"2021-12-19T16:46:37.440Z","from":"system.adapter.sonoff.0","q":0,"ack":true}): Error: invalid float value for field 'value': Infinity / "invalid float value for field 'value': Infinity""
2021-12-19 17:46:38.445  - warn: influxdb.1 (2123057) Point could not be written to database: iobroker
2021-12-19 17:46:38.445  - warn: influxdb.1 (2123057) Error on writePoint("{"value":null,"time":"2021-12-19T16:46:37.440Z","from":"system.adapter.sonoff.0","q":0,"ack":true}): Error: invalid float value for field 'value': Infinity / "invalid float value for field 'value': Infinity""

und dann auf Debug, sorry, ist ne Menge was da geloggt wird..

2021-12-19 18:51:07.123  - info: host.VMC123-iobroker instance system.adapter.influxdb.1 started with pid 37723
2021-12-19 18:51:15.198  - error: influxdb.1 (37723) Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
2021-12-19 18:51:15.200  - error: influxdb.1 (37723) unhandled promise rejection: invalid float value for field 'value': Infinity
2021-12-19 18:51:15.250  - error: influxdb.1 (37723) Error: invalid float value for field 'value': Infinity
    at exports.Point.floatField (/opt/iobroker/node_modules/@influxdata/influxdb-client/src/Point.ts:148:13)
    at DatabaseInfluxDB2x.stateValueToPoint (/opt/iobroker/node_modules/iobroker.influxdb/lib/DatabaseInfluxDB2x.js:235:23)
    at /opt/iobroker/node_modules/iobroker.influxdb/lib/DatabaseInfluxDB2x.js:163:38
    at Array.forEach (<anonymous>)
    at /opt/iobroker/node_modules/iobroker.influxdb/lib/DatabaseInfluxDB2x.js:162:24
    at Array.forEach (<anonymous>)
    at DatabaseInfluxDB2x.writeSeries (/opt/iobroker/node_modules/iobroker.influxdb/lib/DatabaseInfluxDB2x.js:161:23)
    at writeAllSeriesAtOnce (/opt/iobroker/node_modules/iobroker.influxdb/main.js:965:21)
    at storeBufferedSeries (/opt/iobroker/node_modules/iobroker.influxdb/main.js:955:9)
    at Immediate.<anonymous> (/opt/iobroker/node_modules/iobroker.influxdb/main.js:923:28)
2021-12-19 18:51:15.251  - error: influxdb.1 (37723) invalid float value for field 'value': Infinity
2021-12-19 18:51:16.111  - warn: influxdb.1 (37723) Store data for 8807 points and 0 conflicts
2021-12-19 18:51:16.112  - warn: influxdb.1 (37723) Terminated (UNCAUGHT_EXCEPTION): Without reason
2021-12-19 18:51:16.621  - warn: influxdb.1 (37723) Cannot get view: Connection is closed.
2021-12-19 18:51:17.009  - error: host.VMC123-iobroker Caught by controller[0]: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
2021-12-19 18:51:17.010  - error: host.VMC123-iobroker Caught by controller[1]: Error: invalid float value for field 'value': Infinity
2021-12-19 18:51:17.010  - error: host.VMC123-iobroker Caught by controller[1]:     at exports.Point.floatField (/opt/iobroker/node_modules/@influxdata/influxdb-client/src/Point.ts:148:13)
2021-12-19 18:51:17.010  - error: host.VMC123-iobroker Caught by controller[1]:     at DatabaseInfluxDB2x.stateValueToPoint (/opt/iobroker/node_modules/iobroker.influxdb/lib/DatabaseInfluxDB2x.js:235:23)
2021-12-19 18:51:17.010  - error: host.VMC123-iobroker Caught by controller[1]:     at /opt/iobroker/node_modules/iobroker.influxdb/lib/DatabaseInfluxDB2x.js:163:38
2021-12-19 18:51:17.010  - error: host.VMC123-iobroker Caught by controller[1]:     at Array.forEach (<anonymous>)
2021-12-19 18:51:17.011  - error: host.VMC123-iobroker Caught by controller[1]:     at /opt/iobroker/node_modules/iobroker.influxdb/lib/DatabaseInfluxDB2x.js:162:24
2021-12-19 18:51:17.011  - error: host.VMC123-iobroker Caught by controller[1]:     at Array.forEach (<anonymous>)
2021-12-19 18:51:17.011  - error: host.VMC123-iobroker Caught by controller[1]:     at DatabaseInfluxDB2x.writeSeries (/opt/iobroker/node_modules/iobroker.influxdb/lib/DatabaseInfluxDB2x.js:161:23)
2021-12-19 18:51:17.011  - error: host.VMC123-iobroker Caught by controller[1]:     at writeAllSeriesAtOnce (/opt/iobroker/node_modules/iobroker.influxdb/main.js:965:21)
2021-12-19 18:51:17.011  - error: host.VMC123-iobroker Caught by controller[1]:     at storeBufferedSeries (/opt/iobroker/node_modules/iobroker.influxdb/main.js:955:9)
2021-12-19 18:51:17.011  - error: host.VMC123-iobroker Caught by controller[1]:     at Immediate.<anonymous> (/opt/iobroker/node_modules/iobroker.influxdb/main.js:923:28)
2021-12-19 18:51:17.011  - error: host.VMC123-iobroker instance system.adapter.influxdb.1 terminated with code 6 (UNCAUGHT_EXCEPTION)
2021-12-19 18:51:17.011  - info: host.VMC123-iobroker Restart adapter system.adapter.influxdb.1 because enabled
2021-12-19 18:51:22.874  - info: go-e.0 (1636) State value to set for "go-e.0.temperatures.tempereatureArray" has to be stringified but received type "object"
2021-12-19 18:51:26.230  - info: host.VMC123-iobroker "system.adapter.influxdb.1" disabled
2021-12-19 18:51:27.203  - info: linux-control.0 (1863) getting data from zeroberry (192.168.4.15:22)
2021-12-19 18:51:27.645  - info: linux-control.0 (1863) State value to set for "linux-control.0.zeroberry.info.is_online" has to be type "string" but received type "boolean"
2021-12-19 18:51:48.433  - error: influxdb.1 (38224) adapter disabled
2021-12-19 18:51:48.439  - warn: influxdb.1 (38224) Terminated (NO_ADAPTER_CONFIG_FOUND): Without reason
2021-12-19 18:51:49.358  - error: host.VMC123-iobroker instance system.adapter.influxdb.1 terminated with code 3 (NO_ADAPTER_CONFIG_FOUND)
2021-12-19 18:51:49.358  - info: host.VMC123-iobroker Do not restart adapter system.adapter.influxdb.1 because disabled or deleted

Hier das komplette log, habs so gemacht sonst zuviel hier. influxdb.zip

Apollon77 commented 2 years ago

The reason is this:

2021-12-19 18:52:12.836 - debug: influxdb.1 (38562) timed-relog sonoff.0.SonoffRFBridge.RfReceived_Data, value=Infinity, lastLogTime=undefined, ts=1639936332836

So it has nothing to do with the update because such values would have also caused such crashes in earlier versions :-)

I will add a check that such values can not be logged and will be ignored like "null" too.

Will be in 2.4.0 tomorrow