solved -- netxmsd not working after Update

Started by Meandmybrain, December 03, 2019, 02:14:18 PM

Previous topic - Next topic

Meandmybrain

Hi,

I updated my netxms server today to version 3.1.242 using apt-get update && apt-get upgrade on Ubuntu 18.04 LTS.
While upgrading I get the following error-massage:

"~$ sudo apt-get upgrade
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Paketaktualisierung (Upgrade) wird berechnet... Fertig
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
1 nicht vollständig installiert oder entfernt.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n] j
netxms-server:amd64 (3.1.242-2) wird eingerichtet ...
NetXMS Database Manager Version 3.1.242 Build 3.1-242-g2c0fcdb3de (UNICODE)

Unable to load and initialize database driver "/usr/local/lib/libnxddr_pgsql.so"
dpkg: Fehler beim Bearbeiten des Paketes netxms-server:amd64 (--configure):
installed netxms-server:amd64 package post-installation script subprocess returned error exit status 3
Trigger für libc-bin (2.27-3ubuntu1) werden verarbeitet ...
Fehler traten auf beim Bearbeiten von:
netxms-server:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)"

Netxmsd-service doesn`t came up.

debug 9 shows:

" sudo netxmsd -D 9
Using configuration file "/etc/netxmsd.conf"
2019.12.03 13:08:46.554 *D* [                   ] LIB directory set to /usr/lib/x86_64-linux-gnu/netxms
2019.12.03 13:08:46.554 *I* [                   ] Code page set to ISO8859-1
2019.12.03 13:08:46.555 *D* [dload              ] DLOpen: file="/usr/lib/x86_64-linux-gnu/netxms/linux.nsm", module=0x7ff1e5078e00
2019.12.03 13:08:46.555 *D* [dload              ] DLGetSymbolAddr: module=0x7ff1e5078e00, symbol=__NxSubAgentGetIfList, address=0x7ff1e476ef90
2019.12.03 13:08:46.555 *D* [dload              ] DLGetSymbolAddr: module=0x7ff1e5078e00, symbol=__NxSubAgentGetArpCache, address=0x7ff1e476efc0
2019.12.03 13:08:46.556 *I* [                   ] Platform subagent "/usr/lib/x86_64-linux-gnu/netxms/linux.nsm" successfully loaded
2019.12.03 13:08:46.556 *D* [dload              ] DLOpen: file="/usr/local/lib/libnxddr_pgsql.so", module=(nil)
2019.12.03 13:08:46.556 *E* [db.drv             ] Unable to load database driver module "/usr/local/lib/libnxddr_pgsql.so": libnetxms.so.2: cannot open shared object file: No such file or directory"
I tried reinstalling the pgsql driver but it didn`t help.

I found some hint in another thread.
Using  "ldd /usr/local/lib/libnxddr_pgsql.so"
I get the following massage:

"linux-vdso.so.1 (0x00007ffe763d0000)
        libnetxms.so.2 => not found
        libpq.so.5 => /usr/lib/x86_64-linux-gnu/libpq.so.5 (0x00007f50249c5000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f50247c1000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f50245a2000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f50241b1000)
        libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f5023f24000)
        libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f5023a59000)
        libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f502380e000)
        libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007f50235bc000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f5024e15000)
        libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f50232e6000)
        libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f50230b4000)
        libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f5022eb0000)
        libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f5022ca5000)
        liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007f5022a97000)
        libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f502287c000)
        libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007f5022661000)
        libgssapi.so.3 => /usr/lib/x86_64-linux-gnu/libgssapi.so.3 (0x00007f5022420000)
        libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f50220bb000)
        libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f5021eb7000)
        libheimntlm.so.0 => /usr/lib/x86_64-linux-gnu/libheimntlm.so.0 (0x00007f5021cae000)
        libkrb5.so.26 => /usr/lib/x86_64-linux-gnu/libkrb5.so.26 (0x00007f5021a21000)
        libasn1.so.8 => /usr/lib/x86_64-linux-gnu/libasn1.so.8 (0x00007f502177f000)
        libhcrypto.so.4 => /usr/lib/x86_64-linux-gnu/libhcrypto.so.4 (0x00007f5021549000)
        libroken.so.18 => /usr/lib/x86_64-linux-gnu/libroken.so.18 (0x00007f5021333000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f5021116000)
        libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f5020de7000)
        libidn2.so.0 => /usr/lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f5020bca000)
        libunistring.so.2 => /usr/lib/x86_64-linux-gnu/libunistring.so.2 (0x00007f502084c000)
        libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f5020639000)
        libnettle.so.6 => /usr/lib/x86_64-linux-gnu/libnettle.so.6 (0x00007f5020403000)
        libhogweed.so.4 => /usr/lib/x86_64-linux-gnu/libhogweed.so.4 (0x00007f50201cf000)
        libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f501ff4e000)
        libwind.so.0 => /usr/lib/x86_64-linux-gnu/libwind.so.0 (0x00007f501fd25000)
        libheimbase.so.1 => /usr/lib/x86_64-linux-gnu/libheimbase.so.1 (0x00007f501fb16000)
        libhx509.so.5 => /usr/lib/x86_64-linux-gnu/libhx509.so.5 (0x00007f501f8cc000)
        libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007f501f5c3000)
        libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f501f38b000)
        libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f501f183000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f501ede5000)"


Unfortunatly I`m not a linux-expert, so I don`t know how this file is gone and how I can get it back.

Does anyone have some suggestions to solve this problem?
Thanks
Sebastian

Filipp Sudanov

Hi!

Can you share the output of dpkg -l | grep netxms and the contents of /etc/netxmsd.conf


Meandmybrain

Hi,

dpkg -l | grep netxms:

ii  netxms-agent:amd64                    3.1.242-2                                       amd64        NetXMS agent
ii  netxms-base:amd64                     3.1.242-2                                       amd64        NetXMS core libraries
ii  netxms-dbdrv-pgsql:amd64              3.1.242-2                                       amd64        PostgreSQL driver for netxms-server
ii  netxms-dbdrv-sqlite3:amd64            3.1.242-2                                       amd64        SQLite3 driver for netxms-server
ii  netxms-release                        1.6                                             all          Package to install apt source and gpg keyring
iF  netxms-server:amd64                   3.1.242-2                                       amd64        meta package

netxmsd.conf:

DBDriver = /usr/local/lib/libnxddr_pgsql.so
DBServer = localhost
DBName = netxms
DBLogin = xxxx
DBPassword = xxxxxxxx
LogFile = /var/log/netxmsd
LogFailedSQLQueries = yes

Meandmybrain

Hi,

here are some other, maybe helpful things I figured out:
Bevor the update there was a "libnetxms.so.2" at /usr/lib/x86_64-linux-gnu; now there is a file "libnetxms.so.31".
It seems that libnxddr_pgsql.so is looking for a wrong file...?

Victor Kirhenshtein

Hi,

database driver you are using is definitely wrong (looks like leftover from old manual installation). You should use

DBDriver = pgsql.ddr

In general you need to specify full path to database driver in very special circumstances only - in 99% of the cases referencing driver by name only is preferred way.

Best regards,
Victor

Meandmybrain

Hi Victor,

that worked. Thanks a lot.
Now I´ve got the problem, that my version of netxms is 3.1.242-2 (I`m using "netxms-release-latest.deb") but the (newest?) web interface I can find in the download section is nxmc-3.1.241.war. Using this one gives me an error because of a "non-compatible communication protocol". Is the "...latest.deb" for beta-users? I it possible to downgrade netxms to 3.1.241?
Thanks ind advance.

Best regards,
Sebastian

Meandmybrain

Quote from: Meandmybrain on December 04, 2019, 11:01:20 AM
Hi Victor,

that worked. Thanks a lot.
Now I´ve got the problem, that my version of netxms is 3.1.242-2 (I`m using "netxms-release-latest.deb") but the (newest?) web interface I can find in the download section is nxmc-3.1.241.war. Using this one gives me an error because of a "non-compatible communication protocol". Is the "...latest.deb" for beta-users? I it possible to downgrade netxms to 3.1.241?
Thanks ind advance.

Best regards,
Sebastian

Problem is solved. I deleted the old nxmc.war before copying the new one to /tomcat/webapps, now tomcat deployed the new one correctly.

Thanks for ur help guys.

Best regards
Sebastian