Specific information
Modify the JVM size in/bin/runserver.sh and/bin/runbroker.sh to 256M
and then command nohup sh bin/mqnamesrv &
, check nohup.Out
and find the error permission denied
. I checked on the Internet and said that non root users cannot use ports below 1000, but what does this have to do with my
rocketmq.
// error
java.net.SocketException: Permission denied
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:461)
at sun.nio.ch.Net.bind(Net.java:453)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:222)
at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:127)
at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:501)
at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1218)
at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:506)
at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:491)
at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:965)
at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:210)
at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:353)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:408)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:455)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
at java.lang.Thread.run(Thread.java:748)
Error reason
The reason for the error is that the Hyper-V function (Windows subsystem) is enabled on the computer and some ports are disabled. Specific view
Windows CMD enter the following command
netsh interface ipv4 show excludedportrange protocol=tcp
//After querying, there will be the following unavailable port range, including 9876, which makes the port unavailable, instead of the common non root account unable to use ports below 1000
Protocol tcp port exclusion range
Start port End port
1064 1163
1364 1463
1464 1563
1564 1663
2501 2600
2801 2900
2901 3000
3001 3100
5357 5357
7639 7738
7739 7838
9834 9933
10034 10133
10241 10340
10341 10440
10441 10540
10541 10640
12066 12165
12166 12265
50000 50059
Managed port exclusion.
Other Solution:
Modify the port used by rocketmq to port 9950
Project directory: /software/rocketmq
Create a namesrv.properties file in the /conf directory
The content is listenPort=9950
server startup script start-server.sh
nohup sh /software/rocketmq/bin/mqnamesrv -c /software/rocketmq/conf/namesrv.properties &> ./server.log 2>&1
broker startup script start-broker.sh
nohup sh /software/rocketmq/bin/mqbroker -n localhost:9950 &> ./broker.log 2>&1
Read More:
- [Solved] Rocketmq installation error: org.apache.rocketmq.remoting.exception.remotingconnectexception: connect to failed
- [Solved] Activity jump permission UID Error: ActivityTaskmanager: Permission Denied
- [Solved] Tomcat configurate HTTPS error: java.net.SocketException: Permission denied
- [Solved] rocketmq Startup Error: Error: Could not create the Java Virtual Machine.
- [Solved] XxlJob Error: XxlJobFileAppender [101] -| Permission denied
- [Solved] Rocketmq remote connection error: sendDefaultimpl call timeout
- [Solved] Windows Start RocketMq Error: Unrecognized VM option ‘UseCMSCompactAtFullCollection‘
- [Solved] SpringBoot+Dubbo Startup Error: Fail to start server(url dubbo192.168.0.920880service
- [Solved] SpringBoot+Dubbo Startup Error: Fail to start server(url: dubbo://192.168.0.9:20880/service
- [Solved] RocketMQ Start broker Error: StoreScheduledThread1
- kafka Environment Build and Startup Error: ERROR [KafkaServer id=1] Fatal error during KafkaServer startup. Prepare to shutdown
- [Solved] Tomcat startup error: sub-container startup failed
- [Solved] kafka startup Error: ERROR Fatal error during KafkaServer startup. Prepare to shutdown
- [Solved] java.security.AccessControlException: Access Denied Error
- CreateProcess error = 5, access denied. [How to Solve]
- [Solved] hadoop Error: 9000 failed on connection exception java.net.ConnectException Denied to Access
- [Solved] SpringBoot Startup Error: Unable to start LiveReload server
- Springboot error about swagger startup [How to Solve]
- Redis: DENIED Redis is running in protected mode [How to Solve]
- [Solved] Nacos1.3.2 Startup Error: Unable to start embedded Tomcat