question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Epoll native library does NOT load after upgrade between 4.1.39 and 4.1.40

See original GitHub issue

Expected behavior

Native epoll support keeps working after upgrade.

Actual behavior

Server apps fail on startup with the following stack trace:

...
Caused by: java.lang.UnsatisfiedLinkError: failed to load the required native library
	at io.netty.channel.epoll.Epoll.ensureAvailability(Epoll.java:80)
	at io.netty.channel.epoll.EpollEventLoop.<clinit>(EpollEventLoop.java:52)
	at io.netty.channel.epoll.EpollEventLoopGroup.newChild(EpollEventLoopGroup.java:142)
	at io.netty.channel.epoll.EpollEventLoopGroup.newChild(EpollEventLoopGroup.java:35)
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:84)
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:58)
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:47)
	at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:59)
	at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:104)
	at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:91)
	at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:68)
	at com.db.abos.common.api.transport.netty.NettyOsFactory.newGroup(NettyOsFactory.java:66)
	at com.db.abos.common.api.transport.netty.ServerWebSocketFactory.<init>(ServerWebSocketFactory.java:91)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)
	... 19 common frames omitted
Caused by: java.lang.UnsatisfiedLinkError: /tmp/libnetty_transport_native_epoll_x86_643970988024581631659.so: /lib64/libc.so.6: version `GLIBC_2.12' not found (required by /tmp/libnetty_transport_native_epoll_x86_643970988024581631659.so)
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
	at java.lang.Runtime.load0(Runtime.java:810)
	at java.lang.System.load(System.java:1086)
	at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36)
	at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:349)
	at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:203)
	at io.netty.channel.epoll.Native.loadNativeLibrary(Native.java:228)
	at io.netty.channel.epoll.Native.<clinit>(Native.java:57)
	at io.netty.channel.epoll.Epoll.<clinit>(Epoll.java:39)
	... 36 common frames omitted
	Suppressed: java.lang.UnsatisfiedLinkError: /tmp/libnetty_transport_native_epoll_x86_643970988024581631659.so: /lib64/libc.so.6: version `GLIBC_2.12' not found (required by /tmp/libnetty_transport_native_epoll_x86_643970988024581631659.so)
		at java.lang.ClassLoader$NativeLibrary.load(Native Method)
		at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
		at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
		at java.lang.Runtime.load0(Runtime.java:810)
		at java.lang.System.load(System.java:1086)
		at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36)
		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.lang.reflect.Method.invoke(Method.java:498)
		at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:369)
		at java.security.AccessController.doPrivileged(Native Method)
		at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:361)
		at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:339)
		... 40 common frames omitted
	Suppressed: java.lang.UnsatisfiedLinkError: no netty_transport_native_epoll_x86_64 in java.library.path
		at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
		at java.lang.Runtime.loadLibrary0(Runtime.java:871)
		at java.lang.System.loadLibrary(System.java:1122)
		at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
		at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:349)
		at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:136)
		... 39 common frames omitted
		Suppressed: java.lang.UnsatisfiedLinkError: no netty_transport_native_epoll_x86_64 in java.library.path
			at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
			at java.lang.Runtime.loadLibrary0(Runtime.java:871)
			at java.lang.System.loadLibrary(System.java:1122)
			at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
			at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
			at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
			at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
			at java.lang.reflect.Method.invoke(Method.java:498)
			at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:369)
			at java.security.AccessController.doPrivileged(Native Method)
			at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:361)
			at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:339)
			... 40 common frames omitted
	Suppressed: java.lang.UnsatisfiedLinkError: could not load a native library: netty_transport_native_epoll
		at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:224)
		at io.netty.channel.epoll.Native.loadNativeLibrary(Native.java:231)
		... 38 common frames omitted
	Caused by: java.io.FileNotFoundException: META-INF/native/libnetty_transport_native_epoll.so
		at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:173)
		... 39 common frames omitted
		Suppressed: java.lang.UnsatisfiedLinkError: no netty_transport_native_epoll in java.library.path
			at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
			at java.lang.Runtime.loadLibrary0(Runtime.java:871)
			at java.lang.System.loadLibrary(System.java:1122)
			at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
			at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:349)
			at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:136)
			... 39 common frames omitted
			Suppressed: java.lang.UnsatisfiedLinkError: no netty_transport_native_epoll in java.library.path
				at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
				at java.lang.Runtime.loadLibrary0(Runtime.java:871)
				at java.lang.System.loadLibrary(System.java:1122)
				at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
				at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
				at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
				at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
				at java.lang.reflect.Method.invoke(Method.java:498)
				at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:369)
				at java.security.AccessController.doPrivileged(Native Method)
				at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:361)
				at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:339)
				... 40 common frames omitted

Steps to reproduce

assertNull(Epoll.unavailabilityCause())

Netty version

4.1.39 - epoll works 4.1.40 - epoll does NOT work

JVM version (e.g. java -version)

% java -version
openjdk version "1.8.0_221"
OpenJDK Runtime Environment (Zulu 8.39.0.8-SA-linux64) (build 1.8.0_221-b08)
OpenJDK 64-Bit Server VM (Zulu 8.39.0.8-SA-linux64) (build 25.221-b08, mixed mode)

OS version (e.g. uname -a)

% uname -a
Linux gmafxu43 3.0.101-108.98-default #1 SMP Mon Jul 15 13:58:06 UTC 2019 (262a94d) x86_64 x86_64 x86_64 GNU/Linux

% cat /etc/os-release
NAME="SLES"
VERSION="11.4"
VERSION_ID="11.4"
PRETTY_NAME="SUSE Linux Enterprise Server 11 SP4"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:11:4"

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:22 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
carl-mastrangelocommented, Nov 7, 2019

glibc 2.3 was released in 2002. I think you need to upgrade. If not, you can compile the native portion of netty on box, with the correct linkage.

0reactions
ursajcommented, Nov 25, 2019

@normanmaurer thanks a lot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - How to fix the "Found Netty's native epoll transport in the ...
Found Netty's native epoll transport in the classpath, but epoll is not available. Using NIO instead." The application works normally, ...
Read more >
Index (Netty API Reference (4.0.54.Final)) - javadoc.io
Inserts a ChannelHandler after an existing handler of this pipeline. addAfter(EventExecutorGroup, String, String, ChannelHandler) - Method in interface io.netty ...
Read more >
Faced With Error: Nested Exception Is Java.Lang ... - ADocLib
Epoll native library does NOT load after upgrade between 4.1.39 and 4.1.40 hot 17. Once this is extracted gRPC calls System.loadLibrarypath it is...
Read more >
netty/netty - Gitter
Epoll loads fine but not openssl, tc-native jar is there, I am using eclipse-temurin:17.0.2_8-jdk-focal, netty 4.1.73 and tc-native v2.0.48.
Read more >
Is this netty problem a show stopper? - Google Groups
I think the issue might be that you are not using the platform specific native-epoll jar. netty-transport-native-epoll-4.0.27.Final.jar does not contain the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found