-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
aSocket().bind() sometimes throws Already bound SocketException #1049
Comments
Have similar problem
50/50 for normal start/"already bound" exception
Dirty workaround
But it is produce other non-fatal exception
|
Perfectly reproducible on Java 8 and Java 11 even when explicitly trying to create an unbound UDP Socket:
And it produces the same errors:
|
I run into same issue with UDP socket. |
I seem to come across the same bug... |
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
Ktor Version
1.1.3
Ktor Engine Used
Netty, Socket
JVM Version, Operating System and Relevant Context
openjdk version "10.0.2" 2018-07-17, Ubuntu 18.04.2 LTS
Feedback
It's hard to reproduce, the problem appears and disappears without observable reasons. I have a server starting two Netty instances and one UDP socket
Console output:
I checked many times - no other instance is running, no ports are busy. At the same time, tcp ports are successfully taken, while this problem with udp socket sometimes persists even after reboot. And then just goes away without any changes.
Is it possible that like in most upvoted answer here, ktor sometimes creates an already bound socket?
The text was updated successfully, but these errors were encountered: