emqxarchive / emqx-docker

This repository is no longer maintained, please go to https://github.com/emqx/emqx-rel/tree/master/deploy/docker
Apache License 2.0
235 stars 162 forks source link

docker run net host mode happen timeout #105

Open watchworld opened 5 years ago

watchworld commented 5 years ago

Make sure you read and understand http://emqtt.io/docs/v2/index.html. Use one of the two templates below and delete the rest.


BUG REPORT

Expected behavior

node.name=emq221@..** emqx 3.0 is started successfully! 277}]}]}}}} Start http:dashboard listener on 18083 successfully. Start mqtt:tcp listener on 127.0.0.1:11883 successfully. Start mqtt:tcp listener on 0.0.0.0:1883 successfully. Start mqtt:ws listener on 0.0.0.0:8083 successfully. Start mqtt:ssl listener on 0.0.0.0:8883 successfully. Start mqtt:wss listener on 0.0.0.0:8084 successfully. EMQ X Broker v3.0.0 is running now! Eshell V10.2 (abort with ^G) (emq221@47.96.226.221)1> ['2019-03-01T08:37:30Z']:waiting emqx ['2019-03-01T08:37:32Z']:waiting emqx ['2019-03-01T08:37:33Z']:waiting emqx ['2019-03-01T08:37:34Z']:waiting emqx ['2019-03-01T08:37:35Z']:waiting emqx ['2019-03-01T08:37:37Z']:waiting emqx ['2019-03-01T08:37:37Z']:timeout error

Actual behavior

run command docker run -tid --name emq30 --net=host -p 1883:1883 -p 8083:8083 -p 8883:8883 -p 8084:8084 -p 18083:18083 -e EMQX_NAME=emq221 emq3.0

Test code

Provide a Minimal, Complete, and Verifiable example which will reproduce the problem.

# add code here

EMQ version

Which branch are you on? If you know the Git revision then add it here as well.

Docker version

Which docker-engine version?

docker -v

How docker info?

docker info

System

What system do you use?

Hardware

How is the host machine?


FEATURE REQUEST

Missing feature

Justification

Tell us why you would like to see this feature added.

Workarounds

Are there any workarounds you currently have in place because the feature is missing?

Rory-Z commented 5 years ago

I tried to execute docker run -tid --name emq30 --net=host -p 1883:1883 -p 8083:8083 -p 8883:8883 -p 8084:8084 -p 18083:18083 -e EMQX_NAME=emq221 emqx/emqx on ubuntu18.04, it is normal

$ sudo docker run -tid --name emq30 --net=host -p 1883:1883 -p 8083:8083 -p 8883:8883 -p 8084:8084 -p 18083:18083 -e EMQX_NAME=emq221 emqx/emqx
$ sudo docker logs emq30
node.max_ports=1048576
listener.tcp.external.acceptors=64
listener.ssl.external.acceptors=32
node.process_limit=2097152
node.max_ets_tables=2097152
listener.ws.external.acceptors=16
node.name=emq221@172.31.4.183
Exec: /opt/emqx/erts-10.2.1/bin/erlexec -noshell -noinput +Bd -boot /opt/emqx/releases/3.1/emqx -mode embedded -boot_var ERTS_LIB_DIR /opt/emqx/erts-10.2.1/../lib -mnesia dir "/opt/emqx/data/mnesia/emq221@172.31.4.183" -config /opt/emqx/data/configs/app.2019.04.09.09.19.33.config -args_file /opt/emqx/data/configs/vm.2019.04.09.09.19.33.args -vm_args /opt/emqx/data/configs/vm.2019.04.09.09.19.33.args -- foreground
Root: /opt/emqx
Starting emqx on node emq221@172.31.4.183
Start http:management listener on 8080 successfully.
Start http:dashboard listener on 18083 successfully.
Start mqtt:tcp listener on 127.0.0.1:11883 successfully.
Start mqtt:tcp listener on 0.0.0.0:1883 successfully.
Start mqtt:ws listener on 0.0.0.0:8083 successfully.
Start mqtt:ssl listener on 0.0.0.0:8883 successfully.
Start mqtt:wss listener on 0.0.0.0:8084 successfully.
EMQ X Broker v3.1-rc.1 is running now!