ioBroker / ioBroker.influxdb

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

Adapter does not start any more after upgrade to version 4.0.2 #387

Closed silmaril42 closed 5 months ago

silmaril42 commented 5 months ago

Describe the bug
After upgrade to version 4.0.2 the adapter does not start any more. In the log I can see the system is trying to start it again and again, but it always fails (see log below for error message).

To Reproduce
Steps to reproduce the behavior:

  1. Have influxdb adapter up and running
  2. Update to version 4.0.2
  3. The adapter does not start successfully.

This is probably a problem that only occurs on systems with special preconditions, but I have no idea what's special on my system ;-)

Expected behavior
After the update, the adapter should simply work as before.

Screenshots & Logfiles

2024-03-25 00:01:20.978  - info: host.iob Restart adapter system.adapter.influxdb.0 because enabled
2024-03-25 00:01:51.091  - info: host.iob instance system.adapter.influxdb.0 started with pid 1232537
2024-03-25 00:01:52.580  - error: host.iob Caught by controller[0]: /opt/iobroker/node_modules/iobroker.influxdb/main.js:75
2024-03-25 00:01:52.580  - error: host.iob Caught by controller[0]:     adapter = new utils.Adapter(options);
2024-03-25 00:01:52.581  - error: host.iob Caught by controller[0]:               ^
2024-03-25 00:01:52.581  - error: host.iob Caught by controller[0]: TypeError: utils.Adapter is not a constructor
2024-03-25 00:01:52.581  - error: host.iob Caught by controller[0]:     at startAdapter (/opt/iobroker/node_modules/iobroker.influxdb/main.js:75:15)
2024-03-25 00:01:52.581  - error: host.iob Caught by controller[0]:     at Object.<anonymous> (/opt/iobroker/node_modules/iobroker.influxdb/main.js:2786:5)
2024-03-25 00:01:52.581  - error: host.iob Caught by controller[0]:     at Module._compile (node:internal/modules/cjs/loader:1256:14)
2024-03-25 00:01:52.581  - error: host.iob Caught by controller[0]:     at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
2024-03-25 00:01:52.581  - error: host.iob Caught by controller[0]:     at Module.load (node:internal/modules/cjs/loader:1119:32)
2024-03-25 00:01:52.581  - error: host.iob Caught by controller[0]:     at Module._load (node:internal/modules/cjs/loader:960:12)
2024-03-25 00:01:52.581  - error: host.iob Caught by controller[0]:     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
2024-03-25 00:01:52.581  - error: host.iob Caught by controller[0]:     at node:internal/main/run_main_module:23:47
2024-03-25 00:01:52.581  - error: host.iob Caught by controller[0]: Node.js v18.17.1
2024-03-25 00:01:52.582  - error: host.iob instance system.adapter.influxdb.0 terminated with code 1 (JS_CONTROLLER_STOPPED)
2024-03-25 00:01:52.582  - info: host.iob Restart adapter system.adapter.influxdb.0 because enabled

Versions:

Additional context
After downgrading the adapter to 3.2.0, it works fine again. I couldn't try downgrading to 4.0.1 or 4.0.0, because iobroker doesn't find those versions.

I am not sure, which version I had before the last update - I think it was probably some 4.0.x version, which did work.

Apollon77 commented 5 months ago

Please uninstall and reinstall the adapter. It seems you upgraded in a moment where one errornous library version of a sub library was online ... The reinstallation should fix that, YOu could also try to downgrade/upgrade again the adapter. Please tell me if that solved it.

silmaril42 commented 5 months ago

Since I already was on version 3.2.0, I simply hit the upgrade button once more and version 4.0.2 is working fine now.

Thanks for the tip! :smiley:

I'll try to remember this - it sounds as if the same could happen for any adapter any time and the same solution could be applied if it does.