Closed xhuohai closed 11 months ago
好像emqx启动失败了
发一下docker-compose.yml的配置
yml
version: '3' services: emqx: image: emqx/emqx:latest restart: always network_mode: host nginx: image: nginx:latest restart: always ports:
STT_TYPE: openai-whisper
OPENAI_WHISPER_KEY: 此处修改 OPENAI_WHISPER_MODEL: whisper-1
AZURE_WHISPER_API_BASE: https://xxxxx.openai.azure.com AZURE_WHISPER_KEY: 9afbef65bcf6487eeeeeeeeeeeeeeeeeee AZURE_WHISPER_DEPLOYMENT_NAME: whisper AZURE_WHISPER_API_VERSION: 2023-09-01-preview
AZURE_STT_KEY: 3eba91b6143f4d3eeeeeeeeeeeeeeeeeeeeeeeee AZURE_STT_SERVICE_REGION: eastasia
LLM_TYPE: openai
OPENAI_OPENAI_KEY: 此处修改
AZURE_OPENAI_KEY: ef0f2781b5a24b15baaaaaaaaaaaaaaaaaaaaaaa AZURE_OPENAI_ENDPOINT: https://xxxxx.openai.azure.com/ AZURE_OPENAI_VERSION: "2023-05-15"
YIYAN_CLIENT_ID: xxxxxxxxxxxxxxxxxx YIYAN_SECRET: xxxxxxxxxxxxxxxxxxxxx
VOICE_EXECUTOR_MAX_WORKERS: 2
TTS_TYPE: edge-tts
AZURE_TTS_KEY: 此处修改 AZURE_TTS_SERVICE_REGION: eastasia
ELEVENLABS_TTS_KEY: a920b73991e68d5c9c9aaaaaaaaaaaaaaaa ELEVENLABS_TTS_MODEL: eleven_multilingual_v2 AUDIO_DOWNLOAD_URL: http://此处修改:8082 AUDIO_SAVE_PATH: /audio
MQTT_BROKER_HOST: emqx MQTT_BROKER_PORT: 1883 MQTT_CLIENT_ID: folotoy MQTT_USERNAME: folotoy MQTT_PASSWORD: folotoy SPEECH_UDP_SERVER_HOST: 此处修改 SPEECH_UDP_SERVER_PORT: 8085
修改了上游的dns了吗?日志显示找不到域名
Name or service not known
docker的dns默认继承自 /etc/resolv.conf
修改了上游的dns了吗?日志显示找不到域名
Name or service not known
docker的dns默认继承自 /etc/resolv.conf
主机和folotoy容器的/etc/resolv.conf我都检查过了,在里面加了8.8.8.8等nameserver,而且在folotoy容器里ping了几个域名都是正常的
修改了上游的dns了吗?日志显示找不到域名
Name or service not known
docker的dns默认继承自 /etc/resolv.conf
主机和folotoy容器的/etc/resolv.conf我都检查过了,在里面加了8.8.8.8等nameserver,而且在folotoy容器里ping了几个域名都是正常的
修改了上游的dns了吗?日志显示找不到域名
Name or service not known
docker的dns默认继承自 /etc/resolv.conf
主机和folotoy容器的/etc/resolv.conf我都检查过了,在里面加了8.8.8.8等nameserver,而且在folotoy容器里ping了几个域名都是正常的
- ping emqx 看看能不能通
- 用浏览器访问18083端口看看能否打开
在容器的/etc/hosts里面加了127.0.0.1 emqx
,现在可以了,感谢
log如下: folotoy-server-self-hosting-folotoy-1 | socket.gaierror: [Errno -2] Name or service not known folotoy-server-self-hosting-folotoy-1 | 2023-11-04 14:10:02,072 - INFO - Sleep 2s to reconnect folotoy-server-self-hosting-folotoy-1 | 2023-11-04 14:10:04,076 - ERROR - Run error: [Errno -2] Name or service not known folotoy-server-self-hosting-folotoy-1 | Traceback (most recent call last): folotoy-server-self-hosting-folotoy-1 | File "core/folotoy_app.py", line 159, 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 827, in create_connection folotoy-server-self-hosting-folotoy-1 | for res in getaddrinfo(host, port, 0, SOCK_STREAM): folotoy-server-self-hosting-folotoy-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ folotoy-server-self-hosting-folotoy-1 | File "/usr/local/lib/python3.11/socket.py", line 962, in getaddrinfo folotoy-server-self-hosting-folotoy-1 | for res in _socket.getaddrinfo(host, port, family, type, proto, flags): folotoy-server-self-hosting-folotoy-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ folotoy-server-self-hosting-folotoy-1 | socket.gaierror: [Errno -2] Name or service not known folotoy-server-self-hosting-folotoy-1 | 2023-11-04 14:10:04,076 - INFO - Sleep 2s to reconnect
docker_compose.yml中除了各种key和ip的修改,还把原来的端口映射注释掉,直接改成了netwok_mode: host