Icinga2 director - Unable to detect your Icinga 2 Core version (DeployFormsBug7530.php:71)

Hello everyone,

I need help with this error: Unable to detect your Icinga 2 Core version (DeployFormsBug7530.php:71)

How can I fix it?

Here is my icinga2 --version output:

icinga2 - The Icinga 2 network monitoring daemon (version: r2.6.0-1)

Copyright (c) 2012-2016 Icinga Development Team (https://www.icinga.org/)
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Application information:
  Installation root: /usr
  Sysconf directory: /etc
  Run directory: /run
  Local state directory: /var
  Package data directory: /usr/share/icinga2
  State path: /var/lib/icinga2/icinga2.state
  Modified attributes path: /var/lib/icinga2/modified-attributes.conf
  Objects path: /var/cache/icinga2/icinga2.debug
  Vars path: /var/cache/icinga2/icinga2.vars
  PID path: /run/icinga2/icinga2.pid

System information:
  Platform: Debian GNU/Linux
  Platform version: 9 (stretch)
  Kernel: Linux
  Kernel version: 4.9.0-12-amd64
  Architecture: x86_64

Build information:
  Compiler: GNU 6.3.0
  Build host: x86-ubc-01

You are using a pretty old version of icinga2 which is completely outdated and unsupported. The only way to fix your issue is to install newer version directly from packages.icinga.com (as debian will not update its repository according to their policy).

Oh, how can I download new one?
I tried it now, but I can´t do it.
I copy this:

 echo "deb http://packages.icinga.com/debian icinga-${DIST} main" > \
 /etc/apt/sources.list.d/${DIST}-icinga.list
 echo "deb-src http://packages.icinga.com/debian icinga-${DIST} main" >> \
 /etc/apt/sources.list.d/${DIST}-icinga.list  ```

I also uncomment “backports” repository.

But after this all when I write to console “apt update”
Output is this:

Hit:1 http://security.debian.org stretch/updates InRelease
Hit:2 http://packages.icinga.com/debian icinga-buster InRelease
Hit:3 http://packages.icinga.com/debian icinga-stretch InRelease
Ign:4 http://deb.debian.org/debian stretch InRelease
Hit:5 http://deb.debian.org/debian stretch-updates InRelease
Hit:6 http://deb.debian.org/debian stretch-backports InRelease
Hit:7 http://deb.debian.org/debian stretch Release
Hit:8 https://packages.sury.org/php stretch InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
5 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@vps-d03436bb:/etc/apt/sources.list.d# apt list --upgradable
Listing... Done
icinga2/icinga-stretch 2.11.4-1.stretch amd64 [upgradable from: 2.6.0-2+deb9u1]
icinga2-bin/icinga-stretch 2.11.4-1.stretch amd64 [upgradable from: 2.6.0-2+deb9u1]
icinga2-common/icinga-stretch 2.11.4-1.stretch all [upgradable from: 2.6.0-2+deb9u1]
icinga2-ido-mysql/icinga-stretch 2.11.4-1.stretch amd64 [upgradable from: 2.6.0-2+deb9u1]
libicinga2/icinga-stretch 2.9.2-1.stretch amd64 [upgradable from: 2.6.0-2+deb9u1]
root@vps-d03436bb:/etc/apt/sources.list.d#

I can´t upgrade to new version of Icinga2 because the package with Icinga2 is broken. :frowning:

root@vps-d03436bb:/etc/apt/sources.list.d# apt upgrade icinga2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 icinga2 : Depends: icinga2-bin (= 2.11.4-1.stretch) but 2.6.0-2+deb9u1 is to be installed
           Depends: icinga2-common (= 2.11.4-1.stretch) but 2.6.0-2+deb9u1 is to be installed
E: Broken packages

How can I fix it please?

That looks wrong.

Did you install the archive key as well?

Yes, I did.

Output after I remove - icinga-buste In Release.

root@vps-d03436bb:/etc/apt/sources.list.d# apt update
Hit:1 http://packages.icinga.com/debian icinga-stretch InRelease
Ign:2 http://deb.debian.org/debian stretch InRelease
Hit:3 http://deb.debian.org/debian stretch-updates InRelease
Hit:4 http://security.debian.org stretch/updates InRelease
Hit:5 http://deb.debian.org/debian stretch Release
Hit:6 https://deb.debian.org/debian stretch-backports InRelease
Hit:7 https://packages.sury.org/php stretch InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
5 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list.d/icinga2.list:2 and /etc/apt/sources.list.d/stretch-icinga.list:2
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/icinga2.list:1 and /etc/apt/sources.list.d/stretch-icinga.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/icinga2.list:1 and /etc/apt/sources.list.d/stretch-icinga.list:1
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/icinga2.list:1 and /etc/apt/sources.list.d/stretch-icinga.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/icinga2.list:1 and /etc/apt/sources.list.d/stretch-icinga.list:1
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list.d/icinga2.list:2 and /etc/apt/sources.list.d/stretch-icinga.list:2
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/icinga2.list:1 and /etc/apt/sources.list.d/stretch-icinga.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/icinga2.list:1 and /etc/apt/sources.list.d/stretch-icinga.list:1
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/icinga2.list:1 and /etc/apt/sources.list.d/stretch-icinga.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/icinga2.list:1 and /etc/apt/sources.list.d/stretch-icinga.list:1
root@vps-d03436bb:/etc/apt/sources.list.d#

You have duplicate entries in /etc/apt/sources.list.d/icinga2.list and /etc/apt/sources.list.d/stretch-icinga.list. I’d recommend to delete /etc/apt/sources.list.d/stretch-icinga.list

2 Likes

Why they keep back? :frowning:
I don´t undersand it.

root@vps-d03436bb:~# apt update
Hit:1 http://security.debian.org stretch/updates InRelease
Ign:2 http://deb.debian.org/debian stretch InRelease
Hit:3 http://deb.debian.org/debian stretch-updates InRelease
Hit:4 http://packages.icinga.com/debian icinga-stretch InRelease
Hit:5 http://deb.debian.org/debian stretch Release
Hit:6 https://deb.debian.org/debian stretch-backports InRelease
Hit:7 https://packages.sury.org/php stretch InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
5 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@vps-d03436bb:~# apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  icinga2 icinga2-bin icinga2-common icinga2-ido-mysql libicinga2
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

There was a change in icinga’s package arrangement. Please follow the suggestions as described here.

1 Like

Thanks! I updated it. But now everything running (icinga2 and icinga was online), but web icinga tell me: Monitoring backend ‘icinga’ is not running.. :confused:

Screenshot:

How to fix it?

root@vps-d03436bb:~# service icinga2 status
● icinga2.service - Icinga host/service/network monitoring system
   Loaded: loaded (/lib/systemd/system/icinga2.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/icinga2.service.d
           └─limits.conf
   Active: active (running) since Thu 2020-07-02 11:15:52 UTC; 4s ago
  Process: 22243 ExecStartPre=/usr/lib/icinga2/prepare-dirs /etc/default/icinga2 (code=exited, status=0/SUCCESS)
 Main PID: 22249 (icinga2)
    Tasks: 15
   CGroup: /system.slice/icinga2.service
           ├─22249 /usr/lib/x86_64-linux-gnu/icinga2/sbin/icinga2 --no-stack-rlimit daemon --close-stdio -e /var/log/icinga2
/error.log
           ├─22271 /usr/lib/x86_64-linux-gnu/icinga2/sbin/icinga2 --no-stack-rlimit daemon --close-stdio -e /var/log/icinga2
/error.log
           └─22272 /usr/lib/x86_64-linux-gnu/icinga2/sbin/icinga2 --no-stack-rlimit daemon --close-stdio -e /var/log/icinga2
/error.log

Jul 02 11:15:52 vps-d03436bb icinga2[22249]: [2020-07-02 11:15:52 +0000] information/ConfigItem: Instantiated 1 IdoMysqlConn
ection.
Jul 02 11:15:52 vps-d03436bb icinga2[22249]: [2020-07-02 11:15:52 +0000] information/ConfigItem: Instantiated 235 CheckComma
nds.
Jul 02 11:15:52 vps-d03436bb icinga2[22249]: [2020-07-02 11:15:52 +0000] information/ConfigItem: Instantiated 3 TimePeriods.
Jul 02 11:15:52 vps-d03436bb icinga2[22249]: [2020-07-02 11:15:52 +0000] information/ConfigItem: Instantiated 1 UserGroup.
Jul 02 11:15:52 vps-d03436bb icinga2[22249]: [2020-07-02 11:15:52 +0000] information/ConfigItem: Instantiated 1 User.
Jul 02 11:15:52 vps-d03436bb icinga2[22249]: [2020-07-02 11:15:52 +0000] information/ConfigItem: Instantiated 12 Services.
Jul 02 11:15:52 vps-d03436bb icinga2[22249]: [2020-07-02 11:15:52 +0000] information/ConfigItem: Instantiated 3 ServiceGroup
s.
Jul 02 11:15:52 vps-d03436bb icinga2[22249]: [2020-07-02 11:15:52 +0000] information/ScriptGlobal: Dumping variables to file
 '/var/cache/icinga2/icinga2.vars'
Jul 02 11:15:52 vps-d03436bb icinga2[22249]: [2020-07-02 11:15:52 +0000] information/cli: Closing console log.
Jul 02 11:15:52 vps-d03436bb systemd[1]: Started Icinga host/service/network monitoring system.
root@vps-d03436bb:~# service icinga status
● icinga.service - LSB: icinga host/service/network monitoring and management system
   Loaded: loaded (/etc/init.d/icinga; generated; vendor preset: enabled)
   Active: active (running) since Thu 2020-07-02 11:15:52 UTC; 7s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 22294 ExecStop=/etc/init.d/icinga stop (code=exited, status=0/SUCCESS)
  Process: 22319 ExecStart=/etc/init.d/icinga start (code=exited, status=0/SUCCESS)
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/icinga.service
           └─22355 /usr/sbin/icinga -d /etc/icinga/icinga.cfg

Jul 02 11:15:52 vps-d03436bb icinga[22354]: Icinga 1.13.4 starting... (PID=22354)
Jul 02 11:15:52 vps-d03436bb icinga[22354]: Local time is Thu Jul 02 11:15:52 UTC 2020
Jul 02 11:15:52 vps-d03436bb icinga[22354]: LOG VERSION: 2.0
Jul 02 11:15:52 vps-d03436bb icinga[22354]: Warning: Variable 'normal_check_interval' with value '5' is DEPRECATED. Replace
it with 'check_interval'.
Jul 02 11:15:52 vps-d03436bb icinga[22354]: Warning: Variable 'retry_check_interval' with value '1' is DEPRECATED. Replace i
t with 'retry_interval'.
Jul 02 11:15:52 vps-d03436bb icinga[22354]: Warning: Object definition type 'hostextinfo' is DEPRECATED in file '/etc/icinga
/objects/extinfo_icinga.cfg' on line 5.
Jul 02 11:15:52 vps-d03436bb icinga[22355]: Finished daemonizing... (New PID=22355)
Jul 02 11:15:52 vps-d03436bb icinga[22319]: Starting icinga monitoring daemon: icinga.
Jul 02 11:15:52 vps-d03436bb systemd[1]: Started LSB: icinga host/service/network monitoring and management system.
Jul 02 11:15:52 vps-d03436bb icinga[22355]: Event loop started...

Please check if your old version caused an error as described here.

1 Like

thanks… but how can I delete it?

MariaDB [icingadb]> select status_update_time from icinga_programstatus;
+---------------------+
| status_update_time  |
+---------------------+
| 2020-07-02 11:09:39 |
+---------------------+
1 row in set (0.00 sec)

No, that’s fine. Don’t delete it. It looks like your ido is not working. Is it enabled? Please check with icinga2 feature list. If so, please check your /etc/icinga2/features-available/ido-mysql.conf if it is configured correctly e.g. try to login using the credentials configured in that file.

1 Like

You were right. :slight_smile: There is no password. After I tried to login to phpmyadmin with this credentials I can login.

Ido is enbaled.

root@vps-d03436bb:~# icinga2 feature list
Disabled features: compatlog debuglog elasticsearch gelf graphite influxdb livestatus opentsdb perfdata statusdata syslog
Enabled features: api checker command ido-mysql mainlog notification

Sorry, I forgot… I added password to config, restarted icinga2, and icinga service and still not working… :confused:

Any hints in the icinga logs?

1 Like

Where I can find log of icinga?

I tried this:

root@vps-d03436bb:~# icinga2 daemon -C
[2020-07-02 11:48:41 +0000] information/cli: Icinga application loader (version: r2.11.4-1)
[2020-07-02 11:48:41 +0000] information/cli: Loading configuration file(s).
[2020-07-02 11:48:41 +0000] information/ConfigItem: Committing config item(s).
[2020-07-02 11:48:41 +0000] warning/ApplyRule: Apply rule 'satellite-host' (in /etc/icinga2/conf.d/satellite.conf: 29:1-29:41) for type 'Dependency' does not match anywhere!
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 1 ScheduledDowntime.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 2 HostGroups.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 1 FileLogger.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 2 NotificationCommands.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 1 NotificationComponent.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 13 Notifications.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 1 IcingaApplication.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 1 Host.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 1 Downtime.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 1 CheckerComponent.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 3 Zones.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 1 ExternalCommandListener.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 1 Endpoint.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 1 ApiUser.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 1 IdoMysqlConnection.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 235 CheckCommands.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 3 TimePeriods.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 1 UserGroup.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 1 User.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 12 Services.
[2020-07-02 11:48:41 +0000] information/ConfigItem: Instantiated 3 ServiceGroups.
[2020-07-02 11:48:41 +0000] information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'
[2020-07-02 11:48:41 +0000] information/cli: Finished validating the configuration file(s).

It is /var/log/icinga2/icinga2.log.

2 Likes

Here is log: icinga2.log (509.4 KB)
And error.log is empty.

[2020-07-02 11:52:09 +0000] critical/IdoMysqlConnection: Exception during database operation: Verify that your database is operational!
[2020-07-02 11:52:19 +0000] information/WorkQueue: #5 (IdoMysqlConnection, ido-mysql) items: 1, rate: 2.98333/s (179/min 933/5min 1969/15min);
[2020-07-02 11:52:19 +0000] critical/IdoMysqlConnection: Schema version '1.14.2' does not match the required version '1.14.3' (or newer)! Please check the upgrade documentation at https://icinga.com/docs/icinga2/latest/doc/16-upgrading-icinga-2/#upgrading-mysql-db
Context:
	(0) Reconnecting to MySQL IDO database 'ido-mysql'

The shema update went wrong or wasn’t executed.

2 Likes