I’ve made a completely fresh installation of Icinga 2 with api, web and now also Director. I’m running into issues with the director though, I’m unable to deploy changes and only get this:
Unable to detect your Icinga 2 Core version (DeployFormsBug7530.php:72)
I’ve restarted all the services, I’ve checked that I have the latest version of icinga 2, web and director and they’re all the latest as I just installed them. I’m very new to icinga and can’t figure out where I’ve gone wrong.
The icinga-users are there and have access, and I have been looking through a whole bunch of posts with this same issue and tried their solutions but to no avail.
Would appreciate it greatly if someone could point me in the right direction! If I need to repeat something please let me know, I think I might’ve gone loopy a bit trying to solve this and can easily have missed something as it has been days now…
just to make sure about the versions that are installed:
Did you installed the packages from the icinga repo packages.icinga.com or from the distributions repository (Debian/Ubuntu/RHEL/Centos whatever)?
Have you already checked the log of icinga2 for errors?
Also please check if the hostname resolution works correctly, because afaik the Director API will try resolving the endpoints hostname when sending to configuration via API to the master.
There are also some similar topics solved already, take a look there if anything helps
Thanks so much for your reply
I got them from packages.icinga.com through wget, so version is 2.13.2-1.focal
I made sure to upgrade web also a few days ago as I noticed it was on a older version, so it’s also on the latest one now.
Yeah I checked, I enabled debug as well in case, but the only error I get from icinga2.log is that I have no email account configured and to do that if I want to use it I know that is because of my disk though so it’s just Icinga trying to email me about it, but I haven’t configured email yet.
I’ve looked through as many of those as I could find, but thank you for the link anyways! At first I thought it was because of a version difference, since a lot of users seemed to have had that, but that wasn’t the case.
Could there maybe be a setting I’m missing somewhere? I haven’t set up any monitoring yet, wanted to get everything setup before I tried to avoid any unnecessary issues, or did you mean my main host? Sorry, I’m really really new to this!
You could try adding a new line to the /etc/hosts file and see if that helps
IP hostname FQDN
# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
18.104.22.168 my-host-name my-host-name.with.domain
Hi, so sorry to reply so late…not sure if I should open a new question on it, but I think less is more in this case maybe?
I’ve tried that, no difference
Not sure what my next step would be here, I’ve tried reinstalling the director and it still gives the same error.
If I try to run the kickstart I get this:
ERROR: Icinga\Exception\ConfigurationError in /usr/share/php/Icinga/File/Ini/IniParser.php:267 with message: Couldn’t parse the INI file `/etc/icingaweb2/modules/director/kickstart.ini’
and i’m not quite sure where it goes wrong there. My kickstart.ini looks like this:
endpoint = “ubuntu.XXXXXXX.com”
host = “127.0.0.1”
port = 5665
username = “director”
password = “”
removed real endpoint and password, but everything else should be right. I’m a little bit at my wits end and thinking about just scrapping the entire thing and starting from scratch, but since I’m not sure where I went wrong that might just make it worse or get me to the same point again
Have you checked the permissions on the directories?
# ls -la /etc/icingaweb2/
drwxrws---. 6 root icingaweb2 180 Jan 26 12:17 .
drwxr-xr-x. 103 root root 8192 Jan 26 06:15 ..
-rw-rw----. 1 apache icingaweb2 429 Jul 8 2021 authentication.ini
-rw-rw----. 1 apache icingaweb2 306 Jan 15 2021 config.ini
drwxrws---. 5 apache icingaweb2 60 Oct 13 10:02 dashboards
drwxr-s---. 2 apache icingaweb2 240 Dec 1 17:01 enabledModules
-rw-rw----. 1 apache icingaweb2 510 Jul 8 2021 groups.ini
drwxrws---. 11 root icingaweb2 158 Nov 18 13:06 modules
drwxrws---. 3 apache icingaweb2 25 Jan 26 12:17 preferences
-rw-rw----. 1 apache icingaweb2 1378 Dec 21 09:34 resources.ini
-rw-rw----. 1 apache icingaweb2 720 Dec 21 17:47 roles.ini
# ls -la /etc/icingaweb2/modules/
drwxrws---. 11 root icingaweb2 158 Nov 18 13:06 .
drwxrws---. 6 root icingaweb2 180 Jan 26 12:17 ..
drwxr-sr-x. 3 apache icingaweb2 23 Nov 29 12:04 businessprocess
drwxrws---. 2 apache icingaweb2 24 Oct 21 2020 director
drwxr-sr-x. 2 apache icingaweb2 45 Feb 15 2021 fileshipper
drwxrws---. 2 apache icingaweb2 42 Nov 12 09:24 grafana
drwxr-sr-x. 2 apache icingaweb2 45 Jan 10 10:05 jira
drwxrws---. 2 apache icingaweb2 73 Oct 19 2020 monitoring
drwxrws---. 2 root icingaweb2 24 Nov 18 10:48 setup
drwxrws---. 2 root icingaweb2 24 Nov 18 10:48 translation
drwxrws---. 2 apache icingaweb2 24 Oct 21 2020 vspheredb
# ls -la /etc/icingaweb2/modules/director/
drwxrws---. 2 apache icingaweb2 24 Oct 21 2020 .
drwxrws---. 11 root icingaweb2 158 Nov 18 13:06 ..
-rw-rw----. 1 apache icingaweb2 27 Oct 21 2020 config.ini
Also as you can see I don’t have a kickstart.ini file present, but the kickstart from the webinterface works nonetheless. Afaik the .ini file is only necessary when running the kickstart command from the CLI.
I would suggest you retrace your steps and compare them to the installation docs for the Director.
The background daemon is mandatory since v1.7 as well, but this isn’t really clearly mentioned in the installation docs, only on it’s separate page:
Looks like where you have apache as user I have www-data for some reason, I’ll try setting that to the right one tomorrow and see if that does the trick. It really should if apache has no rights to access anything that it needs to, of course it won’t find information on core version…
Yeah I added the kickstart.ini file after I found a case where it didn’t work for someone else with the same issue I have, but after he added the file it started working. But I guess that wasn’t actually related to my problem then, just a “happy coincidence”. I’ll let you know if this works!
Because you are running a Debian/Ubuntu based system, I assume.
My output is from a RHEL.
The users will differ here and there.
Another example is the user running the icinga2 processes.
nagios on Debian/Ubuntu and
icinga on RHEL/centOS/SUSE