I hope that there are two nodes in the cluster.
Host 1: 192.168.0.2
Host 2: 192.168.0.3
I follow the README.md in https://github.com/emqx/emqx-docker to use the command to run the EMQX in the docker.
then the broker is been started up.
After the broker is being started up and pass about 1 minute, it crashes.
The Docker container log:
IExec: /opt/emqx/erts-10.3.5.4/bin/erlexec -boot /opt/emqx/releases/v3.2.3/emqx -mode embedded -boot_var ERTS_LIB_DIR /opt/emqx/erts-10.3.5.4/../lib -mnesia dir "/opt/emqx/data/mnesia/em...@192.168.0.2" -config /opt/emqx/data/configs/app.2019.10.04.08.15.44.config -args_file /opt/emqx/data/configs/vm.2019.10.04.08.15.44.args -vm_args /opt/emqx/data/configs/vm.2019.10.04.08.15.44.args -- console
Root: /opt/emqx
/opt/emqx
Starting emqx on node em...@192.168.0.2
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 3.2.3 is running now!
Eshell V10.3.5.4 (abort with ^G)
(em...@192.168.0.2)1> ['2019-10-04T08:16:03Z']:emqx exit abnormally
The command for starting the container:
# add code here docker start -d --name emqx -p 18083:18083 -p 1883:1883 -p 8083:8083 -p 8883:8883 -p 8084:8084 -p 4369:4369 -p 6000-6100:6000-6100 -e EMQX_NAME="emqx" -e EMQX_HOST="192.168.0.2" -e EMQX_LISTENER__TCP__EXTERNAL=1883 -e EMQX_JOIN_CLUSTER="em...@192.168.0.2" emqx/emqx:latest
I pull the image from the Docker Hub:
3.2.3
Which docker-engine version?
Docker version 19.03.2, build 6a30dfc
How docker info?
Client: Debug Mode: false Server: Containers: 2 Running: 0 Paused: 0 Stopped: 2 Images: 1 Server Version: 19.03.2 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f init version: fec3683 Security Options: seccomp Profile: default Kernel Version: 4.9.184-linuxkit Operating System: Docker Desktop OSType: linux Architecture: x86_64 CPUs: 2 Total Memory: 1.934GiB Name: docker-desktop ID: N34C:T4PC:BH5Z:TDQJ:GYFL:7ZNK:RZ44:K3UW:K2QK:7QG6:QVIS:WG2A Docker Root Dir: /var/lib/docker Debug Mode: true File Descriptors: 29 Goroutines: 44 System Time: 2019-10-04T08:55:01.5386003Z EventsListeners: 1 Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false Product License: Community Engine
Windows 10 Enterprise
HP ZBook
I try every environment parameter above the command, the container crash when I set the "EMQX_HOST="192.168.0.2".
The IP address is the host OS IP.
Which IP should be used for the EMQX_HOST? HOST OS IP OR Container OS IP OR....?
Which network model of Docker can be used for the cluster? container, host, bridge, overlay or...?