Icinga / icingaweb2

A lightweight and extensible web interface to keep an eye on your environment. Analyse problems and act on them.
https://icinga.com/get-started/
GNU General Public License v2.0
809 stars 282 forks source link

environment_id should be a resource got string instead #4857

Closed gbin2265 closed 2 years ago

gbin2265 commented 2 years ago

Describe the bug

when I open the page /icingaweb2/icingadb/hosts or /icingaweb2/icingadb/services I keep getting the error 'environment_id should be a resource got string instead'

The service rh-php73-php-fpm.service say UnexpectedValueException in /usr/share/icinga-php/ipl/vendor/ipl/orm/src/Behavior/Binary.php:37 with message: environment_id should be a resource got string instead

i recreate the icinga & icingadb database from scratch. No Change.

I upgrade from icingaweb2 2.10.3 with rh-php72-php-fpm.

Did i forget something ?

To Reproduce

Open the page /icingaweb2/icingadb/hosts or /icingaweb2/icingadb/services

Expected behavior

To see the info of the hosts or services

Screenshots

environment_id should be a resource got string instead

0 /usr/share/icinga-php/ipl/vendor/ipl/orm/src/Contract/PropertyBehavior.php(63): ipl\Orm\Behavior\Binary->fromDb(String, String, Integer)

Icinga/icingaweb2#1 /usr/share/icinga-php/ipl/vendor/ipl/orm/src/Behaviors.php(120): ipl\Orm\Contract\PropertyBehavior->retrieveProperty(String, String) Icinga/icingaweb2#2 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Redis/VolatileStateResults.php(131): ipl\Orm\Behaviors->retrieveProperty(String, String) Icinga/icingaweb2#3 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Redis/VolatileStateResults.php(79): Icinga\Module\Icingadb\Redis\VolatileStateResults->applyRedisUpdates() Icinga/icingaweb2#4 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Common/BaseItemList.php(87): Icinga\Module\Icingadb\Redis\VolatileStateResults->rewind() Icinga/icingaweb2#5 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Widget/ItemList/StateList.php(23): Icinga\Module\Icingadb\Common\BaseItemList->assemble() Icinga/icingaweb2#6 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(295): Icinga\Module\Icingadb\Widget\ItemList\StateList->assemble() Icinga/icingaweb2#7 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(497): ipl\Html\HtmlDocument->ensureAssembled() Icinga/icingaweb2#8 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(339): ipl\Html\HtmlDocument->render() Icinga/icingaweb2#9 /usr/share/icinga-php/ipl/vendor/ipl/html/src/BaseHtmlElement.php(255): ipl\Html\HtmlDocument->renderUnwrapped() Icinga/icingaweb2#10 /usr/share/icinga-php/ipl/vendor/ipl/html/src/BaseHtmlElement.php(323): ipl\Html\BaseHtmlElement->renderContent() Icinga/icingaweb2#11 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(499): ipl\Html\BaseHtmlElement->renderUnwrapped() Icinga/icingaweb2#12 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(339): ipl\Html\HtmlDocument->render() Icinga/icingaweb2#13 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(499): ipl\Html\HtmlDocument->renderUnwrapped() Icinga/icingaweb2#14 /usr/share/icinga-php/ipl/vendor/ipl/web/src/Compat/ViewRenderer.php(56): ipl\Html\HtmlDocument->render() Icinga/icingaweb2#15 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php(964): ipl\Web\Compat\ViewRenderer->render() Icinga/icingaweb2#16 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/HelperBroker.php(272): Zend_Controller_Action_Helper_ViewRenderer->postDispatch() Icinga/icingaweb2#17 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Web/Controller.php(491): Zend_Controller_Action_HelperBroker->notifyPostDispatch() Icinga/icingaweb2#18 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Icinga\Module\Icingadb\Web\Controller->dispatch(String) Icinga/icingaweb2#19 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) Icinga/icingaweb2#20 /usr/share/php/Icinga/Application/Web.php(290): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) Icinga/icingaweb2#21 /usr/share/php/Icinga/Application/webrouter.php(105): Icinga\Application\Web->dispatch() Icinga/icingaweb2#22 /usr/share/icingaweb2/public/index.php(4): require_once(String) Icinga/icingaweb2#23 {main}

Your Environment

Include as many relevant details about the environment you experienced the problem in

Loaded Libraries icinga/icinga-php-library 0.9.0 icinga/icinga-php-thirdparty 0.11.0 Loaded Modules icingadb 1.0.0 Configure monitoring 2.11.0 Configure

Copyright (c) 2012-2022 Icinga GmbH (https://icinga.com/) License GPLv2+: GNU GPL version 2 or later https://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.

System information: Platform: Red Hat Enterprise Linux Server Platform version: 7.9 (Maipo) Kernel: Linux Kernel version: 3.10.0-1160.59.1.el7.x86_64 Architecture: x86_64

Build information: Compiler: GNU 11.2.1 Build host: runner-hh8q3bz2-project-322-concurrent-0 OpenSSL version: OpenSSL 1.0.2k-fips 26 Jan 2017

regards, Geert

lippserd commented 2 years ago

Hi,

Thanks for the report.

Please see Icinga/ipl-orm#69.

Duplicates Icinga/icingadb-web#584.

All the best, Eric