messense opened a new issue #3031:
URL: https://github.com/apache/rocketmq/issues/3031


   **BUG REPORT**
   
   1. Please describe the issue you observed:
   
   `mqnamesrv` does not start on Apple Silicon macOS Big Sur.
   
   - What did you do (The steps to reproduce)? 
   
   Download the latest binary release 4.9.0 and run `./mqnamesrv`
   
   - What did you expect to see?
   
   namesrv start successfully
   
   - What did you see instead?
   
   ```
   
-Djava.ext.dirs=/Users/messense/.jenv/versions/16/jre/lib/ext:/Users/messense/Downloads/rocketmq-all-4.9.0-bin-release/bin/../lib:/Users/messense/.jenv/versions/16/lib/ext
 is not supported.  Use -classpath instead.
   Error: Could not create the Java Virtual Machine.
   Error: A fatal exception has occurred. Program will exit.
   ```
   
   After make some modifications to migrate `java.ext.dirs` to classpath, it 
errors with 
   
   ```
   java.lang.NoClassDefFoundError: Could not initialize class 
io.netty.util.internal.PlatformDependent0
        at 
io.netty.util.internal.PlatformDependent.getSystemClassLoader(PlatformDependent.java:694)
        at io.netty.channel.nio.NioEventLoop$4.run(NioEventLoop.java:171)
        at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
        at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:167)
        at io.netty.channel.nio.NioEventLoop.<init>(NioEventLoop.java:149)
        at 
io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:102)
        at 
io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:64)
        at 
io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:49)
        at 
io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:70)
        at 
io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:65)
        at 
io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:56)
        at 
org.apache.rocketmq.remoting.netty.NettyRemotingServer.<init>(NettyRemotingServer.java:137)
        at 
org.apache.rocketmq.namesrv.NamesrvController.initialize(NamesrvController.java:80)
        at 
org.apache.rocketmq.namesrv.NamesrvStartup.start(NamesrvStartup.java:140)
        at 
org.apache.rocketmq.namesrv.NamesrvStartup.main0(NamesrvStartup.java:58)
        at 
org.apache.rocketmq.namesrv.NamesrvStartup.main(NamesrvStartup.java:51)
   ```
   
   which seems like https://github.com/netty/netty/issues/4671 which is fixed 
in https://github.com/netty/netty/pull/11202
   
   2. Please tell us about your environment:
   
   JDK 16 Apple Silicon macOS Big Sur.
   
   3. Other information (e.g. detailed explanation, logs, related issues, 
suggestions how to fix, etc):
   
   Upgrading to `netty-all-4.1.65.Final.jar` fixed the error.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to