Icinga Director is not visible

Hello Team,

We would need your support please, We have done the below setup with the following versions on one of RHEL 7 instance.

  • Director version (System - About): 1.8.1
  • Icinga Web 2 version and modules (System - About):
  • Icinga Web 2 version : 2.11.1
  • Modules: director -1.8.1 , incubator - 0.6.0 , reactbundle -0.9.0
  • Icinga 2 version (icinga2 --version): r2.13.5-1
  • Operating System and version: RHEL 7 : uname -a : 3.10.0-1160.76.1.el7.x86_64
  • Webserver, PHP versions: Apache/2.4.6 & PHP Version 7.3.33

Icinga Director is not visible in the icingaweb2 UI. We are noticing some exceptions during the PHP restart:

PDOException in /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php:401 with message: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘expires_at’ in ‘where clause’
#0 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(401): PDO->prepare(String)
#1 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(489): ipl\Sql\Connection->prepexec(String)
#2 /usr/share/php/Icinga/Web/RememberMe.php(170): ipl\Sql\Connection->delete(String, Array)
#3 /usr/share/icingaweb2/application/controllers/ApplicationStateController.php(70): Icinga\Web\RememberMe::removeExpired()
#4 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Controllers\ApplicationStateController->indexAction()
#5 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#6 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#7 /usr/share/php/Icinga/Application/Web.php(290): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#8 /usr/share/php/Icinga/Application/webrouter.php(105): Icinga\Application\Web->dispatch()
#9 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#10 {main}

Could you please help me how can i resolve this issue & get the icinga director in the icingaweb2 UI please.

Your support would be much helpful please.

Many Thanks,
Regards,
Ravi Davu

I guess you did already …:

  1. check if correct owner and permission are set, example:
    ls -ld /usr/share/icingaweb2/modules/director
    drwxr-xr-x 10 root root 4096 Apr 22 2022 /usr/share/icingaweb2/modules/director
    (of course also recursive)

  2. enable module ‘director’ in system->modules

  3. integrated the director in your system startup (and have it started!)
    systemctl status icinga-director

root@vgsn: ls -ld /usr/share/icingaweb2/modules/director
d-wx-wxrwx. 11 root root 4096 Nov 1 14:14 /usr/share/icingaweb2/modules/director

We have given 337 permissions to director as per the online documents… I hope that is not working.

Director module has already been enabled.

In RHEL 7.X… Do we still need to integrate the director to system startup…??

yes, try the nice 755 protection:
chmod -R 755 /usr/share/icingaweb2/modules/director

and also yes - at least with my latest versions (RHEL 7 and all icinga modules are new) , I need to
systemctl enable icinga-director
systemctl start icinga-director

I stopped the director as test, immediately a message in gui->director appeared:
! Daemon has been stopped 6m 5s ago, was running with PID 30527 as …
so I assume, it is required.

your title is very misleading.

looks like your database migration from icingaweb2 2.9 didin’t happen:
https://github.com/Icinga/icingaweb2/search?q=expires_at

reactbundle -0.9.0 is deprecated please remove it and install Icinga PHP Thirdparty via packet manager.

In case you have installed icingaweb2-module-ipl thats deprecated too please remove it and install icinga-php-library via packet manager as well.

Thank you… By the way, I haven’t installed the icingaweb2 2.9… We have directly installed the 2.11.1

Yes, I have done through git clone, the reactbundle - 0.9.0(enabled) & ipl-0.5.0(but disabled). But I can remove the reactbundle & ipl for now…

Could you please help me where can i find the icinga-php-thirdparty & icinga-php-library packages in any repository…?

I have tried with git clone to pull the icinga-php-thirdparty & icinga-php-library but they are already available at the below directories:

GitHub - Icinga/icinga-php-thirdparty: Bundle for all 3rd party PHP libraries used by Icinga Web products inside (/usr/share/icinga-php/vendor)
jboss@vgsn:/usr/share/icinga-php/vendor $ cat VERSION
v0.11.0
jboss@vgsn:/usr/share/icinga-php/vendor $

GitHub - Icinga/icinga-php-library: Bundle for all Icinga PHP libraries inside (/usr/share/icinga-php/ipl)
jboss@vgsn:/usr/share/icinga-php/ipl$ cat VERSION
v0.10.0
jboss@vgsn:/usr/share/icinga-php/ipl$

But this didn’t work for me…

Could you please help me with the steps or any document available for the same to install via packet manager. So that i can try it out please.

could you please also confirm, Do we still need to integrate the director to system startup here…??

please write down everything you did first.I think there is something else wrong with your setup.

did you follow RHEL - Icinga Web
or any other guide?

for a first attempt you can use the packages for CentOS7 but for the RHEL7 enterprise rpms you should get a Icinga Subscription

We have followed this link & installed all the above mentioned packages: Icinga 2, Icinga Web 2 and Director Kickstart on CentOS 7 & missed only the last step:

systemctl enable icinga-director.service
systemctl start icinga-director.service

you are not doing yourself a favour using a 2 year old tutorial.

I suggest you start from scratch and install icinga2 and icingaweb2 according to the tutorial, because this did not change

If icingaweb is working correctly install icinga-director using yum. it is available as a package now.

please post the packages that are installed with icinga-director as depenencies

Hello Manfred,

After enabled the icinga-director service, i am able to see the icinga director on the icingaweb2 UI but still the error persists in the icingaweb2.log file:

#1 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(489): ipl\Sql\Connection->prepexec(String)
#2 /usr/share/php/Icinga/Web/RememberMe.php(170): ipl\Sql\Connection->delete(String, Array)
#3 /usr/share/icingaweb2/application/controllers/ApplicationStateController.php(70): Icinga\Web\RememberMe::removeExpired()
#4 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Controllers\ApplicationStateController->indexAction()
#5 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#6 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#7 /usr/share/php/Icinga/Application/Web.php(290): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#8 /usr/share/php/Icinga/Application/webrouter.php(105): Icinga\Application\Web->dispatch()
#9 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#10 {main}

Is there any possible way to resolve this error…??

Many Thanks

hey RaviDavu,

I guess something is wrong with your database ‘icingaweb2.icingaweb_rememberme’, used at GUI login switch ‘Stay logged in’.

here pointers for the likely cause and its solution(s):

2022-11-19 12_09_05-Window

2 Likes

I can confirm… Now there are no errors. Its been successful. I have dropped the table & created it again as given in the github. That worked like a charm … Many Thanks Manfred for your kind support.

CREATE TABLE icingaweb_rememberme(
id int(10) unsigned NOT NULL AUTO_INCREMENT,
username varchar(254) COLLATE utf8mb4_unicode_ci NOT NULL,
passphrase varchar(256) NOT NULL,
random_iv varchar(24) NOT NULL,
http_user_agent text NOT NULL,
expires_at timestamp NULL DEFAULT NULL,
ctime timestamp NULL DEFAULT NULL,
mtime timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

1 Like

thanks for solution confirmation !