Fix misleading port numbers in Redis server error messages #3084
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 loggingsettings.port
(from the constructor parameter) which either doesn't exist or has a different value.Problem:
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:
this.settings.connection.port
instead ofsettings.port
_initRedisServer
methods where "inMem-objects" should be "inMem-states" and default port 9001 should be 9000Files 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.