Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Error initializing component locks table

Error initializing component locks table

Scheduled Pinned Locked Moved Support
6 Posts 2 Posters 46.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y
    Y
    Yarda
    wrote on last edited by
    #1

    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.


    config.log.tar.gz

    1 Reply Last reply
    0
    • Y
      Y
      Yarda
      wrote on last edited by
      #2

      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)
      
      1 Reply Last reply
      0
      • V
        V
        Victor Kirhenshtein
        wrote on last edited by
        #3

        Hi!

        Try to compile without UNICODE support.

        Best regards,
        Victor

        1 Reply Last reply
        0
        • Y
          Y
          Yarda
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          • V
            V
            Victor Kirhenshtein
            wrote on last edited by
            #5

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

            Best regards,
            Victor

            1 Reply Last reply
            0
            • Y
              Y
              Yarda
              wrote on last edited by
              #6

              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)

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              Powered by NodeBB Contributors
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups