dypcoder commented on issue #742:
URL: 
https://github.com/apache/rocketmq-clients/issues/742#issuecomment-2318234715

   I encountered a situation where, after installing using Docker, due to port 
conflicts, I did port mapping.
   
   
   The original command was:
   
   
   ```Shell
   docker run -d \
   --name rmqbroker \
   --network rocketmq \
   --privileged=true \
   -p 10912:10912 -p 10911:10911 -p 10909:10909 \
   -p 8090:8080 -p 8091:8081 \
   -e "NAMESRV_ADDR=rmqnamesrv:9876" \
   -v 
/opt/rocketmq/broker/conf/broker.conf:/home/rocketmq/rocketmq-5.3.0/conf/broker.conf
 \
   apache/rocketmq:5.3.0 sh mqbroker --enable-proxy \
   -c /home/rocketmq/rocketmq-5.3.0/conf/broker.conf
   ```
   
   While debugging, I discovered that it was consistently retrieving port 8081.
   
![image](https://github.com/user-attachments/assets/fa0f9035-3d7a-443f-bc15-5dfe705dbd13)
   I created the rmq-proxy.json file on the host machine and mounted it to the 
container.
   
   The configuration content is as follows:
   
   ```json
   {
     "rocketMQClusterName": "DefaultCluster",
     "grpcServerPort": 8091,
     "remotingListenPort": 8090
   }
   ```
   I then modified the Docker command to:
   
   
   ```Shell
   docker run -d --restart=always \
   --name rmqbroker \
   --network rocketmq \
   --privileged=true \
   -p 10912:10912 -p 10911:10911 -p 10909:10909 \
   -p 8090:8090 -p 8091:8091 \
   -e "NAMESRV_ADDR=rmqnamesrv:9876" \
   -v 
/opt/rocketmq/broker/conf/broker.conf:/home/rocketmq/rocketmq-5.3.0/conf/broker.conf
 \
   -v 
/opt/rocketmq/broker/conf/rmq-proxy.json:/home/rocketmq/rocketmq-5.3.0/conf/rmq-proxy.json
 \
   apache/rocketmq:5.3.0 sh mqbroker --enable-proxy \
   -c /home/rocketmq/rocketmq-5.3.0/conf/broker.conf
   ```
   After restarting the broker container, it ran normally.
   
   
![image](https://github.com/user-attachments/assets/996d3df9-c0ec-444d-a65c-6c141d35cd76)
   
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to