ProgrammerAH

Programmer Guide, Tips and Tutorial

Skip to content
  • Home
  • Python
  • PHP
  • JAVA
  • MySQL
  • Linux
  • JavaScript
  • Privacy Policy

[Solved] Rocketmq Root Account Startup Error: Permission denied

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] SpringBoot+Dubbo Startup Error: Fail to start server(url: dubbo://192.168.0.9:20880/service
  • [Solved] org.apache.flink.client.program.ProgramInvocationException: The main method caused an error
  • [Solved] WebFlux Error: DataBufferLimitException: Part headers exceeded the memory usage limit of 8192 bytes
  • Error:Abnormal build process termination [How to Solve]
  • [Solved] Rocketmq installation error: org.apache.rocketmq.remoting.exception.remotingconnectexception: connect to failed
  • [Solved] Jenkins error: Asynchronous execution failure
  • Java uses single thread pool to realize multi thread sequential execution (non alternating, non synchronous)
  • Three ways of thread sequence alternate execution in Java lock free programming
  • [Solved] Tomcat configurate HTTPS error: java.net.SocketException: Permission denied
  • [Solved] Rocketmq remote connection error: sendDefaultimpl call timeout
  • JAVA Error Illegal access: this web application instance has been stopped already. Could not load net.sf
  • [Solved] nacos Error: Client not connected,current status:STARTING,StatusRuntimeException
  • [Solved] GRPC-Server Error: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String; CLjava
  • [Solved] Internal error (java.lang.IllegalStateException): Duplicate key org.jetbrains
  • jemter java.net.BindException:Address alreardy in use [How to Solve]
  • [Solved] Mapreducer Class Conversion error: java.lang.ClassCastException
  • [Solved] Solr8 establishes the cluster node as active, but the query reports an error
  • [How to Solve Error]java.util.Date cannot be cast to java.sql.Date
  • Spring boot uses thread pool to realize asynchronous processing without return and asynchronous processing with return
  • Run hadoop fs -put Command Error: java.io.IOException: Got error, status message , ack with firstBadLink

This entry was posted in JAVA and tagged java, rocketmq, Rocketmq Root Account Startup Error, Strange questions on 2021-11-08 by Robins.

Post navigation

← Oracle monitoring error tns-01189 [How to Solve] [Solved] Odoo Cannot log in error after the Database is Recovered →

Recent Posts

  • [Solved] error when starting dev server:Error: listen EACCES: permission denied 0.0.0.0:80 at Server.set
  • [Solved] ZooKeeper Configurate Error: Error contacting service. It is probably not running.
  • [Solved] error Component name “index“ should always be multi-word vue/multi-word-component-names
  • [ERROR SystemVerification]: failed to parse kernel config: unable to load kernel module: “configs“
  • core-js/modules/es.error.cause.js [How to Solve]

Tags

  • Android
  • Android studio
  • back-end
  • Big data
  • bug
  • c++
  • cents
  • database
  • Deep learning
  • development language
  • docker
  • eclipse
  • error
  • front end
  • git
  • Hadoop
  • idea
  • intellectual idea
  • java
  • javascript
  • linux
  • maven
  • mybatis
  • mysql
  • node.js
  • Npm
  • OpenCV
  • Operation and maintenance
  • php
  • ProgrammerAH
  • python
  • pytorch
  • qt
  • report errors
  • solution
  • spring
  • spring boot
  • SQL
  • tensorflow
  • The database
  • The server
  • tomcat
  • ubuntu
  • View.js
  • windows
Proudly powered by WordPress