Jetty 10.0.15 错误无法在 sun.nio.ch.ServerSocketChannelImpl[unbound] 上将 SO_REUSEPORT 配置为 false

问题描述 投票:0回答:1

我们已将码头从 9.4.30 升级至 10.0.15。

Jetty 升级后,RESTful 服务未运行,出现以下错误

org.eclipse.jetty.server.AbstractConnector - 无法在 sun.nio.ch.ServerSocketChannelImpl[unbound] 上将 SO_REUSEPORT 配置为 false

java.lang.UnsupportedOperationException:不支持“SO_REUSEPORT”

如何解决这个问题?

eclipse jetty osgi osgi-bundle jetty-10
1个回答
0
投票

您的 JVM 不支持该网络上的

SO_REUSEPORT
...

示例

java.nio.channels.ServerSocketChannel serverSocketChannel = ...;
java.net.SocketOption soReusePortOpt =
    java.net.StandardSocketOptions.SO_REUSEPORT;

serverSocketChannel.setOption(soReusePortOpt, true); // this fails on your JVM

这不是 Jetty 可以修复或解决的问题,您需要找出 JVM 出现这种情况的原因。

Jetty 上有关此主题的过去问题 - https://github.com/eclipse/jetty.project/issues/6661

© www.soinside.com 2019 - 2024. All rights reserved.