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

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

You´re god! I was found upgrading schema (in /usr/share/icinga2-ido-mysql/schema/upgrade), here is 2.11.0.sql file… but how to upgrade it?

Do you want to see content of this file?

I updated it by this command:
mysql -u root -p icingadb < /usr/share/icinga2-ido-mysql/schema/upgrade/2.11.0.sql

And now is everything working!!
Thanks a lot!!!

But… this error is still here… :frowning:
image

Did you upgrade icingaweb2 as well?

1 Like

It look´s icingaweb2 is on the newest version…


root@vps-d03436bb:~# apt upgrade icingaweb2
Reading package lists... Done
Building dependency tree
Reading state information... Done
icingaweb2 is already the newest version (2.8.1-1.stretch).
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

So… Yes, I did.

So… yes, I did make upgrade to new version of icingaweb2. Or what is the newest version?

2.8.1 is the newest version. I’ve found this issue, maybe you have a similar error?

I´ve found this issue too, but I have error php71 and on this issue is error php70… But thanks.
I don´t really know, how to fix it :frowning:

BTW… what I must add to etc/hosts?
Maybe this is the reason?

Or this?

When you configure fqdn stead of ip addresses you need any kind of name resolution. One option is to put your fqdn into /etc/hosts.
The last error indicates name resolution is not working or api port is not open.
What is the result of ping vps... (please insert your fqdn).

I´m so sorry… but what is fqdn?

Or how can I open API port?

hostname incl. domain name in your case vps...ovh.net

By enabling the feature api (which you did already). You can verfiy using netstat -tln | grep 5665 the result should look like

tcp 0 0 0.0.0.0:5665 0.0.0.0:* LISTEN

Thanks, I will try it.

I have 2 VPS servers and I must do the same steps on the second VPS, but I find a problem :frowning:

I do everything like on the first server.

root@vps-834c60cb:~# apt update
Ign:1 http://deb.debian.org/debian stretch InRelease
Hit:2 http://security.debian.org stretch/updates 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://packages.sury.org/php stretch InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
root@vps-834c60cb:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up icinga2-common (2.11.4-1.stretch) ...
Job for icinga2.service failed because the control process exited with error code.
See "systemctl status icinga2.service" and "journalctl -xe" for details.
invoke-rc.d: initscript icinga2, action "start" failed.
● 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: failed (Result: exit-code) since Thu 2020-07-02 13:46:15 UTC; 11ms ago
  Process: 26664 ExecStart=/usr/sbin/icinga2 daemon --close-stdio -e ${ICINGA2_ERROR_LOG} (code=exited, status=203/EXEC)
  Process: 26657 ExecStartPre=/usr/lib/icinga2/prepare-dirs /etc/default/icinga2 (code=exited, status=0/SUCCESS)
 Main PID: 26664 (code=exited, status=203/EXEC)

Jul 02 13:46:15 vps-834c60cb systemd[1]: Starting Icinga host/service/network monitoring system...
Jul 02 13:46:15 vps-834c60cb systemd[1]: icinga2.service: Main process exited, code=exited, status=203/EXEC
Jul 02 13:46:15 vps-834c60cb systemd[1]: Failed to start Icinga host/service/network monitoring system.
Jul 02 13:46:15 vps-834c60cb systemd[1]: icinga2.service: Unit entered failed state.
Jul 02 13:46:15 vps-834c60cb systemd[1]: icinga2.service: Failed with result 'exit-code'.
dpkg: error processing package icinga2-common (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 icinga2-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

You have an error in your configuration. Check with icinga2 daemon -C

I want, but it doesn´t work… :frowning:

root@vps-834c60cb:~# icinga2 daemon -C
-bash: /usr/sbin/icinga2: No such file or directory

Hi man,
how did you solve this? I have similar problem:

  • Unable to detect your Icinga 2 Core version (DeployFormsBug7530.php:71) message appear after click on Deploy changes.

I’ve updated / reinstalled all icinga packages from stretch to buster.
Changed 755 permissions and add icingadirector to correct groups which is mentioned here:

But still same issue.

One weird think I’ve found is in journalctl -f -u icinga-director
Jun 04 13:06:45 icinga icingadirector[341]: Zend_Db_Adapter_Exception in /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Pdo/Abstract.php:145 with message: SQLSTATE[HY000] [2002] No such file or directory <- PDOException in /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Pdo/Abstract.php:124 with message: SQLSTATE[HY000] [2002] No such file or directory

Another weird messages from icinga logs:

2021-06-04T13:27:10+02:00 - ERROR - RuntimeException in /usr/share/icingaweb2/modules/director-2020-09-05/library/Director/Core/RestApiClient.php:84 with message: No CURL extension detected, it must be installed and enabled
#0 /usr/share/icingaweb2/modules/director-2020-09-05/library/Director/Core/RestApiClient.php(185): Icinga\Module\Director\Core\RestApiClient->request(String, String, NULL)
#1 /usr/share/icingaweb2/modules/director-2020-09-05/library/Director/Core/CoreApi.php(403): Icinga\Module\Director\Core\RestApiClient->get(String)
#2 /usr/share/icingaweb2/modules/director-2020-09-05/library/Director/Web/Widget/InspectPackages.php(99): Icinga\Module\Director\Core\CoreApi->getPackages()
#3 /usr/share/icingaweb2/modules/director-2020-09-05/library/Director/Web/Widget/InspectPackages.php(33): Icinga\Module\Director\Web\Widget\InspectPackages->getPackages(Object(Icinga\Module\Director\Objects\IcingaEndpoint))
#4 /usr/share/icingaweb2/modules/director-2020-09-05/application/controllers/InspectController.php(181): Icinga\Module\Director\Web\Widget\InspectPackages->getContent(Object(Icinga\Module\Director\Objects\IcingaEndpoint), NULL, NULL, NULL
#5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Director\Controllers\InspectController->packagesAction()
#6 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#7 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#8 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#9 /usr/share/php/Icinga/Application/webrouter.php(99): Icinga\Application\Web->dispatch()
#10 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#11 {main}
2021-06-04T13:27:30+02:00 - ERROR - RuntimeException in /usr/share/icingaweb2/modules/director-2020-09-05/library/Director/Core/RestApiClient.php:84 with message: No CURL extension detected, it must be installed and enabled
#0 /usr/share/icingaweb2/modules/director-2020-09-05/library/Director/Core/RestApiClient.php(185): Icinga\Module\Director\Core\RestApiClient->request(String, String, NULL)
#1 /usr/share/icingaweb2/modules/director-2020-09-05/library/Director/Core/CoreApi.php(380): Icinga\Module\Director\Core\RestApiClient->get(String)
#2 /usr/share/icingaweb2/modules/director-2020-09-05/application/controllers/InspectController.php(148): Icinga\Module\Director\Core\CoreApi->getStatus()
#3 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Director\Controllers\InspectController->statusAction()
#4 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#6 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#7 /usr/share/php/Icinga/Application/webrouter.php(99): Icinga\Application\Web->dispatch()
#8 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#9 {main}

Allowing php7.3 in Apache solve this issue.

1 Like