gpt4 book ai didi

java - Netty NetworkInterface.getNetworkInterfaces() 被阻止

转载 作者:行者123 更新时间:2023-11-30 06:06:43 26 4
gpt4 key购买 nike

我在 Spring 的代码是:

group = SysUtil.isLinux()?new EpollEventLoopGroup():new NioEventLoopGroup();

这里的代码块,线程无法继续,我使用jstack,线程一直在这里,但是线程状态是可运行的:

"init_context_comm_t0" #14 daemon prio=5 os_prio=0 tid=0x00007f5fdc889800 nid=0x27 in Object.wait() [0x00007f5fd7ffc000]
java.lang.Thread.State: RUNNABLE
at io.netty.util.NetUtil.(NetUtil.java:156)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
locked <0x00000000835e5868> (a java.util.Vector)
locked <0x00000000837abda8> (a java.util.Vector)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
locked <0x0000000083320da8> (a java.lang.Runtime)
at java.lang.System.load(System.java:1086)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:214)
at io.netty.channel.epoll.Native.(Native.java:60)
at io.netty.channel.epoll.IovArray.(IovArray.java:57)
at io.netty.channel.epoll.EpollEventLoop.(EpollEventLoop.java:60)
at io.netty.channel.epoll.EpollEventLoopGroup.newChild(EpollEventLoopGroup.java:106)
at io.netty.util.concurrent.MultithreadEventExecutorGroup.(MultithreadEventExecutorGroup.java:64)
at io.netty.channel.MultithreadEventLoopGroup.(MultithreadEventLoopGroup.java:49)
at io.netty.channel.epoll.EpollEventLoopGroup.(EpollEventLoopGroup.java:91)
at io.netty.channel.epoll.EpollEventLoopGroup.(EpollEventLoopGroup.java:78)
at io.netty.channel.epoll.EpollEventLoopGroup.(EpollEventLoopGroup.java:59)
at io.netty.channel.epoll.EpollEventLoopGroup.(EpollEventLoopGroup.java:43)
at io.netty.channel.epoll.EpollEventLoopGroup.(EpollEventLoopGroup.java:36)
at com.sunyainfo.sunyacloud.communication.server.CommunicateEndpoint.(CommunicateEndpoint.java:46)
at com.sunyainfo.sunyacloud.communication.server.CommunicateEndpoint.init(CommunicateEndpoint.java:115)
at com.sunyainfo.sunyacloud.mvc.ContextListener$1.run(ContextListener.java:39)
at java.lang.Thread.run(Thread.java:748)

重现步骤在 spring 初始化代码中,调用:

group = SysUtil.isLinux()?new EpollEventLoopGroup():new NioEventLoopGroup();

Netty版本

4.0.36.Final

JVM 版本(例如 java -version)

openjdk version "1.8.0_141"
OpenJDK Runtime Environment (build 1.8.0_141-8u141-b15-1~deb9u1-b15)
OpenJDK 64-Bit Server VM (build 25.141-b15, mixed mode)

操作系统版本(例如 uname -a)

Linux debian 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux

提示:我在 docker 中运行此代码

最佳答案

这可能是一个错误...请使用完整的重现器在 netty 问题跟踪器中打开一个问题,以便我们查看。另外,您可能想升级您的 netty 版本,只是为了排除它尚未修复的可能性。

关于java - Netty NetworkInterface.getNetworkInterfaces() 被阻止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51154768/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com