Front-end warning "Unable to load database credentials from Vault."
Hello, everyone!
My request is look like the topic https://www.zabbix.com/forum/zabbix-...-logged-errors
But configuring zabbix.conf.php didn't help.
Manual requests from zabbix server to the vault server by vault utility or curl are successful. I receive all the data from the vault.
But configuring zabbix.conf.php didn't help
On the frontend database error appears

Configuring vault settings in the zabbix_server.conf will fail to start zabbix-server.service
I have this situation on different versions of zabbix server (6.4.2 and 6.0.12)
I checked network and noted that there no any traffic from zabbix server to the vault server while loading the frontend page, so my suggestion that there are no requests to the vault by zabbix server.
But I don't have any assumptions what to do, to check or to configure.
I will appreciate any advice or help.
Thanks!
Hello, everyone!
My request is look like the topic https://www.zabbix.com/forum/zabbix-...-logged-errors
But configuring zabbix.conf.php didn't help.
Manual requests from zabbix server to the vault server by vault utility or curl are successful. I receive all the data from the vault.
Code:
[root@srv1]# vault kv get devsecops/zabbix/srv1/database ================ Secret Path ================ devsecops/data/zabbix/srv1/database ======= Metadata ======= Key Value --- ----- created_time 2023-04-14T12:44:15.66262118Z custom_metadata <nil> deletion_time n/a destroyed false version 1 ====== Data ====== Key Value --- ----- password qwerty username zabbix
Code:
[root@srv1]# curl --header "X-Vault-Token: hvs.CAESIH32cjv0p5TdS6sx8QYOO5jzGP25qQWxqsIKfaUbxqnzGh4KHGh2cy5VTmZJVktqblVaOFRHWW93TUNMRFpaWEg" https://vaultserver:8200/v1/devsecops/data/zabbix/srv1/database
{"request_id":"225f783c-e5ec-3d4a-0c0e-573ea2af3847","lease_id":"","renewable":false,"lease_duration":0,"data":{"data":{"password":"qwerty","username":"zabbix"},"metadata":{"created_time":"2023-04-14T12:44:15.66262118Z","custom_metadata":null,"deletion_time":"","destroyed":false,"version":1}},"wrap_info":null,"warnings":null,"auth":null}
Code:
// Vault configuration. Used if database credentials are stored in Vault secrets manager. // Vault configuration. Used if database credentials are stored in Vault secrets manager. $DB['VAULT'] = 'HashiCorp'; $DB['VAULT_URL'] = 'https://vaultserver:8200'; $DB['VAULT_DB_PATH'] = 'devsecops/zabbix/srv1/database'; $DB['VAULT_TOKEN'] = 'hvs.CAESIH32cjv0p5TdS6sx8QYOO5jzGP25qQWxqsIKfaUbxqnzGh4KHGh2cy5VTmZJVktqblVaOFRHWW93TUNMRFpaWEg'; $DB['VAULT_CERT_FILE'] = ''; $DB['VAULT_KEY_FILE'] = ''; // Uncomment to bypass local caching of credentials. // $DB['VAULT_CACHE'] = true;
Configuring vault settings in the zabbix_server.conf will fail to start zabbix-server.service
Code:
[root@srv1 zabbix]# systemctl restart zabbix-server.service Job for zabbix-server.service failed because the service did not take the steps required by its unit configuration. See "systemctl status zabbix-server.service" and "journalctl -xeu zabbix-server.service" for details. [root@ldcvis-monsrv zabbix]# journalctl -xeu zabbix-server.service ░░ Defined-By: systemd ░░ Support: https://access.redhat.com/support ░░ ░░ A start job for unit zabbix-server.service has finished with a failure. ░░ ░░ The job identifier is 186308 and the job result is failed. May 30 17:11:13 srv1 systemd[1]: zabbix-server.service: Scheduled restart job, restart counter is at 1. ░░ Subject: Automatic restarting of a unit has been scheduled ░░ Defined-By: systemd ░░ Support: https://access.redhat.com/support ░░ ░░ Automatic restarting of the unit zabbix-server.service has been scheduled, as the result for ░░ the configured Restart= setting for the unit. May 30 17:11:13 srv1 systemd[1]: Stopped Zabbix Server. ░░ Subject: A stop job for unit zabbix-server.service has finished ░░ Defined-By: systemd ░░ Support: https://access.redhat.com/support ░░ ░░ A stop job for unit zabbix-server.service has finished. ░░ ░░ The job identifier is 186401 and the job result is done. May 30 17:11:13 srv1 systemd[1]: Starting Zabbix Server... ░░ Subject: A start job for unit zabbix-server.service has begun execution ░░ Defined-By: systemd ░░ Support: https://access.redhat.com/support ░░ ░░ A start job for unit zabbix-server.service has begun execution. ░░ ░░ The job identifier is 186401. ...skipping... ░░ Defined-By: systemd ░░ Support: https://access.redhat.com/support ░░ ░░ A start job for unit zabbix-server.service has finished with a failure. ░░ ░░ The job identifier is 186308 and the job result is failed. May 30 17:11:13 srv1 systemd[1]: zabbix-server.service: Scheduled restart job, restart counter is at 1. ░░ Subject: Automatic restarting of a unit has been scheduled ░░ Defined-By: systemd ░░ Support: https://access.redhat.com/support ░░ ░░ Automatic restarting of the unit zabbix-server.service has been scheduled, as the result for ░░ the configured Restart= setting for the unit. May 30 17:11:13 srv1 systemd[1]: Stopped Zabbix Server. ░░ Subject: A stop job for unit zabbix-server.service has finished ░░ Defined-By: systemd ░░ Support: https://access.redhat.com/support ░░ ░░ A stop job for unit zabbix-server.service has finished. ░░ ░░ The job identifier is 186401 and the job result is done. May 30 17:11:13 srv1 systemd[1]: Starting Zabbix Server... ░░ Subject: A start job for unit zabbix-server.service has begun execution ░░ Defined-By: systemd ░░ Support: https://access.redhat.com/support ░░ ░░ A start job for unit zabbix-server.service has begun execution. ░░ ░░ The job identifier is 186401. May 30 17:11:15 srv1 systemd[1]: zabbix-server.service: Can't open PID file /run/zabbix/zabbix_server.pid (yet?) after start: Operation not permitted May 30 17:11:15 srv1 systemd[1]: zabbix-server.service: Failed with result 'protocol'. ░░ Subject: Unit failed ░░ Defined-By: systemd ░░ Support: https://access.redhat.com/support ░░ ░░ The unit zabbix-server.service has entered the 'failed' state with result 'protocol'. May 30 17:11:15 srv1 systemd[1]: Failed to start Zabbix Server. ░░ Subject: A start job for unit zabbix-server.service has failed ░░ Defined-By: systemd ░░ Support: https://access.redhat.com/support ░░ ░░ A start job for unit zabbix-server.service has finished with a failure. ░░ ░░ The job identifier is 186401 and the job result is failed. Tab stops: eu zabbix-server.service
I have this situation on different versions of zabbix server (6.4.2 and 6.0.12)
I checked network and noted that there no any traffic from zabbix server to the vault server while loading the frontend page, so my suggestion that there are no requests to the vault by zabbix server.
But I don't have any assumptions what to do, to check or to configure.
I will appreciate any advice or help.
Thanks!
Is /run/zabbix present and writeable?
It does not write into server logs..
Comment