{"action":"opened","issue":{"url":"https://api.github.com/repos/erlio/vernemq/issues/788","repository_url":"https://api.github.com/repos/erlio/vernemq","labels_url":"https://api.github.com/repos/erlio/vernemq/issues/788/labels{/name}","comments_url":"https://api.github.com/repos/erlio/vernemq/issues/788/comments","events_url":"https://api.github.com/repos/erlio/vernemq/issues/788/events","html_url":"https://github.com/erlio/vernemq/issues/788","id":347857006,"node_id":"MDU6SXNzdWUzNDc4NTcwMDY=","number":788,"title":"Error connect to Azure IoT Hub","user":{"login":"shinichi98","id":42137455,"node_id":"MDQ6VXNlcjQyMTM3NDU1","avatar_url":"https://avatars0.githubusercontent.com/u/42137455?v=4","gravatar_id":"","url":"https://api.github.com/users/shinichi98","html_url":"https://github.com/shinichi98","followers_url":"https://api.github.com/users/shinichi98/followers","following_url":"https://api.github.com/users/shinichi98/following{/other_user}","gists_url":"https://api.github.com/users/shinichi98/gists{/gist_id}","starred_url":"https://api.github.com/users/shinichi98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shinichi98/subscriptions","organizations_url":"https://api.github.com/users/shinichi98/orgs","repos_url":"https://api.github.com/users/shinichi98/repos","events_url":"https://api.github.com/users/shinichi98/events{/privacy}","received_events_url":"https://api.github.com/users/shinichi98/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-06T09:58:37Z","updated_at":"2018-08-06T09:58:37Z","closed_at":null,"author_association":"NONE","body":"### Environment\r\n\r\n- VerneMQ Version: 1.4.1\r\n- OS: Debian 9\r\n\r\n### Expected behavior\r\n\r\nI'm trying to connect to a Azure IoT Hub using VerneMQ with X.509 certificates (Full file permissions), but it doesn't work.\r\n\r\n```\r\nvmq_bridge.ssl.br0 = XXX.azure-devices.net:8883\r\nvmq_bridge.ssl.br0.cleansession = on\r\nvmq_bridge.ssl.br0.client_id = devicetestca\r\nvmq_bridge.ssl.br0.username = XXX.azure-devices.net/devicetestca\r\nvmq_bridge.ssl.br0.password = HostName=XXX.azure-devices.net;DeviceId=devicetestca;x509=true\r\nvmq_bridge.ssl.br0.topic.1 = devices/devicetestca/messages/events/readpipe/ out 1\r\nvmq_bridge.ssl.br0.try_private = off\r\n\r\nvmq_bridge.ssl.sbr0.cafile = /etc/vernemq/certs/digicertbaltimoreroot.cer\r\nvmq_bridge.ssl.sbr0.certfile = /etc/vernemq/certs/Client.pem\r\nvmq_bridge.ssl.sbr0.keyfile = /etc/vernemq/certs/Client.key\r\n\r\nvmq_bridge.ssl.sbr0.insecure = off\r\nvmq_bridge.ssl.sbr0.tls_version = tlsv1.2\r\n```\r\n\r\n### Actual behaviour\r\n\r\n```\r\n2018-08-06 10:40:15.136 [error] <0.458.0>@vmq_bridge:on_connect_error:70 connection failed due to server_not_found\r\n2018-08-06 10:40:15.136 [error] <0.458.0> connection to \"XXX.azure-devices.net\":8883 failed due to {options,{cacertfile,[]}}\r\n```\r\n\r\n\r\nI used the _mosquitto_pub_ commands in other computer and it works:\r\n\r\n`\r\nmosquitto_pub -d -h XXX.azure-devices.net -p 8883 -i devicetestca -u XXX.azure-devices.net/devicetestca -P HostName=XXX.azure-devices.net;DeviceId=devicetestca;x509=true --cafile digicertbaltimoreroot.cer --cert Client.pem --key Client.key -V mqttv311 --tls-version tlsv1.2 -t devices/devicetestca/messages/events/readpipe/ -q 1 -m \"mosquitto ONLINE\"\r\n`\r\n\r\n### Steps\r\n\r\n- Create root CA and a self-signed SSL certificate (by following this https://kb.op5.com/pages/viewpage.action?pageId=19073746)\r\n- Register X.509 CA certificates to Azure (by following this https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-security-x509-get-started)\r\n- Generate proof of possession (by following this https://github.com/MicrosoftDocs/azure-docs/issues/8580)\r\n- Configure certificates on VerneMQ"}}
{"actor":{"display_login":"shinichi98"}}