-
Problem report
-
Resolution: Fixed
-
Major
-
6.2.7
-
Sprint 100 (May 2023), Sprint 101 (Jun 2023)
-
2
Steps to reproduce:
- Connection to MQTT Broker to receive messages using the integrated MQTT Plugin of Zabbix Agent2.
- The CA Cert file is stored in /etc/ssl/certs
- This is the item key:
mqtt.get[tls://<broker_ip>:8883,<topic>,<user>,<pass>]
- It seems CA cert file is not read, because if I delete it there is no change in logs.
- Using a tool like mosquitto_sub I can subscribe to topic without any problem:
mosquitto_sub -h <broker_ip> -C 1 -t "<topic>" -p 8883 -u <user> -P <pass> --insecure --cafile /etc/ssl/certs/cafile.crt
Result:
Log: zabbix_agent2.log
2023/02/22 10:25:51.861890 connecting to [127.0.0.1:10051] [timeout:10s, connection timeout:10s] 2023/02/22 10:25:51.862183 sending [{"request":"active checks","host":"agatamonitor02","version":"6.2","port":10057}] to [127.0.0.1:10051] 2023/02/22 10:25:51.862572 receiving data from [127.0.0.1:10051] 2023/02/22 10:25:51.864833 received [{"response":"success","data":[{"key":"mqtt.get[tls://<broker_ip>:8883,<topic>,<user>,<pass>]","itemid":36242,"delay":"0","lastlogsize":0,"mtime":0}]}] from [127.0.0.1:10051] 2023/02/22 10:25:51.864969 [101] End of refreshActiveChecks() from [127.0.0.1:10051] 2023/02/22 10:25:51.865013 [101] processing update request (1 requests) 2023/02/22 10:25:51.865052 [101] adding new request for key: 'mqtt.get[tls://<broker_ip>:8883,<topic>,<user>,<pass>]' 2023/02/22 10:25:51.865118 [101] created watcher task for plugin MQTT 2023/02/22 10:25:51.865224 plugin MQTT: executing watcher task 2023/02/22 10:25:51.865289 [MQTT] establishing connection to [tls://192.168.20.61:8883] 2023/02/22 10:25:56.866268 [MQTT] cannot establish connection to [tls://192.168.20.61:8883]: timed out while connecting 2023/02/22 10:25:58.862120 [101] upload history data, 1/100 value(s) 2023/02/22 10:25:58.862277 connecting to [127.0.0.1:10051] [timeout:10s, connection timeout:10s] 2023/02/22 10:25:58.862550 sending [{"request":"agent data","data":[{"id":20,"itemid":36242,"state":1,"value":"timed out while connecting","clock":1677057951,"ns":865253515}],"session":"121a71c069c6198b9179d98bdc1e8916","host":"agatamonitor02","version":"6.2"}] to [127.0.0.1:10051] 2023/02/22 10:25:58.862888 receiving data from [127.0.0.1:10051]