Skip to content

[bug]: Error message starting Redis server misleading. #3038

Open
@hacki11

Description

@hacki11

No existing issues.

  • There is no existing issue for my problem.

Description

If a Redis server can not be started due to occupied port, the error message logs the wrong port.
The Redis server is created for settings.connection.port but the error message wants to log settings.port which does not exist so it logs the hard-coded default 9001 instead. While the real port is different (19001) for me, it is strange to see an error for 9001. While 9001 is free, i get the error because 19001 seems to be occupied.

`${this.namespace} Cannot start inMem-objects on port ${settings.port || 9001}: ${e.message}`,

Reproduction instruction

No response

JS-controller version

7.0.6

Node version

20.18.3

Log

Shows that the logging in objectsInRedisClient.js logs the correct port, while objectsInMemServerRedis.js not.

Server Data File: /tmp/test-iobroker.mhi-wfrac/iobroker-data/objects.jsonl       inMemFileDB.js:90
Server  Redis inMem-objects listening on port 9001                                               objectsInMemServerRedis.js:68
 Redis Objects: Use Redis connection: 127.0.0.1:19001                                           objectsInRedisClient.js:175

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions