I am trying to setup Icinga 2.12 latest version. In the command transport step, i am getting the following error.
Failed to successfully validate the configuration: Couldn’t connect to the Icinga 2 API:
icinga spi is setup and daemon restarted. Still i see this error. And no other additional error shown as discussed in the other topics. This is a blank error which doesn’t give me any clues.
If you enable a feature, icinga creates a hardlink from the original file /etc/icinga2/features-available/api.conf to /etc/icinga2/features-enabled/api.conf
A reason why the setup from icingaweb2 was not able to write the files in this directory are permission errors like SELinux. Normally the files should be created if you configure your everything during the web UI.
Please check if you have included this config file with you configuration.
If you ran the node wizard during setup it will have asked if you want to disable the inclusion of the conf.d directory. If you created the api-users.conf file afterwards it might not be included.
Example from the /etc/icinga2/icinga2.conf from on of my systems:
// Disabled by the node setup CLI command on 2020-04-01 16:00:51 +0200
// include_recursive "conf.d"
include "conf.d/api-users.conf"
Do you have any configuration under /etc/icingaweb2 ?
If not please check if the user running the webserver (e.g www-data for Debian/Ubuntu, apache for RHEL/centOS) has permission to write into the directory. There should be a guide displayed at the beginning of the web setup when you have to enter the setup token.
seems like selinux and fireqall was the issue at that step. now the command transport config thru. but the last step of setting up shows error.
Module “monitoring” could not be enabled. An error occured:
ERROR: Icinga\Exception\SystemPermissionException in /usr/share/php/Icinga/Application/Modules/Manager.php:275 with message: Cannot enable module “monitoring”. Check the permissions for the enabledModules directory: /etc/icingaweb2/enabledModules