[NAGVIS] Invalid JSON response : Error (Error): Call to a me

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ixi
Posts: 3
Joined: Tue Aug 04, 2020 4:47 am

[NAGVIS] Invalid JSON response : Error (Error): Call to a me

Post by ixi »

hello,

I just did a fresh installation of Nagvis and I encounter this error when I want to add a host or service on a card. I'm usuing NDO Backend and Nagvis works properly in demo mode (Nagios 4.4.6 + Ndo 2.1.3 with Backend ndomy_1, Ubuntu Server 20.04.1 LTS).
Can you help me with this problem?

Code: Select all

    Error: Syntax Error

    Invalid JSON response
    Time: 1598940649
    URL: /nagvis/server/core/ajax_handler.php?mod=Map&act=addModify&show=SERVEUR&type=host&x=345&y=215&_ajaxid=1598940649
    Response:

    Error (Error): Call to a member function prepare() on nullarray(1) { [0]=> array(2) { ["function"]=> string(15) "nagvisException" ["args"]=> array(1) { [0]=> object(Error)#29 (7) { ["message":protected]=> string(43) "Call to a member function prepare() on null" ["string":"Error":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(62) "/usr/local/nagvis/share/server/core/classes/CorePDOHandler.php" ["line":protected]=> int(321) ["trace":"Error":private]=> array(11) { [0]=> array(5) { ["file"]=> string(62) "/usr/local/nagvis/share/server/core/classes/CorePDOHandler.php" ["line"]=> int(339) ["function"]=> string(4) "prep" ["class"]=> string(14) "CorePDOHandler" ["type"]=> string(2) "->" } [1]=> array(5) { ["file"]=> string(64) "/usr/local/nagvis/share/server/core/classes/GlobalBackendPDO.php" ["line"]=> int(248) ["function"]=> string(5) "query" ["class"]=> string(14) "CorePDOHandler" ["type"]=> string(2) "->" } [2]=> array(5) { ["file"]=> string(54) "/usr/local/nagvis/share/server/core/mapcfg/default.php" ["line"]=> int(147) ["function"]=> string(10) "getObjects" ["class"]=> string(16) "GlobalBackendPDO" ["type"]=> string(2) "->" } [3]=> array(3) { ["file"]=> string(54) "/usr/local/nagvis/share/server/core/mapcfg/default.php" ["line"]=> int(161) ["function"]=> string(14) "getObjectNames" } [4]=> array(3) { ["file"]=> string(64) "/usr/local/nagvis/share/server/core/classes/ViewMapAddModify.php" ["line"]=> int(394) ["function"]=> string(13) "listHostNames" } [5]=> array(5) { ["file"]=> string(64) "/usr/local/nagvis/share/server/core/classes/ViewMapAddModify.php" ["line"]=> int(512) ["function"]=> string(9) "drawField" ["class"]=> string(16) "ViewMapAddModify" ["type"]=> string(2) "->" } [6]=> array(5) { ["file"]=> string(64) "/usr/local/nagvis/share/server/core/classes/ViewMapAddModify.php" ["line"]=> int(540) ["function"]=> string(10) "drawFields" ["class"]=> string(16) "ViewMapAddModify" ["type"]=> string(2) "->" } [7]=> array(5) { ["file"]=> string(64) "/usr/local/nagvis/share/server/core/classes/ViewMapAddModify.php" ["line"]=> int(623) ["function"]=> string(8) "drawForm" ["class"]=> string(16) "ViewMapAddModify" ["type"]=> string(2) "->" } [8]=> array(5) { ["file"]=> string(58) "/usr/local/nagvis/share/server/core/classes/CoreModMap.php" ["line"]=> int(134) ["function"]=> string(5) "parse" ["class"]=> string(16) "ViewMapAddModify" ["type"]=> string(2) "->" } [9]=> array(5) { ["file"]=> string(55) "/usr/local/nagvis/share/server/core/functions/index.php" ["line"]=> int(120) ["function"]=> string(12) "handleAction" ["class"]=> string(10) "CoreModMap" ["type"]=> string(2) "->" } [10]=> array(4) { ["file"]=> string(52) "/usr/local/nagvis/share/server/core/ajax_handler.php" ["line"]=> int(59) ["args"]=> array(1) { [0]=> string(55) "/usr/local/nagvis/share/server/core/functions/index.php" } ["function"]=> string(7) "require" } } ["previous":"Error":private]=> NULL } } } }
.../nagvis/frontend/nagvis-js/index.php?mod=Info :
Version Information

NagVis Version | 1.9.21
PHP Version | 7.4.3
MySQL Version | mysql Ver 8.0.21-0ubuntu0.20.04.4 for Linux on x86_64 ((Ubuntu))
OS | Linux nagios 5.4.0-45-generic #49-Ubuntu SMP Wed Aug 26 13:38:52 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

SERVER_SOFTWARE | Apache/2.4.41 (Ubuntu)
SCRIPT_FILENAME | /usr/local/nagvis/share/frontend/nagvis-js/index.php
SCRIPT_NAME | /nagvis/frontend/nagvis-js/index.php
REQUEST_TIME | 1599466068 (gmdate(): Mon, 07 Sep 2020 08:07:48 +0000)

error_reporting | 30719
safe_mode | no
max_execution_time | 30 seconds
memory_limit | 128M
loaded modules | Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, sodium, apache2handler, mysqlnd, PDO, xml, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, json, exif, mysqli, pdo_mysql, pdo_sqlite, Phar, posix, readline, shmop, SimpleXML, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache
json_encode | Oui
json_decode | Oui

USER_AGENT | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0
[Ubuntu Server 20.04.1 LTS - Apache 2.4.41 + PHP 7.4.3]
Nagios Core 4.4.6 - NDOUtils 2.1.3 - Nagvis 1.9.21 - PNP4Nagios 0.6.26
Locked