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

[BUG] - Submit api "Network.Socket.bind: resource busy (Address in use)" #5985

Open
Fell-x27 opened this issue Sep 13, 2024 · 3 comments
Open
Labels
needs triage Issue / PR needs to be triaged.

Comments

@Fell-x27
Copy link

External

Area
Other Any other topic (Delegation, Ranking, ...).

Summary
When trying to run two instances(preprod+preview) of cardano-submit-api with the same IP but different ports, one of them throws the error: Network.Socket.bind: resource busy (Address in use).

Steps to reproduce

  1. Start cardano-node in the preview network on 127.0.0.1:5003
  2. Start cardano-node in the preprod network on 127.0.0.1:5002
  3. Start submit-api in the preview network on 127.0.0.1:8997
  4. Start submit-api in the preprod network on 127.0.0.1:8998
  5. Check the console.

Expected behavior
The check for availability should take the port into account. Both instances should be able to run in parallel.

System info (please complete the following information):

  • OS Name: Ubuntu
  • OS Version: 22.04
  • Node version cardano-node 9.1.1 - linux-x86_64 - ghc-8.10

Additional context
Two cardano-node instances for different networks are running on 127.0.0.1 on different ports. The cardano-submit-api instances are also running on 127.0.0.1 on different ports. No matter the order in which they are started, only the one that was started first will work. I don't remember this behavior occurring in previous versions.

@Fell-x27 Fell-x27 added the needs triage Issue / PR needs to be triaged. label Sep 13, 2024
@Fell-x27
Copy link
Author

Fell-x27 commented Sep 15, 2024

Solution: the --metrics-port argument should be specified with a unique number.

But I still think that it shouldn't be a stopper. Maybe there should be a warning, like the Node does, but not a crash.

@nabinpkl
Copy link

We are able to reproduce the issue as reported when running multiple node instances but using different port numbers.

Proper error messages or documentation should be provided to include metrics-port, or even better; we should be able to run in parallel with just enough configuration.

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue / PR needs to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants