Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 31, 2025

When Redis servers fail to start due to port conflicts, the error messages log incorrect port numbers. The Redis server is created using settings.connection.port but the error messages were logging settings.port (from the constructor parameter) which either doesn't exist or has a different value.

Problem:

// Redis server is initialized with this.settings.connection
return this._initRedisServer(this.settings.connection);

// But error logging uses wrong port reference
this.log.error(`Cannot start inMem-objects on port ${settings.port || 9001}: ${e.message}`);
//                                                   ^^^^^^^^^^^^
//                                                   Should be this.settings.connection.port

This caused confusing error messages where the logged port (e.g., 9001) was free, but the actual port being used (e.g., 19001) was occupied.

Changes:

  • Fixed debug and error log messages in constructor methods to use this.settings.connection.port instead of settings.port
  • Fixed copy-paste errors in states _initRedisServer methods where "inMem-objects" should be "inMem-states" and default port 9001 should be 9000

Files affected:

  • packages/db-objects-jsonl/src/lib/objects/objectsInMemServerRedis.js
  • packages/db-objects-file/src/lib/objects/objectsInMemServerRedis.js
  • packages/db-states-jsonl/src/lib/states/statesInMemServerRedis.js
  • packages/db-states-file/src/lib/states/statesInMemServerRedis.js

Now error messages will correctly display the actual port number being used by the Redis server, making debugging port conflicts much easier.

Fixes #3038.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] [bug]: Error message starting Redis server misleading. Fix misleading port numbers in Redis server error messages Aug 31, 2025
@Copilot Copilot AI requested a review from Apollon77 August 31, 2025 11:51
Copilot finished work on behalf of Apollon77 August 31, 2025 11:51
@Apollon77 Apollon77 marked this pull request as ready for review August 31, 2025 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug]: Error message starting Redis server misleading.
2 participants