-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Some SocketOptions not supported on Windows #6661
Comments
Opened PR #6663 |
…t-setoptions Issue #6661 - Make ServerConnector socket options setting optional
Did this go in? I'm still getting this on Jetty 11.0.12
|
The exception is logged at DEBUG level since 11.0.7. |
@delanym That is Jetty reporting (via debug level logging event) that your JVM is unable to support SO_REUSEPORT on that Socket type. Here's the code in 11.0.12 ... And it being used to attempt to set SO_REUSEPORT |
Thanks I'll see whats going on with the JDK. From my miserable understanding of Java serving up a stack exception is a costly affair so i'd like to avoid that, and reuse the port if possible. |
This happens on the
Windows has all sorts of wonky and hard to follow rules on what socket options can be used under what conditions. If you take look at C# or Dot-Net you'll find that at least those runtimes will also fail on setting SO_REUSEADDR and say something along the lines of "System.PlatformNotSupportedException: Socket options not supported on this platform, as they are invalid for use after a failed connection attempt" |
@delanym looks like many projects (even non-Java projects) do not set
We attempt to set it, and if unable we log it, and continue running. |
SO_REUSEADDR flag works as expected on POSIX platforms, but will cause indeterminate behaviors on Windows sockets. See: - jetty/jetty.project#6661 (comment) - learn.microsoft.com/en-us/windows/win32/winsock/using-so-reuseaddr-and-so-exclusiveaddruse#using-so_reuseaddr
SO_REUSEADDR flag works as expected on POSIX platforms, but will cause indeterminate behaviors on Windows sockets. See: - jetty/jetty.project#6661 (comment) - https://learn.microsoft.com/en-us/windows/win32/winsock/using-so-reuseaddr-and-so-exclusiveaddruse#using-so_reuseaddr Fixes #23947 Fixes https://hazelcast.atlassian.net/browse/HZ-2213
Jetty version(s)
10.0.x
Java version/vendor
(use: java -version)
11.0.12
OS type/version
Windows 10
Description
The recent work on Issue #6372 is not compatible with Windows 10.
The text was updated successfully, but these errors were encountered: