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

通过环境变量加载证书错误 #49

Closed tldzyx closed 6 years ago

tldzyx commented 6 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

通过环境变量 EMQ_LISTENER__SSL__EXTERNAL__KEYFILE=mydomain.key EMQ_LISTENER__SSL__EXTERNAL__CERTFILE=mydomain.crt EMQ_LISTENER__WSS__EXTERNAL__KEYFILE=mydomain.key EMQ_LISTENER__WSS__EXTERNAL__CERTFILE=mydomain.crt 设置EMQ的证书, 通过[工具-WebSocket]页面可以直接使用WebSocket/SSL连接.

Actual behavior

无法连接成功, 提示连接失败.

EMQ version

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

Docker Version

18.03.0-ce

Debug

经过试错, 发现只要进入容器中, 将/opt/etc/emq.conf内对应的配置直接修改为环境变量配置的值, 重启容器即可正常使用.

初步推测: 通过环境变量设置的值, 并没有正确地在SSL初始化之前加载.

turtleDeng commented 6 years ago

@tldzyx Please check if the configuration is replaced?