Skip to content

restart loop on using already used port #11

@chris299

Description

@chris299

Describe the bug
using an address in the config which is already in use, there is no warning to the user.
the adapter just ends in a restart loop.

To Reproduce
Steps to reproduce the behavior:
use i.e. 8082 for the adapter which is used by vis.

Expected behavior
a warning in the config dialogue to the user

Screenshots & Logfiles

log

<!--StartFragment-->
iobapp.0 | 2024-07-07 11:53:28.518 | info | terminating
-- | -- | -- | --
iobapp.0 | 2024-07-07 11:53:28.017 | debug | WebSocket server closed.
iobapp.0 | 2024-07-07 11:53:28.017 | debug | Server closed.
iobapp.0 | 2024-07-07 11:53:28.017 | warn | Terminated (UNCAUGHT_EXCEPTION): Without reason
iobapp.0 | 2024-07-07 11:53:28.017 | info | terminating
iobapp.0 | 2024-07-07 11:53:28.016 | debug | Adapter is unloading.
iobapp.0 | 2024-07-07 11:53:28.011 | error | Exception-Code: EADDRINUSE: listen EADDRINUSE: address already in use :::8082
iobapp.0 | 2024-07-07 11:53:28.011 | error | Error:  listen EADDRINUSE: address already in use :::8082    at  Server.setupListenHandle [as _listen2] (node:net:1817:16)    at  listenInCluster (node:net:1865:12)    at Server.listen (node:net:1953:7)     at Function.listen  (/opt/iobroker/node_modules/express/lib/application.js:635:24)    at  Iobapp.onReady  (/opt/iobroker/node_modules/iobroker.iobapp/main.js:56:32)    at  Iobapp.emit (node:events:517:28)    at Iobapp._callReadyHandler  (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:9095:18)     at  /opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:9074:26
iobapp.0 | 2024-07-07 11:53:28.010 | error | uncaught exception: listen EADDRINUSE: address already in use :::8082
iobapp.0 | 2024-07-07 11:53:28.008 | info | WebSocket server listening on port 8083
iobapp.0 | 2024-07-07 11:53:28.004 | debug | Adapter ready: Initializing express app.

<!--EndFragment-->

Versions:

  • Adapter version: 0.6 (?)
  • JS-Controller version: 5.0.19
  • Node version: v18.20.3
  • Operating system: ubuntu 22.04

Additional context
none

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions