环境信息
- EMQX 版本: emqx/emqx:5.0.4
- 操作系统及版本:ubuntu 18.04
- 其他MQTTX客户端版本: v1.6.2
问题描述
EMQX 启用双向 SSL/TLS 安全连接 | EMQ
按照以上文档配置SSL/TLS安全连接后,当MQTTX连接后报错
配置文件及日志
emqx.conf
listeners.ssl.default {
bind = "0.0.0.0:8883"
max_connections = 512000
ssl_options {
keyfile = "etc/certs/emqx.key"
certfile = "etc/certs/emqx.pem"
cacertfile = "etc/certs/ca.pem"
}
}
容器日志:
EMQX 5.0.4 is running now!
2022-09-28T07:03:26.977234+00:00 [error] supervisor: 'esockd_connection_sup - <0.2150.0>', errorContext: connection_shutdown, reason: {ssl_error,{options,{keyfile,"etc/certs/emqx.key",{error,eacces}}}}, offender: [{pid,<0.2568.0>},{name,connection},{mfargs,{emqx_connection,start_link,[#{enable_authn => true,limiter => #{connection => default},listener => {ssl,default},zone => default}]}}]
2022-09-28T07:03:55.771609+00:00 [error] supervisor: 'esockd_connection_sup - <0.2150.0>', errorContext: connection_shutdown, reason: {ssl_error,{options,{keyfile,"etc/certs/emqx.key",{error,eacces}}}}, offender: [{pid,<0.2582.0>},{name,connection},{mfargs,{emqx_connection,start_link,[#{enable_authn => true,limiter => #{connection => default},listener => {ssl,default},zone => default}]}}]
2022-09-28T07:04:01.772368+00:00 [error] supervisor: 'esockd_connection_sup - <0.2150.0>', errorContext: connection_shutdown, reason: {ssl_error,{options,{keyfile,"etc/certs/emqx.key",{error,eacces}}}}, offender: [{pid,<0.2587.0>},{name,connection},{mfargs,{emqx_connection,start_link,[#{enable_authn => true,limiter => #{connection => default},listener => {ssl,default},zone => default}]}}]
截图: