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.

Expected behavior

at the linux os netty use epoll

Actual behavior

but have a excpetion when i start the netty: 2018-09-05 16:06:35,635 [main] DEBUG io.netty.util.internal.NativeLibraryLoader - Unable to load the library 'netty_transport_native_epoll_x86_64', trying other loading mechanism. 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:870) 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)

Steps to reproduce

Minimal yet complete reproducer code (or URL to code)

`private EventLoopGroup bossGroup = null;
private EventLoopGroup workerGroup = null;
private ServerBootstrap bootstrap = null;
if (osName.equals(“Linux”)) { this.bossGroup = new EpollEventLoopGroup(ServerCoreInfo.DEFAULT_NETTY_CORE_THREAD_NUM); this.workerGroup = new EpollEventLoopGroup(ServerCoreInfo.DEFAULT_NETTY_WORK_THREAD_NUM); } else { this.bossGroup = new NioEventLoopGroup(ServerCoreInfo.DEFAULT_NETTY_CORE_THREAD_NUM); this.workerGroup = new NioEventLoopGroup(ServerCoreInfo.DEFAULT_NETTY_WORK_THREAD_NUM); }

if (osName.equals(“Linux”)) { // Linux平台用Epoll模式 bootstrap.channel(EpollServerSocketChannel.class); } else { bootstrap.channel(NioServerSocketChannel.class); }`

Netty version

<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-all</artifactId>
    <version>4.0.56.Final</version>
</dependency>

JVM version (e.g. java -version)

java version “1.8.0_181” Java™ SE Runtime Environment (build 1.8.0_181-b13) Java HotSpot™ 64-Bit Server VM (build 25.181-b13, mixed mode)

OS version (e.g. uname -a)

Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
normanmaurercommented, Sep 5, 2018

All is good as you can see here:

2018-09-05 18:07:05,363 [main] DEBUG io.netty.util.internal.NativeLibraryLoader - Successfully loaded the library /tmp/libnetty_transport_native_epoll_x86_641221747797390202152.so

We try different loading strategies until we succeed. So the first few logs are because these were not successful.

2reactions
normanmaurercommented, Sep 6, 2018

@KING754 yes… thats why its debug and not warn or error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

epoll(7) - Linux manual page - man7.org
epoll_wait (2) waits for I/O events, blocking the calling thread if no events are currently available. (This system call can be thought of...
Read more >
Async IO on Linux: select, poll, and epoll - Julia Evans
First way: select & poll ... These 2 system calls are available on any Unix system, while epoll is Linux-specific. Here's basically how...
Read more >
Linux: What can you epoll? - Graham King
epoll accepts fd's from terminals and pseudo-terminals. It accepts fd 0 (stdin), 1 (stdout) and 2 (stderr). This is useful for programs designed ......
Read more >
epoll() Tutorial – epoll() In 3 Easy Steps! - Such Programming
This tutorial assumes you're familiar and comfortable with Linux, the syntax of C and the usage of file descriptors in UNIX-like systems.
Read more >
The method to epoll's madness. My previous post covered the…
epoll stands for event poll and is a Linux specific construct. It allows for a process to monitor multiple file descriptors and get ......
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