Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

启动broker的时候报错 #1

Open
Le1a opened this issue May 31, 2023 · 6 comments
Open

启动broker的时候报错 #1

Le1a opened this issue May 31, 2023 · 6 comments

Comments

@Le1a
Copy link

Le1a commented May 31, 2023

docker: Error response from daemon: could not get container for mqsrv: No such container: mqsrv
image

@4mazing
Copy link
Owner

4mazing commented Jun 1, 2023

broker启动的时候,link参数指定了namesrv的容器名称或者IP,文档命名的namesrv容器名是mqsrv。

@Le1a
Copy link
Author

Le1a commented Jun 1, 2023

我启动namesrv也是参照文档启动的

@4mazing
Copy link
Owner

4mazing commented Jun 1, 2023

两个方式:

  1. 用下面的重新启动一个namesrv
    docker run -dit -p 9876:9876 --name mqsrv -e "MAX_POSSIBLE_HEAP=100000000" apache/rocketmq:4.9.1 sh mqnamesrv /bin/bash
  2. docker ps命令看下当前namesrv的容器名称是什么,在启动broker的时候,--link参数将名称改为namesrv现在的名称;
    --link 现有环境的namesrv容器名称:namesrv

@xjhonly
Copy link

xjhonly commented Jun 5, 2023

namesrv和broker都绑定了10909端口吗,启动broker容器会报错
docker run -dit -p 10909:10909 -p 10911:10911 --name mqbroker --restart=always --link mqsrv:namesrv -e "NAMESRV_ADDR=namesrv:9876" -e "MAX_POSSIBLE_HEAP=200000000" apache/rocketmq:4.9.1 sh mqbroker -c /home/rocketmq/rocketmq-4.9.1/conf/broker.conf
fedf5c6e6951d73535a8af9eb51a1546a43c8642c98dc1af4f655441c0a6ba88
docker: Error response from daemon: driver failed programming external connectivity on endpoint mqbroker (c7b0329ac333609c845263cc9e8e0bcc0d1f8f9ac5da3480c3d24787dcff3e88): Bind for 0.0.0.0:10909 failed: port is already allocated.

@4mazing
Copy link
Owner

4mazing commented Jun 5, 2023

修改个端口

@xjhonly
Copy link

xjhonly commented Jun 5, 2023

修改个端口

嗯嗯,启动namesrv不需要10909端口

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants