"unable to load database driver" after Upgrade

Started by max, July 07, 2016, 01:10:46 PM

Previous topic - Next topic

max

Hi,

I upgraded from 1.2.17 to 2.0.4. according the adminguide.

Now I cannot start the server. I ran netxmsd -D 9, here is the log:
[07-Jul-2016 11:53:06.821] Log file opened
[07-Jul-2016 11:53:06.821] [DEBUG] LIB directory set to C:\NetXMS\lib
[07-Jul-2016 11:53:06.977] [ERROR] Unable to load database driver module "pgsql.ddr": Das angegebene Modul wurde nicht gefunden.


Here is my netxms.conf:
LogFile = C:\NetXMS\netxmsd.log
DBDriver = pgsql.ddr
DBServer = elia
DBName = netxms_db
DBLogin = netxms
DBPassword = ****
LogFailedSQLQueries = yes


I run netxms server on WinXP 32Bit; Postgres is 9.1 on OpenSuSE 12.4 (Kernel 3.1).
I checked: the files pqsql.ddr, pqsql.pdb are present in C:\NetXMS\bin\

Anything I am missing?

Thank you for any hint,
Ronald

Andreas@rc

As the log tells you, the server looks for the driver in C:\NetXMS\lib.

Simply put the absolute path to your config and you should be good to go: C:\NetXMS\bin\pgsql.ddr

Quote from: max on July 07, 2016, 01:10:46 PM
Hi,

I upgraded from 1.2.17 to 2.0.4. according the adminguide.

Now I cannot start the server. I ran netxmsd -D 9, here is the log:
[07-Jul-2016 11:53:06.821] Log file opened
[07-Jul-2016 11:53:06.821] [DEBUG] LIB directory set to C:\NetXMS\lib
[07-Jul-2016 11:53:06.977] [ERROR] Unable to load database driver module "pgsql.ddr": Das angegebene Modul wurde nicht gefunden.


Here is my netxms.conf:
LogFile = C:\NetXMS\netxmsd.log
DBDriver = pgsql.ddr
DBServer = elia
DBName = netxms_db
DBLogin = netxms
DBPassword = ****
LogFailedSQLQueries = yes


I run netxms server on WinXP 32Bit; Postgres is 9.1 on OpenSuSE 12.4 (Kernel 3.1).
I checked: the files pqsql.ddr, pqsql.pdb are present in C:\NetXMS\bin\

Anything I am missing?

Thank you for any hint,
Ronald

Victor Kirhenshtein

Hi,

this message could also mean that server cannot find required dll for pgsql.ddr. Check that postgreSQL client dll's are in your PATH.

Best regards,
Victor

max

Hello,

ty for the good hint!
libpq.dll is present. Sysinternals procmon told me that msvcr120.dll was missing.
After installing MS VC redistributable 2013 it connects.

Now I got a new problem when running nxdbmgr upgrade:

C:\NetXMS\bin>nxdbmgr.exe upgrade
NetXMS Database Manager Version 2.0.4 Build 8067 (2.0.4-RELEASE) (UNICODE)

Upgrading database...
Upgrading from version 285 to 286
Upgrading from version 286 to 287
Upgrading from version 287 to 288
Upgrading from version 288 to 289
Upgrading from version 289 to 290
Upgrading from version 290 to 291
Upgrading from version 291 to 292
Upgrading from version 292 to 293
Upgrading from version 293 to 294
SQL query failed (42P01 ERROR:  table "tdata_rows_985" does not exist):
DROP TABLE tdata_rows_985
SQL query failed (25P02 ERROR:  current transaction is aborted, commands ignored until end of transaction block):
SELECT id FROM clusters
SQL query failed (25P02 ERROR:  current transaction is aborted, commands ignored until end of transaction block):
SELECT id FROM mobile_devices
SQL query failed (25P02 ERROR:  current transaction is aborted, commands ignored until end of transaction block):
INSERT INTO metadata (var_name,var_value) VALUES ('ValidTDataIndex','1')
Rolling back last stage due to upgrade errors...
Database upgrade failed


I had run nxdbmgr check before starting the upgrade, it fixed some errors. A 2nd run then gave no errors.

Ronald

max

Ok, Solved.

Running nxdbmgr check-data-tables fixed the issue.
Up and running again  :)

Thank you for help!
Ronald