patrickpr / trapdirector

Icingaweb2 module for receiving and handling snmp traps
GNU General Public License v3.0
53 stars 15 forks source link

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

Open rijokr opened 2 years ago

rijokr commented 2 years ago

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:

jprusch commented 2 years ago

Confirmed. Also not working with

Gninieb commented 2 years ago

Confirmed. Also not working with

jprusch commented 2 years ago

Confirmed. Changing getConnection with getDbAdapter fixes the issue. Thx