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. Cluster mode - Database is already locked by another NetXMS server instance

Cluster mode - Database is already locked by another NetXMS server instance

Scheduled Pinned Locked Moved Support
2 Posts 2 Posters 22.0k 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.
  • H
    H
    Hybo
    wrote on last edited by
    #1

    Hi,

    I have a problem with my NetXMS high availability solution. I have two nodes called server1 (172.16.103.16) and server2 (172.16.103.17) with pacemaker, corosync and DRBD. Database engine is PostgreSQL, with database on shared disk.

    When I destroy server1 (such as switching power off ), then the NetXMS on server2 does not start and writes into the log:

    [20-Nov-2012 17:49:16] Log file opened
    [20-Nov-2012 17:49:16] Platform subagent "/opt/NetXMS/lib/libnsm_linux.so" successfully loaded
    [20-Nov-2012 17:49:16] Database driver "/opt/NetXMS/lib/libnxddr_pgsql.so" loaded and initialized successfully
    [20-Nov-2012 17:49:16] Database is already locked by another NetXMS server instance (IP address: 172.16.103.16, machine info: server1 Linux Release 2.6.34.7-0.7-xen)
    

    database contents:

    ServerID                          | 451B2B5D9290AB50                                    |          0 |                   1
    DBLockPID                         | 8375                                                |          0 |                   0
    DBLockInfo                        | server1 Linux Release 2.6.34.7-0.7-xen            |          0 |                   0
    DBLockStatus                      | 172.16.103.16                                       |          0 |                   1
    

    Is there any solution other than "nxdbmgr check" before starting NetXMS on server2? Because this may cause some problem in my HA solution.

    Thanks,
    Hybo

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

      Hi!

      Currently there are no other solution then to run nxdbmgr before starting netxmsd. You can simplify it by adding -e command line argument to netxmsd - then netxmsd will call nxdbmgr on startup. I've created a feature request to address this problem more correctly: https://www.radensolutions.com/chiliproject/issues/185. I will add additional command line argument to specify peer IP address - then if database locked by peer, server will check if it's alive, and if not, will automatically remove the lock.

      Best regards,
      Victor

      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