Closed qhhsy closed 11 months ago
emqx 启动失败了吗? 执行看一下
sudo docker compose ps
服务器上是否有其他服务占用了 emqx的端口?
docker compose ps NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS folotoy-server-self-hosting-emqx-1 emqx/emqx:latest "/usr/bin/docker-entrypoint.sh /opt/emqx/bin/emqx foreground" emqx 9 hours ago Restarting (137) 26 seconds ago folotoy-server-self-hosting-folotoy-1 lewangdev/folotoy-server:latest "python3 folotoy/main.py" folotoy 3 hours ago Up 13 minutes 0.0.0.0:8085->8085/udp, :::8085->8085/udp folotoy-server-self-hosting-nginx-1 nginx:latest "/docker-entrypoint.sh nginx -g 'daemon off;'" nginx 9 hours ago Up 4 hours 0.0.0.0:8082->80/tcp, :::8082->80/tcp
folotoy-server-self-hosting-folotoy-1 | ConnectionRefusedError: [Errno 111] Connection refused
folotoy-server-self-hosting-folotoy-1 | 2023-10-20 16:12:36,080 - MainThread - main.py(6) - INFO - Sleep 2s to reconnect
folotoy-server-self-hosting-folotoy-1 | 2023-10-20 16:12:38,082 - MainThread - main.py(6) - ERROR - Run error: [Errno 111] Connection refused
folotoy-server-self-hosting-folotoy-1 | Traceback (most recent call last):
folotoy-server-self-hosting-folotoy-1 | File "core/folotoy_app.py", line 152, in core.folotoy_app.FolotoyApp.start
folotoy-server-self-hosting-folotoy-1 | File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 914, in connect
folotoy-server-self-hosting-folotoy-1 | return self.reconnect()
folotoy-server-self-hosting-folotoy-1 | ^^^^^^^^^^^^^^^^
folotoy-server-self-hosting-folotoy-1 | File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1044, in reconnect
folotoy-server-self-hosting-folotoy-1 | sock = self._create_socket_connection()
folotoy-server-self-hosting-folotoy-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
folotoy-server-self-hosting-folotoy-1 | File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection
folotoy-server-self-hosting-folotoy-1 | return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
folotoy-server-self-hosting-folotoy-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
folotoy-server-self-hosting-folotoy-1 | File "/usr/local/lib/python3.11/socket.py", line 851, in create_connection
folotoy-server-self-hosting-folotoy-1 | raise exceptions[0]
folotoy-server-self-hosting-folotoy-1 | File "/usr/local/lib/python3.11/socket.py", line 836, in create_connection
folotoy-server-self-hosting-folotoy-1 | sock.connect(sa)
folotoy-server-self-hosting-folotoy-1 | ConnectionRefusedError: [Errno 111] Connection refused
folotoy-server-self-hosting-folotoy-1 | 2023-10-20 16:12:38,083 - MainThread - main.py(6) - INFO - Sleep 2s to reconnect
folotoy-server-self-hosting-folotoy-1 | 2023-10-20 16:12:40,084 - MainThread - main.py(6) - ERROR - Run error: [Errno 111] Connection refused
folotoy-server-self-hosting-folotoy-1 | Traceback (most recent call last):
folotoy-server-self-hosting-folotoy-1 | File "core/folotoy_app.py", line 152, in core.folotoy_app.FolotoyApp.start
folotoy-server-self-hosting-folotoy-1 | File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 914, in connect
folotoy-server-self-hosting-folotoy-1 | return self.reconnect()
folotoy-server-self-hosting-folotoy-1 | ^^^^^^^^^^^^^^^^
folotoy-server-self-hosting-folotoy-1 | File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1044, in reconnect
folotoy-server-self-hosting-folotoy-1 | sock = self._create_socket_connection()
folotoy-server-self-hosting-folotoy-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
folotoy-server-self-hosting-folotoy-1 | File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection
folotoy-server-self-hosting-folotoy-1 | return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
folotoy-server-self-hosting-folotoy-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
folotoy-server-self-hosting-folotoy-1 | File "/usr/local/lib/python3.11/socket.py", line 851, in create_connection
folotoy-server-self-hosting-folotoy-1 | raise exceptions[0]
folotoy-server-self-hosting-folotoy-1 | File "/usr/local/lib/python3.11/socket.py", line 836, in create_connection
folotoy-server-self-hosting-folotoy-1 | sock.connect(sa)
folotoy-server-self-hosting-folotoy-1 | ConnectionRefusedError: [Errno 111] Connection refused
folotoy-server-self-hosting-folotoy-1 | 2023-10-20 16:12:40,085 - MainThread - main.py(6) - INFO - Sleep 2s to reconnect
folotoy-server-self-hosting-folotoy-1 | 2023-10-20 16:12:42,087 - MainThread - main.py(6) - ERROR - Run error: [Errno 111] Connection refused
folotoy-server-self-hosting-folotoy-1 | Traceback (most recent call last):
folotoy-server-self-hosting-folotoy-1 | File "core/folotoy_app.py", line 152, in core.folotoy_app.FolotoyApp.start
folotoy-server-self-hosting-folotoy-1 | File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 914, in connect
folotoy-server-self-hosting-folotoy-1 | return self.reconnect()
folotoy-server-self-hosting-folotoy-1 | ^^^^^^^^^^^^^^^^
folotoy-server-self-hosting-folotoy-1 | File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1044, in reconnect
folotoy-server-self-hosting-folotoy-1 | sock = self._create_socket_connection()
folotoy-server-self-hosting-folotoy-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
folotoy-server-self-hosting-folotoy-1 | File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection
folotoy-server-self-hosting-folotoy-1 | return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
folotoy-server-self-hosting-folotoy-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
folotoy-server-self-hosting-folotoy-1 | File "/usr/local/lib/python3.11/socket.py", line 851, in create_connection
folotoy-server-self-hosting-folotoy-1 | raise exceptions[0]
folotoy-server-self-hosting-folotoy-1 | File "/usr/local/lib/python3.11/socket.py", line 836, in create_connection
folotoy-server-self-hosting-folotoy-1 | sock.connect(sa)
folotoy-server-self-hosting-folotoy-1 | ConnectionRefusedError: [Errno 111] Connection refused
folotoy-server-self-hosting-folotoy-1 | 2023-10-20 16:12:42,088 - MainThread - main.py(6) - INFO - Sleep 2s to reconnect
folotoy-server-self-hosting-folotoy-1 | 2023-10-20 16:12:44,090 - MainThread - main.py(6) - ERROR - Run error: [Errno 111] Connection refused``` 我好像也是这个问题
docker compose ps NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS folotoy-server-self-hosting-emqx-1 emqx/emqx:latest "/usr/bin/docker-entrypoint.sh /opt/emqx/bin/emqx foreground" emqx 9 hours ago Restarting (137) 26 seconds ago folotoy-server-self-hosting-folotoy-1 lewangdev/folotoy-server:latest "python3 folotoy/main.py" folotoy 3 hours ago Up 13 minutes 0.0.0.0:8085->8085/udp, :::8085->8085/udp folotoy-server-self-hosting-nginx-1 nginx:latest "/docker-entrypoint.sh nginx -g 'daemon off;'" nginx 9 hours ago Up 4 hours 0.0.0.0:8082->80/tcp, :::8082->80/tcp
emqx 启动失败了,查看一下端口1883,18083是否被占用
这两个端口没有被占用
看下emqx启动的log
如何看emqx的日志呀
如何看emqx的日志呀
sudo docker compose logs emqx
folotoy-server-self-hosting-emqx-1 | WARNING: Default (insecure) Erlang cookie is in use.
folotoy-server-self-hosting-emqx-1 | WARNING: Configure node.cookie in /opt/emqx/etc/emqx.conf or override from environment variable EMQX_NODE__COOKIE
folotoy-server-self-hosting-emqx-1 | WARNING: NOTE: Use the same cookie for all nodes in the cluster.
folotoy-server-self-hosting-emqx-1 | EMQX_RPC__PORT_DISCOVERY [rpc.port_discovery]: manual
folotoy-server-self-hosting-emqx-1 | EMQX_NODE__NAME [node.name]: emqx@172.18.0.3
folotoy-server-self-hosting-emqx-1 | WARNING: Default (insecure) Erlang cookie is in use.
folotoy-server-self-hosting-emqx-1 | WARNING: Configure node.cookie in /opt/emqx/etc/emqx.conf or override from environment variable EMQX_NODE__COOKIE
folotoy-server-self-hosting-emqx-1 | WARNING: NOTE: Use the same cookie for all nodes in the cluster.
folotoy-server-self-hosting-emqx-1 | EMQX_RPC__PORT_DISCOVERY [rpc.port_discovery]: manual
folotoy-server-self-hosting-emqx-1 | EMQX_NODE__NAME [node.name]: emqx@172.18.0.3
folotoy-server-self-hosting-emqx-1 | WARNING: Default (insecure) Erlang cookie is in use.
folotoy-server-self-hosting-emqx-1 | WARNING: Configure node.cookie in /opt/emqx/etc/emqx.conf or override from environment variable EMQX_NODE__COOKIE
folotoy-server-self-hosting-emqx-1 | WARNING: NOTE: Use the same cookie for all nodes in the cluster.
folotoy-server-self-hosting-emqx-1 | EMQX_RPC__PORT_DISCOVERY [rpc.port_discovery]: manual
folotoy-server-self-hosting-emqx-1 | EMQX_NODE__NAME [node.name]: emqx@172.18.0.3
folotoy-server-self-hosting-emqx-1 | WARNING: Default (insecure) Erlang cookie is in use.
folotoy-server-self-hosting-emqx-1 | WARNING: Configure node.cookie in /opt/emqx/etc/emqx.conf or override from environment variable EMQX_NODE__COOKIE
folotoy-server-self-hosting-emqx-1 | WARNING: NOTE: Use the same cookie for all nodes in the cluster.
folotoy-server-self-hosting-emqx-1 | EMQX_RPC__PORT_DISCOVERY [rpc.port_discovery]: manual
folotoy-server-self-hosting-emqx-1 | EMQX_NODE__NAME [node.name]: emqx@172.18.0.3
folotoy-server-self-hosting-emqx-1 | WARNING: Default (insecure) Erlang cookie is in use.
folotoy-server-self-hosting-emqx-1 | WARNING:t
folotoy-server-self-hosting-emqx-1 | WARNING: NOTE: Use the same cookie for all nodes in the cluster.
folotoy-server-self-hosting-emqx-1 | EMQX_RPC__PORT_DISCOVERY [rpc.port_discovery]: manual
folotoy-server-self-hosting-emqx-1 | EMQX_NODE__NAME [node.name]: emqx@172.18.0.3
folotoy-server-self-hosting-emqx-1 | WARNING: Default (insecure) Erlang cookie is in use.
folotoy-server-self-hosting-emqx-1 | WARNING: Configure node.cookie in /opt/emqx/etc/emqx.conf or override from environment variable EMQX_NODE__COOKIE
folotoy-server-self-hosting-emqx-1 | WARNING: NOTE: Use the same cookie for all nodes in the cluster.
folotoy-server-self-hosting-emqx-1 | EMQX_RPC__PORT_DISCOVERY [rpc.port_discovery]: manual
folotoy-server-self-hosting-emqx-1 | EMQX_NODE__NAME [node.name]: emqx@172.18.0.3
看着一直在重启也没有报错
已经长时间没有回复,关闭issue,如有如有需要请重新开启
//docker-compose.yml
// logs