trapdirector icon indicating copy to clipboard operation
trapdirector copied to clipboard

Trap director- handler and status&Mib tab are not working after updating the icingaweb2 (version2.11.1)

Open rijokr opened this issue 3 years ago • 3 comments

Hi

Recently we have updated the icinga2 & icingaweb2 to the new version which is described below. after the upgrade handler and status&Mib tab are not working and getting the below-mentioned error. requesting you to give a solution for this issue

### Handlers

Uncaught Error: Call to undefined method Icinga\Data\Db\DbConnection::getConnection() in /usr/share/icingaweb2/modules/trapdirector/application/controllers/HandlerController.php:35
Stack trace:
#0 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\TrapDirector\Controllers\HandlerController->indexAction()
#1 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch('indexAction')
#2 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#3 /usr/share/php/Icinga/Application/Web.php(290): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#4 /usr/share/php/Icinga/Application/webrouter.php(105): Icinga\Application\Web->dispatch()
#5 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/php/...')
#6 {main}
thrown

#0 [internal function]: Icinga\Application\Web->Icinga\Application\{closure}()
#1 {main}

### Status & Mib

Uncaught Error: Call to undefined method Icinga\Data\Db\DbConnection::getConnection() in /usr/share/icingaweb2/modules/trapdirector/library/Trapdirector/TrapsActions/UIDatabase.php:227
Stack trace:
#0 /usr/share/icingaweb2/modules/trapdirector/application/controllers/StatusController.php(24): Icinga\Module\Trapdirector\TrapsActions\UIDatabase->getDbConn()
#1 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Trapdirector\Controllers\StatusController->indexAction()
#2 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch('indexAction')
#3 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#4 /usr/share/php/Icinga/Application/Web.php(290): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#5 /usr/share/php/Icinga/Application/webrouter.php(105): Icinga\Application\Web->dispatch()
#6 /usr/sh

#0 [internal function]: Icinga\Application\Web->Icinga\Application\{closure}()
#1 {main}

#Environment:

  • trapdirector version :1.0.7a
  • Icinga Web 2 version and modules :2.11.1
  • Icinga 2 version : r2.13.4-1
  • Operating System and version: centos 7.9
  • Webserver, PHP versions:7.3.29

rijokr avatar Jul 17 '22 17:07 rijokr

Confirmed. Also not working with

  • Icinga Web 2 2.10.1
  • Apache HTTPD with PHP 7.4.30
  • Incubator 017.0
  • icinga-php-library 0.9.1
  • icinga-php-thirdparty 0.11.0

jprusch avatar Jul 18 '22 12:07 jprusch

Confirmed. Also not working with

  • Ubuntu 20.04
  • Icinga Web 2 Version 2.11.1
  • PHP Version 7.4.3
  • icinga-php-library 0.9.1
  • icinga-php-thirdparty 0.11.0
  • trapdirector 1.0.7.a

Gninieb avatar Aug 04 '22 10:08 Gninieb

Confirmed. Changing getConnection with getDbAdapter fixes the issue. Thx

jprusch avatar Sep 06 '22 06:09 jprusch