Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Address Already in Use When Running Multiple Booster Services on Different Ports because websockets port is not configurable #1495

Open
javiertoledo opened this issue Nov 15, 2023 · 1 comment
Assignees
Labels
bug Something isn't working dev-experience Developer Experience maintainance package:cli Affects the CLI package provider:local size: S Tasks that involve two or three lines of code

Comments

@javiertoledo
Copy link
Member

Bug Report

Current Behavior

When attempting to run two Booster services locally on different ports (3000 and 3001), the first service starts successfully, but starting the second service on port 3001 results in an error. The error message indicates listen EADDRINUSE: address already in use :::65529, suggesting a conflict with the WebSocket port, which seems to default to 65529 and does not change when specifying a different HTTP port.

Expected Behavior

Each Booster service should start successfully on its designated port without conflicting on the WebSocket port. The expectation is that running multiple Booster services locally should be feasible, with each service operating independently on its respective port.

Possible Solution

A potential solution could involve providing a way to configure the WebSocket port via the CLI, similar to how the HTTP port is set. This would allow different instances of Booster services to use distinct WebSocket ports and avoid conflicts.

@javiertoledo javiertoledo added bug Something isn't working size: S Tasks that involve two or three lines of code provider:local package:cli Affects the CLI package dev-experience Developer Experience maintainance labels Nov 15, 2023
@javiertoledo
Copy link
Member Author

javiertoledo commented Nov 16, 2023

Workaround

You can override the default WS port by setting the LOCAL_ENVIRONMENT_WEBSOCKET_SERVER_PORT environment variable to a different number.

You can run your web sockets server in a different port by running the local environment this way:

$ LOCAL_ENVIRONMENT_WEBSOCKET_SERVER_PORT=31415 npx boost start -e local -p 3001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dev-experience Developer Experience maintainance package:cli Affects the CLI package provider:local size: S Tasks that involve two or three lines of code
Projects
Status: No status
Development

No branches or pull requests

1 participant