0
저는 Microsoft Azure에서 데비안 VM을 사용하고 있습니다. 모스 킷토를 설치했는데 SSL을 구성하지 않는 동안 잘 실행됩니다.데비안에서 Mosquitto SSL 설정을 테스트 할 때 알 수없는 CA가 있습니다.
openssl genrsa -des3 -out ca.key 2048
openssl req -new -x509 -days 1826 -key ca.key -out ca.crt
openssl genrsa -out server.key 2048
openssl req -new -out server.csr -key server.key
openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt -days 360
내 호스트 이름이 데비안 RNO 내가 그와 같은 일반적인 이름을 사용 : 나는 OpenSSL을 가진 자체 서명 된 인증서와 키 (는 server.crt &은 server.key를) 만들었습니다. 내 mosquitto.conf는 브로커가 오류없이 시작
# mosquitto.conf
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
# MQTT over TLS/SSL
listener 8883
cafile /etc/mosquitto/certs/ca.crt
certfile /etc/mosquitto/certs/server.crt
keyfile /etc/mosquitto/certs/server.key
log_type error
log_type warning
log_type notice
log_type information
tls_version tlsv1.2
# End of MQTT over TLS/SLL configuration
입니다. 내가 간부 인 때처럼 mosquitto_pub :이 오류가 발생
mosquitto_pub -h Debian-RNO -t topic1 -m "test" -d --cafile /etc/mosquitto/certs/ca.crt -p 8883
는 :
1507583871: New connection from 52.178.101.16 on port 8883.
1507583871: OpenSSL Error: error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca
1507583871: OpenSSL Error: error:140940E5:SSL routines:SSL3_READ_BYTES:ssl handshake failure
1507583871: Socket error on client <unknown>, disconnecting.
내가 성공하지 않고 시간 동안 검색 :
mosquitto.log에서Unable to connect (A TLS error occurred.).
, 나는 그 항목이 ... 어떤 도움도 환영합니다!
그러나 mosquitto는 인증서 위치가 설명되어있는 mosquitto.conf를 사용하고 있습니다. 맞습니까? https://mosquitto.org/man/mosquitto-conf-5.html – rno