question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sporadic failures due used tcp ports

See original GitHub issue

Problem description Sporadic failures with ControllerServiceStarter

java.lang.IllegalStateException: Expected the service ControllerServiceStarter [FAILED] to be RUNNING, but the service has FAILED
	at com.google.common.util.concurrent.AbstractService.checkCurrentState(AbstractService.java:366)
	at com.google.common.util.concurrent.AbstractService.awaitRunning(AbstractService.java:302)
	at com.google.common.util.concurrent.AbstractIdleService.awaitRunning(AbstractIdleService.java:165)
	at io.pravega.test.integration.demo.ControllerWrapper.awaitRunning(ControllerWrapper.java:183)
	at io.pravega.test.integration.ReaderGroupNotificationTest.setUp(ReaderGroupNotificationTest.java:102)
Caused by: java.lang.IllegalStateException: Expected the service GRPCServer [FAILED] to be RUNNING, but the service has FAILED
	at com.google.common.util.concurrent.AbstractService.checkCurrentState(AbstractService.java:366)
	at com.google.common.util.concurrent.AbstractService.awaitRunning(AbstractService.java:302)
	at com.google.common.util.concurrent.AbstractIdleService.awaitRunning(AbstractIdleService.java:165)
Caused by: java.net.BindException: Address already in use
	at sun.nio.ch.Net.bind0(Native Method)
	at sun.nio.ch.Net.bind(Net.java:433)
	at sun.nio.ch.Net.bind(Net.java:425)
	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)

Problem location Free port detection logic

Suggestions for an improvement Fix the issue.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
andreipaduroiucommented, Jul 31, 2020

ExtendedS3TestContext uses TestUtils.getAvailableListenPort already. So that means this method may not return a good value?

0reactions
tkaitchuckcommented, Nov 30, 2022

Every location that is encountering this should be sure that it is setting setReuseAddress(true)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Listening ports stop working sporadically - Microsoft Q&A
TCP /IP failed to establish an outgoing connection because the selected local endpoint was recently used to connect to the same remote endpoint....
Read more >
Troubleshooting Blocked Ports - Concurrency, Inc.
One of the more common networking issues we look at is where some or all ports between servers are being blocked. Typically, this...
Read more >
Intermittent failure connecting to port · Issue #25698 - GitHub
If I run a global nginx (or tomcat, doesn't matter) service in a swarm, exposing a port on each node (I am load...
Read more >
Possible causes for error: Connection failure for host ...
1. Port conflicts. Verify that the brokers are not using the same range of minport/maxport. · 2. System resources. Running out of file ......
Read more >
How To Troubleshoot Networking Ports - Varonis
Failure to listen on a port. [1] Most commonly - another process is already using; [2] Configuration/environmental related issues.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found