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. nxdbmgr - Question and Failure Mode

nxdbmgr - Question and Failure Mode

Scheduled Pinned Locked Moved Support
3 Posts 3 Posters 7.1k 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.
  • Z
    Z
    zshnet
    wrote on last edited by
    #1

    Hi all,

    We had a very bad crash on our system, and luckily we could recover the database files.

    I replaced the files in /var/lib/postgresql/version/main with all the old database files,  I could view the files in the database, and I could run the nxdbmgr check without any errors.

    However, when I ran Netxms, it just sat, pouring out tons of select queries. I could not log in, receiving a "connection refused."

    After a lot of troubleshooting, I discovered my error was similar to this:

    ERROR: could not access status of transaction 4244329
    DETAIL: could not open file "/var/lib/postgresql/9.3/main/pg_clog/0004"

    I needed to fill the file with zeroes so that postgresql would decide that row was full of zeroes and continue on. Once I had solved all of those errors (I tried to pg_dump a specific table and it told me the files to fix) I was able to run NetXMS without issue.

    Is there any way for nxdbmgr to find that sort of error? I don't know much about databases, but I figured it might help to have this error be visible.

    Finally, I'm curious what the nxdbmgr means when it says a database is "Locked by the server." I could not find an answer through Googling, though it wasn't the most thorough search. Any suggestions?

    Thanks,
    Zach

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

      Hi,

      nxdbmgr can detect some logical errors in database (mostly inconsistent or missing data), but it does not check that every table can be read for example. What you have seems to be badly corrupted database files - this is beyond the scope of nxdbmgr checks.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • Z
        Z
        Tatjana Dubrovica
        wrote on last edited by
        #3

        "Locked by the server." means that there is mark that database is locked in NetXMS database in config table. This can be in two situations - if server was stopped incorrectly or if NetXMS server is currently running. This flag is used to prevent change of the database while server is running (this action can be unsafe).

        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