Hi,
I’m relatively new to Icinga. My Server is a Ubuntu 18.04 on an Azure VM.
I was trying to enable the API feature via icinga2 api setup
like it is described in the book I’m using to get to know Icinga a little better (Book title: Icinga 2 - Ein praktischer Einstig ins Monitoring).
Restarting the icinga2 daemon after the setup fails in a similar way as is described here under Current Behavior.
Jun 11 10:04:09 mon-master01 systemd[1]: Starting Icinga host/service/network monitoring system...
-- Subject: Unit icinga2.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit icinga2.service has begun starting up.
Jun 11 10:04:09 mon-master01 icinga2[104515]: [2019-06-11 10:04:09 +0000] information/cli: Icinga application loader (version: r2.10.5-1)
Jun 11 10:04:09 mon-master01 icinga2[104515]: [2019-06-11 10:04:09 +0000] information/cli: Loading configuration file(s).
Jun 11 10:04:09 mon-master01 icinga2[104515]: [2019-06-11 10:04:09 +0000] information/ConfigItem: Committing config item(s).
Jun 11 10:04:09 mon-master01 icinga2[104515]: [2019-06-11 10:04:09 +0000] critical/SSL: Error on bio X509 AUX reading pem file '/var/lib/icinga2/certs//filename.crt': 33558530, "error:02001002:system library:fopen:No such file or directory"
Jun 11 10:04:09 mon-master01 icinga2[104515]: [2019-06-11 10:04:09 +0000] critical/config: Error: Cannot get certificate from cert path: '/var/lib/icinga2/certs//filename.crt'.
Jun 11 10:04:09 mon-master01 icinga2[104515]: Location: in /etc/icinga2/features-enabled/api.conf: 4:1-4:24
Jun 11 10:04:09 mon-master01 icinga2[104515]: /etc/icinga2/features-enabled/api.conf(2): * The API listener is used for distributed monitoring setups.
Jun 11 10:04:09 mon-master01 icinga2[104515]: /etc/icinga2/features-enabled/api.conf(3): */
Jun 11 10:04:09 mon-master01 icinga2[104515]: /etc/icinga2/features-enabled/api.conf(4): object ApiListener "api" {
Jun 11 10:04:09 mon-master01 icinga2[104515]: ^^^^^^^^^^^^^^^^^^^^^^^^
Jun 11 10:04:09 mon-master01 icinga2[104515]: /etc/icinga2/features-enabled/api.conf(5):
Jun 11 10:04:09 mon-master01 icinga2[104515]: /etc/icinga2/features-enabled/api.conf(6): ticket_salt = TicketSalt
Jun 11 10:04:09 mon-master01 icinga2[104515]: [2019-06-11 10:04:09 +0000] critical/config: 1 error
Jun 11 10:04:09 mon-master01 systemd[1]: icinga2.service: Main process exited, code=exited, status=1/FAILURE
Jun 11 10:04:09 mon-master01 systemd[1]: icinga2.service: Failed with result 'exit-code'.
Jun 11 10:04:09 mon-master01 systemd[1]: Failed to start Icinga host/service/network monitoring system.
-- Subject: Unit icinga2.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit icinga2.service has failed.
--
-- The result is RESULT.
The .crt and .key file exist at the expected location and are also not empty (not sure how i can verify the content of those files).
I also tried to extend the permissions on the files without success.
Version used: r2.10.5-1
OS: Linux Ubuntu 18.04.2 LTS (Kernel Version: 4.18.0-1018-azure)
Enabled features: api checker ido-pgsql mainlog notification