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

DummyServer can fail to bind a port intermittently #6

Open
fracture91 opened this issue Mar 31, 2013 · 1 comment
Open

DummyServer can fail to bind a port intermittently #6

fracture91 opened this issue Mar 31, 2013 · 1 comment
Labels

Comments

@fracture91
Copy link
Owner

This happened during my team's automated testing:
http://tiki.cs.wpi.edu:8080/jenkins/job/dragonsparkles4/34/changes

It looks like the port to use is hardcoded. While unlikely, it's possible for that port to be in use. Ideally, we could bind to any high-numbered port that isn't in use.

java.lang.RuntimeException: java.net.BindException: Address already in use
    at edu.wpi.cs.wpisuitetng.network.dummyserver.DummyServer.start(DummyServer.java:60)
    at edu.wpi.cs.wpisuitetng.network.TestRequest.testRequestCommunication(TestRequest.java:209)
Caused by: java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind(Native Method)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
    at org.simpleframework.transport.connect.SocketAcceptor.bind(SocketAcceptor.java:183)
    at org.simpleframework.transport.connect.SocketAcceptor.<init>(SocketAcceptor.java:100)
    at org.simpleframework.transport.connect.SocketListener.<init>(SocketListener.java:81)
    at org.simpleframework.transport.connect.SocketListenerManager.listen(SocketListenerManager.java:98)
    at org.simpleframework.transport.connect.SocketListenerManager.listen(SocketListenerManager.java:81)
    at org.simpleframework.transport.connect.SocketConnection.connect(SocketConnection.java:106)
    at edu.wpi.cs.wpisuitetng.network.dummyserver.DummyServer.start(DummyServer.java:58)
@jmpage
Copy link
Collaborator

jmpage commented Jun 14, 2013

Port is over 30000 on the master branch right now. The test should be modified to bind to an inactive port instead though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants