Error in nagvis after upgrading Ubuntu to 20.04 (LTS)

We just upgraded our server to ubuntu 20.04 LTS. We did use same checkmk version before and after upgrade.
We now get an error in nagvis. Error seems to be the same in sidebar plugin and when openenig nagvis directly:
Error (Error): Cannot access private property CorePDOHandler::$dsnarray(1) { [0]=> array(2) { ["function"]=> string(15) "nagvisException" ["args"]=> array(1) { [0]=> object(Error)#13 (7) { ["message":protected]=> string(51) "Cannot access private property CorePDOHandler::$dsn" ["string":"Error":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(89) "/opt/omd/versions/1.6.0p20.cee/share/nagvis/htdocs/server/core/classes/CoreAuthModPDO.php" ["line":protected]=> int(58) ["trace":"Error":private]=> array(3) { [0]=> array(6) { ["file"]=> string(90) "/opt/omd/versions/1.6.0p20.cee/share/nagvis/htdocs/server/core/classes/CoreAuthHandler.php" ["line"]=> int(47) ["function"]=> string(11) "__construct" ["class"]=> string(14) "CoreAuthModPDO" ["type"]=> string(2) "->" ["args"]=> array(0) { } } [1]=> array(6) { ["file"]=> string(82) "/opt/omd/versions/1.6.0p20.cee/share/nagvis/htdocs/server/core/functions/index.php" ["line"]=> int(44) ["function"]=> string(11) "__construct" ["class"]=> string(15) "CoreAuthHandler" ["type"]=> string(2) "->" ["args"]=> array(0) { } } [2]=> array(4) { ["file"]=> string(79) "/opt/omd/versions/1.6.0p20.cee/share/nagvis/htdocs/frontend/nagvis-js/index.php" ["line"]=> int(53) ["args"]=> array(1) { [0]=> string(82) "/opt/omd/versions/1.6.0p20.cee/share/nagvis/htdocs/server/core/functions/index.php" } ["function"]=> string(7) "require" } } ["previous":"Error":private]=> NULL } } } }

Any hints on resolving this?


I checked with one of my 20.04 systems and had no problem with 1.6.0p20 on this machine.
What PHP version do you use in your system? I have the default 7.4 on my machine.

we use the default:
php -v
PHP 7.4.3 (cli) (built: Oct 6 2020 15:47:56) ( NTS )
Copyright © The PHP Group
Zend Engine v3.4.0, Copyright © Zend Technologies
with Zend OPcache v7.4.3, Copyright ©, by Zend Technologies

That’s the same version as on my system. I have no error if i open an example map.
It looks like something broken with your auth user “DB” on the system.

We are 1 step further.
Apache was using php7.2, even though no 7.2 module was enabled. After uninstalling every existing php7.2 Ubuntu package and rebooting the server (apache restart didn’t work), apache is now using php7.4.

Now we can start nagvis and use “automap” and 2 of 6 custom maps. The other maps throw an error that disappears after half a second and then only a white screen is shown. I catched a screenshot of the error message:

It looks like this map has some config entries what are found as a problem by NagVis
If you have the enterprise version you can try the 1.6 daily build. This includes a newer Nagvis version.
If this will not help I think only @LaMi can help :slight_smile:

Well, we have cee version, but would like to stay at production release.

I will contact our partner. Maybe they can help or get help from checkmk support team.

Just a quick update, after update to 1.6.0p21 (CEE) problem is still the same. NagvisExceptionHandler throws this in WebUI:

Error: (0) in_array() expects parameter 2 to be array, bool given
URL: /cdp/nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=BRZ
File: /opt/omd/versions/1.6.0p21.cee/share/nagvis/htdocs/server/core/classes/GlobalMapCfg.php
Line: 1028
#0 [internal function]: nagvisExceptionErrorHandler()
#3 /opt/omd/versions/1.6.0p21.cee/share/nagvis/htdocs/frontend/nagvis-
js/classes/NagVisHeaderMenu.php(164): GlobalMapCfg->readMapConfig()
#4 /opt/omd/versions/1.6.0p21.cee/share/nagvis/htdocs/frontend/nagvis- 
js/classes/NagVisHeaderMenu.php(305): NagVisHeaderMenu->getMapList()
#5 /opt/omd/versions/1.6.0p21.cee/share/nagvis/htdocs/frontend/nagvis- 
js/classes/NagVisHeaderMenu.php(82): NagVisHeaderMenu->getMacros()
#6 /opt/omd/versions/1.6.0p21.cee/share/nagvis/htdocs/frontend/nagvis- 
js/classes/FrontendModMap.php(117): NagVisHeaderMenu->__toString()
#7 /opt/omd/versions/1.6.0p21.cee/share/nagvis/htdocs/frontend/nagvis- 
js/classes/FrontendModMap.php(80): FrontendModMap->showViewDialog()
#8 /opt/omd/versions/1.6.0p21.cee/share/nagvis/htdocs/server/core/functions/index.php(120): 
#9 /opt/omd/versions/1.6.0p21.cee/share/nagvis/htdocs/frontend/nagvis-js/index.php(53): 
#10 {main}

In Apache Error.log the following:

[Tue Feb 23 09:19:52.662758 2021] [fcgid:warn] [pid 13308] [client] mod_fcgid: 
stderr: PHP Deprecated:  join(): Passing glue string after array is deprecated. Swap the parameters 
in /opt/omd/versions/1.6.0p21.cee/share/nagvis/htdocs/server/core/defines/global.php on line 41, 
referer: http://CHECK-MK-SERVER-IP/cdp/check_mk/


1.6.0p22 did remove the deprecated message in apache error log.
Is there a way to get nagvisExceptionErrorHandler() to report more than 10 lines in the WebUI?