Hello, I'm trying to configure Zabbix Agent 2 to use a certificate for passive checks. The configuration works fine if I start the agent from the command line (zabbix_agent2 -c zabbix_agent2.conf). If I start the agent as a serveice (systemctl restart zabbix-agent2.service) it fails. The logfile indicates that it cannot initialize TLS, see log entry below. I have tried different permissions, and ownerships, on the certificate files but that has not helped. For now the certificate, key and zcerts.cer (root and intermediate certs in one file) are all located in /etc/zabbix.
Environment:
Red Hat Enterprise Linux release 9.2
zabbix_agent2 (Zabbix) 6.4.2
openssl.x86_64 1:3.0.7-6
2023/05/23 15:15:23.056953 Starting Zabbix Agent 2 (6.4.2)
2023/05/23 15:15:23.058047 cannot configure encryption: cannot initialize default TLS context: 40C65631E87F0000:error:80000002:system library:BIO_new_file:No such file or directory:crypto/bio/bss_file.c:67:calling fopen(zcerts.cer, r)
40C65631E87F0000:error:10000080:BIO routines:BIO_new_file:no such file:crypto/bio/bss_file.c:75:
40C65631E87F0000:error:05880002:x509 certificate routines:X509_load_cert_crl_file_ex:system lib:crypto/x509/by_file.c:228:
Environment:
Red Hat Enterprise Linux release 9.2
zabbix_agent2 (Zabbix) 6.4.2
openssl.x86_64 1:3.0.7-6
2023/05/23 15:15:23.056953 Starting Zabbix Agent 2 (6.4.2)
2023/05/23 15:15:23.058047 cannot configure encryption: cannot initialize default TLS context: 40C65631E87F0000:error:80000002:system library:BIO_new_file:No such file or directory:crypto/bio/bss_file.c:67:calling fopen(zcerts.cer, r)
40C65631E87F0000:error:10000080:BIO routines:BIO_new_file:no such file:crypto/bio/bss_file.c:75:
40C65631E87F0000:error:05880002:x509 certificate routines:X509_load_cert_crl_file_ex:system lib:crypto/x509/by_file.c:228:
Comment