derAlff / ioBroker.ve

Other
8 stars 0 forks source link

Adapter gets disabled on Cerbro restart #25

Open Karkas66 opened 4 months ago

Karkas66 commented 4 months ago

Describe the bug
When you restart CerbroGX or your VenusOS for whatever reason the adapter hammers out failed connection attempts every millisecond so that the iobroker admin process disables it until you reactivate it manually

To Reproduce
Steps to reproduce the behavior:

Expected behavior
add a timout after unsuccessfull connections for 10s or something

Screenshots & Logfiles

2024-06-15 10:37:21.332 - error: ve.0 (7011) 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(). 2024-06-15 10:37:21.333 - error: ve.0 (7011) unhandled promise rejection: Port Not Open 2024-06-15 10:37:21.335 - error: ve.0 (7011) PortNotOpenError: Port Not Open at ModbusRTU.writeFC4 (/opt/iobroker/node_modules/modbus-serial/index.js:665:28) at ModbusRTU.writeFC3 (/opt/iobroker/node_modules/modbus-serial/index.js:651:14) at /opt/iobroker/node_modules/modbus-serial/apis/promise.js:48:31 at new Promise () at ModbusRTU.converted [as readHoldingRegisters] (/opt/iobroker/node_modules/modbus-serial/apis/promise.js:39:29) at /opt/iobroker/node_modules/iobroker.ve/main.js:258:36 at Array.forEach () at /opt/iobroker/node_modules/iobroker.ve/main.js:228:25 at Timeout._onTimeout (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:1734:38) at listOnTimeout (node:internal/timers:569:17) 2024-06-15 10:37:21.335 - error: ve.0 (7011) Port Not Open 2024-06-15 10:37:21.336 - error: ve.0 (7011) 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(). 2024-06-15 10:37:21.336 - error: ve.0 (7011) unhandled promise rejection: Port Not Open 2024-06-15 10:37:21.336 - error: ve.0 (7011) PortNotOpenError: Port Not Open at ModbusRTU.writeFC4 (/opt/iobroker/node_modules/modbus-serial/index.js:665:28) at ModbusRTU.writeFC3 (/opt/iobroker/node_modules/modbus-serial/index.js:651:14) at /opt/iobroker/node_modules/modbus-serial/apis/promise.js:48:31 at new Promise () at ModbusRTU.converted [as readHoldingRegisters] (/opt/iobroker/node_modules/modbus-serial/apis/promise.js:39:29) at /opt/iobroker/node_modules/iobroker.ve/main.js:258:36 at Array.forEach () at /opt/iobroker/node_modules/iobroker.ve/main.js:228:25 at Timeout._onTimeout (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:1734:38) at listOnTimeout (node:internal/timers:569:17) 2024-06-15 10:37:21.336 - error: ve.0 (7011) Port Not Open 2024-06-15 10:37:21.337 - error: ve.0 (7011) 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(). 2024-06-15 10:37:21.337 - error: ve.0 (7011) unhandled promise rejection: Port Not Open 2024-06-15 10:37:21.337 - error: ve.0 (7011) PortNotOpenError: Port Not Open at ModbusRTU.writeFC4 (/opt/iobroker/node_modules/modbus-serial/index.js:665:28) at ModbusRTU.writeFC3 (/opt/iobroker/node_modules/modbus-serial/index.js:651:14) at /opt/iobroker/node_modules/modbus-serial/apis/promise.js:48:31 at new Promise () at ModbusRTU.converted [as readHoldingRegisters] (/opt/iobroker/node_modules/modbus-serial/apis/promise.js:39:29) at /opt/iobroker/node_modules/iobroker.ve/main.js:258:36 at Array.forEach () at /opt/iobroker/node_modules/iobroker.ve/main.js:228:25 at Timeout._onTimeout (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:1734:38) at listOnTimeout (node:internal/timers:569:17) 2024-06-15 10:37:21.337 - error: ve.0 (7011) Port Not Open 2024-06-15 10:37:21.338 - error: ve.0 (7011) 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(). 2024-06-15 10:37:21.338 - error: ve.0 (7011) unhandled promise rejection: Port Not Open 2024-06-15 10:37:21.338 - error: ve.0 (7011) PortNotOpenError: Port Not Open at ModbusRTU.writeFC4 (/opt/iobroker/node_modules/modbus-serial/index.js:665:28) at ModbusRTU.writeFC3 (/opt/iobroker/node_modules/modbus-serial/index.js:651:14) at /opt/iobroker/node_modules/modbus-serial/apis/promise.js:48:31 at new Promise () at ModbusRTU.converted [as readHoldingRegisters] (/opt/iobroker/node_modules/modbus-serial/apis/promise.js:39:29) at /opt/iobroker/node_modules/iobroker.ve/main.js:258:36 at Array.forEach () at /opt/iobroker/node_modules/iobroker.ve/main.js:228:25 at Timeout._onTimeout (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:1734:38) at listOnTimeout (node:internal/timers:569:17) 2024-06-15 10:37:21.338 - error: ve.0 (7011) Port Not Open 2024-06-15 10:37:21.338 - error: ve.0 (7011) 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(). 2024-06-15 10:37:21.338 - error: ve.0 (7011) unhandled promise rejection: Port Not Open 2024-06-15 10:37:21.338 - error: ve.0 (7011) PortNotOpenError: Port Not Open at ModbusRTU.writeFC4 (/opt/iobroker/node_modules/modbus-serial/index.js:665:28) at ModbusRTU.writeFC3 (/opt/iobroker/node_modules/modbus-serial/index.js:651:14) at /opt/iobroker/node_modules/modbus-serial/apis/promise.js:48:31 at new Promise () at ModbusRTU.converted [as readHoldingRegisters] (/opt/iobroker/node_modules/modbus-serial/apis/promise.js:39:29) at /opt/iobroker/node_modules/iobroker.ve/main.js:258:36 at Array.forEach () at /opt/iobroker/node_modules/iobroker.ve/main.js:228:25 at Timeout._onTimeout (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:1734:38) at listOnTimeout (node:internal/timers:569:17) 2024-06-15 10:37:21.339 - error: ve.0 (7011) Port Not Open 2024-06-15 10:37:21.339 - error: ve.0 (7011) 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(). 2024-06-15 10:37:21.339 - error: ve.0 (7011) unhandled promise rejection: Port Not Open 2024-06-15 10:37:21.339 - error: ve.0 (7011) PortNotOpenError: Port Not Open at ModbusRTU.writeFC4 (/opt/iobroker/node_modules/modbus-serial/index.js:665:28) at ModbusRTU.writeFC3 (/opt/iobroker/node_modules/modbus-serial/index.js:651:14) at /opt/iobroker/node_modules/modbus-serial/apis/promise.js:48:31 at new Promise () at ModbusRTU.converted [as readHoldingRegisters] (/opt/iobroker/node_modules/modbus-serial/apis/promise.js:39:29) at /opt/iobroker/node_modules/iobroker.ve/main.js:258:36 at Array.forEach () at /opt/iobroker/node_modules/iobroker.ve/main.js:228:25 at Timeout._onTimeout (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:1734:38) at listOnTimeout (node:internal/timers:569:17) 2024-06-15 10:37:21.339 - error: ve.0 (7011) Port Not Open 2024-06-15 10:37:21.339 - error: ve.0 (7011) 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(). 2024-06-15 10:37:21.339 - error: ve.0 (7011) unhandled promise rejection: Port Not Open 2024-06-15 10:37:21.339 - error: ve.0 (7011) PortNotOpenError: Port Not Open at ModbusRTU.writeFC4 (/opt/iobroker/node_modules/modbus-serial/index.js:665:28) at ModbusRTU.writeFC3 (/opt/iobroker/node_modules/modbus-serial/index.js:651:14) at /opt/iobroker/node_modules/modbus-serial/apis/promise.js:48:31 at new Promise () at ModbusRTU.converted [as readHoldingRegisters] (/opt/iobroker/node_modules/modbus-serial/apis/promise.js:39:29) at /opt/iobroker/node_modules/iobroker.ve/main.js:258:36 at Array.forEach () at /opt/iobroker/node_modules/iobroker.ve/main.js:228:25 at Timeout._onTimeout (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:1734:38) at listOnTimeout (node:internal/timers:569:17) 2024-06-15 10:37:21.339 - error: ve.0 (7011) Port Not Open 2024-06-15 10:37:21.340 - error: ve.0 (7011) 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(). 2024-06-15 10:37:21.340 - error: ve.0 (7011) unhandled promise rejection: Port Not Open 2024-06-15 10:37:21.340 - error: ve.0 (7011) PortNotOpenError: Port Not Open at ModbusRTU.writeFC4 (/opt/iobroker/node_modules/modbus-serial/index.js:665:28) at ModbusRTU.writeFC3 (/opt/iobroker/node_modules/modbus-serial/index.js:651:14) at /opt/iobroker/node_modules/modbus-serial/apis/promise.js:48:31 at new Promise () at ModbusRTU.converted [as readHoldingRegisters] (/opt/iobroker/node_modules/modbus-serial/apis/promise.js:39:29) at /opt/iobroker/node_modules/iobroker.ve/main.js:258:36 at Array.forEach () at /opt/iobroker/node_modules/iobroker.ve/main.js:228:25 at Timeout._onTimeout (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:1734:38) at listOnTimeout (node:internal/timers:569:17)

Versions:

Karkas66 commented 2 months ago

PUSH