Error initializing component locks table

Started by Yarda, November 08, 2012, 10:41:43 AM

Previous topic - Next topic

Yarda

Hello geeks,

I am completely new to NetXMS... On the other hand, currently responsible for evaluating the product for our possible company future usage. :)

I am trying to get the 1.2.4 work (also tried the 1.2.3); however, even though all compiles smoothly, I always get the following "Error initializing component locks table" when trying to run the server.


$netxmsd -c ../etc/netxmsd.conf -D 9

[08-Nov-2012 09:16:33] Log file opened
[08-Nov-2012 09:16:33] Code page set to ?
[08-Nov-2012 09:16:33] Platform subagent "/data2/NetXMS/binaries/1.2.4/lib/libnsm_linux.so" successfully loaded
[08-Nov-2012 09:16:33] Debug callback set for DB library
[08-Nov-2012 09:16:33] Database driver "/data2/NetXMS/binaries/1.2.4/lib/libnxddr_mysql.so" loaded and initialized successfully
[08-Nov-2012 09:16:33] DBConnect: server=localhost db=netxms login=root schema=
[08-Nov-2012 09:16:33] New DB connection opened: handle=0x625450
[08-Nov-2012 09:16:33] Successfully connected to database netxms@localhost
[08-Nov-2012 09:16:33] Successful sync query: "SELECT var_value FROM metadata WHERE var_name='SchemaVersion'" [162 ms]
[08-Nov-2012 09:16:33] Successful prepare: "SELECT var_value FROM config WHERE var_name=?" [9 ms]
[08-Nov-2012 09:16:33] Successful prepared sync query: "SELECT var_value FROM config WHERE var_name=?" [9 ms]
[08-Nov-2012 09:16:33] Successful prepare: "SELECT var_value FROM config WHERE var_name=?" [0 ms]
[08-Nov-2012 09:16:33] Successful prepared sync query: "SELECT var_value FROM config WHERE var_name=?" [0 ms]
[08-Nov-2012 09:16:33] Successful prepare: "SELECT var_value FROM config WHERE var_name=?" [1 ms]
[08-Nov-2012 09:16:33] Successful prepared sync query: "SELECT var_value FROM config WHERE var_name=?" [0 ms]
[08-Nov-2012 09:16:33] DBConnect: server=localhost db=netxms login=root schema=
[08-Nov-2012 09:16:33] New DB connection opened: handle=0x6295d0
[08-Nov-2012 09:16:33] DBConnect: server=localhost db=netxms login=root schema=
[08-Nov-2012 09:16:33] New DB connection opened: handle=0x629940
[08-Nov-2012 09:16:33] DBConnect: server=localhost db=netxms login=root schema=
[08-Nov-2012 09:16:33] New DB connection opened: handle=0x6267b0
[08-Nov-2012 09:16:33] DBConnect: server=localhost db=netxms login=root schema=
[08-Nov-2012 09:16:33] New DB connection opened: handle=0x627040
[08-Nov-2012 09:16:33] DBConnect: server=localhost db=netxms login=root schema=
[08-Nov-2012 09:16:33] New DB connection opened: handle=0x649180
[08-Nov-2012 09:16:33] Database Connection Pool initialized
[08-Nov-2012 09:16:33] Successful sync query: "SELECT var_value FROM metadata WHERE var_name='Syntax'" [0 ms]
[08-Nov-2012 09:16:33] Successful prepare: "SELECT var_value FROM config WHERE var_name=?" [0 ms]
[08-Nov-2012 09:16:33] Successful prepared sync query: "SELECT var_value FROM config WHERE var_name=?" [0 ms]
[08-Nov-2012 09:16:33] ConfigReadStr: name=ServerID value="17349805A3799A50"
[08-Nov-2012 09:16:33] Successful prepare: "SELECT var_value FROM config WHERE var_name=?" [1 ms]
[08-Nov-2012 09:16:33] Successful prepared sync query: "SELECT var_value FROM config WHERE var_name=?" [0 ms]
[08-Nov-2012 09:16:33] DBLockStatus="ERROR"
[08-Nov-2012 09:16:33] Error initializing component locks table


When cleaning the DB, I get this:


$nxdbmgr -c ../etc/netxmsd.conf check
NetXMS Database Manager Version 1.2.4

Checking database (excluding collected data):
Database is locked by server ? [er]
Do you wish to force database unlock? (Y/N) Y
Database lock removed
Database doesn't contain any errors
Database check completed


The string inside square brackets (Database is locked by server) is falsy, apparently, but did not try to debug it in gdb, at least not yet. There must be something with my environment, but what could that be...? :((

My environment:


$uname -a

Linux my 3.4.9-gentoo #1 SMP PREEMPT Mon Aug 27 14:23:03 CEST 2012 x86_64 Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz GenuineIntel GNU/Linux


Zipped configure.log attached...

It doesn't seem to be related to DB or DB driver. In my multiple attempts I used Postgres 9.2, 9.1 and Mysql 5.1.62 (running locally on my workstation but also remotely on different Linux distributions.) In all cases the same "lock" problem appeared consistently.

When the above reported failure happens, I can take a look at the DB and see an entry in config table - I am not sure if that tells me much, but is still something whispering me the problem is not about databases...


mysql> select * from config;
+----------+------------------+------------+---------------------+
| var_name | var_value        | is_visible | need_server_restart |
+----------+------------------+------------+---------------------+
| ServerID | 17349805A3799A50 |          1 |                   0 |
+----------+------------------+------------+---------------------+
1 row in set (0.00 sec)


All compiled with gcc-4.5.4 / going to experiment with 4.6.3 now... (It is not a stable version for Gentoo, but I'll give it a try anyhow...)

Thank you for your insight and advices.

Cheers,
Yarda.

Yarda

gcc 4.6.3 did not help here.


gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.3/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-lto --enable-nls --without-included-gettext --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/python --enable-checking=release --disable-libgcj --disable-libquadmath --enable-languages=c,c++,objc --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.6.3 p1.7, pie-0.5.2'
Thread model: posix
gcc version 4.6.3 (Gentoo 4.6.3 p1.7, pie-0.5.2)

Victor Kirhenshtein

Hi!

Try to compile without UNICODE support.

Best regards,
Victor

Yarda

I did at the beginning, then I thought UNICODE might be the clue but it did not help either.

Victor Kirhenshtein

Quite strange. Can you please send me full content of config and metadata tables?

Best regards,
Victor

Yarda

Issue resolved:

there is a great diffirence if you run:


nxdbmgr -c ../etc/netxmsd.conf init ../share/netxms/sql/dbschema_pgsql.sql


or


nxdbmgr -c ../etc/netxmsd.conf init ../share/netxms/sql/dbinit_mysql.sql


...prior running the server.

(blush)