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. Database upgrade after NetXMS upgrade from version 4.5.6 -> 5.0.2 on windows

Database upgrade after NetXMS upgrade from version 4.5.6 -> 5.0.2 on windows

Scheduled Pinned Locked Moved Support
10 Posts 3 Posters 66.8k 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.
  • M
    M
    maredcz
    wrote on last edited by
    #1

    Hello,
    has somebody similar issue?

    I did direct upgrade from version 4.5.6 to 5.0.2 on windows server.
    Database MariaDB 10.4

    The service does not start
    2024.05.09 12:45:00.438 *I* [startup            ] Starting NetXMS server version 5.0.2 build tag 5.0-878-gccaeca5869
    ..
    2024.05.09 12:45:00.472 *E* [db                ] Your database has format version 50.32, but server is compiled for version 50.39

    When run nxdbmgr upgrade, the database is not upgraded.

    D:\NetXMS\bin>nxdbmgr check
    NetXMS Database Manager Version 5.0.2 Build 5.0-878-gccaeca5869 (UNICODE)

    Checking database (excluding collected data):
    Your database has format version 50.32, this tool is compiled for version 50.39.
    Use "upgrade" command to upgrade your database first.
    Database check aborted

    D:\NetXMS\bin>nxdbmgr upgrade
    NetXMS Database Manager Version 5.0.2 Build 5.0-878-gccaeca5869 (UNICODE)

    Upgrading database...
    Upgrading from version 50.32 to 50.33

    D:\NetXMS\bin>
    D:\NetXMS\bin>nxdbmgr check
    NetXMS Database Manager Version 5.0.2 Build 5.0-878-gccaeca5869 (UNICODE)

    Checking database (excluding collected data):
    Your database has format version 50.32, this tool is compiled for version 50.39.
    Use "upgrade" command to upgrade your database first.
    Database check aborted

    Thank you for any advice.

    Martin

    1 Reply Last reply
    0
    • M
      M
      maredcz
      wrote on last edited by
      #2

      Database log show some processing and is ending with "Prepare UPDATE network_maps SET link_styling_script=?,filter=? WHERE id=?"

      In MariaDB log appear message:
      2024-05-09 13:59:01 9 [Warning] Aborted connection 9 to db: 'netxms_db' user: 'netxms' host: 'localhost' (Got an error reading communication packets)

      #####
          9 Query SELECT item_id,transformation,instd_filter FROM items
          9 Prepare UPDATE items SET transformation=?,instd_filter=? WHERE item_id=?
      ...
          9 Query SELECT threshold_id,script FROM thresholds
          9 Prepare UPDATE thresholds SET script=? WHERE threshold_id=?
      ...
          9 Query SELECT item_id,transformation_script,instd_filter FROM dc_tables
          9 Prepare UPDATE dc_tables SET transformation_script=?,instd_filter=? WHERE item_id=?
      ...   
      9 Query SELECT rule_id,filter_script,action_script FROM event_policy
          9 Prepare UPDATE event_policy SET filter_script=?,action_script=? WHERE rule_id=?
      ...
          9 Query SELECT trap_id,transformation_script FROM snmp_trap_cfg
          9 Prepare UPDATE snmp_trap_cfg SET transformation_script=? WHERE trap_id=?
      ...
          9 Query SELECT script_id,script_code FROM script_library
          9 Prepare UPDATE script_library SET script_code=? WHERE script_id=?
      ...
          9 Query SELECT id,link_styling_script,filter FROM network_maps
          9 Prepare UPDATE network_maps SET link_styling_script=?,filter=? WHERE id=?
      HERE is the end, nothing executed

      Martin

      1 Reply Last reply
      0
      • D
        D
        deepb
        wrote on last edited by
        #3

        I'm facing exactly the same issue. I didn't take database backup so cannot go back to the old schema version either.

        1 Reply Last reply
        0
        • M
          M
          maredcz
          wrote on last edited by
          #4

          .. have backups, have restored the database. Look's nobody else is observing the same issue. Try activate MariaDB logging if you are ending on updating network maps

          .. "Prepare UPDATE network_maps SET link_styling_script=?,filter=? WHERE id=?"

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

            Looks like nxdbmgr crashes during schema update. Could you please provide result of query

            SELECT id,link_styling_script,filter FROM network_maps WHERE link_styling_script <> '' OR filter <> '';

            (maybe you'll need to change condition, I'm not sure it is correct for MariaDB, but idea is to get all records where one of those fields is not empty).

            Best regards,
            Victor

            1 Reply Last reply
            0
            • M
              M
              maredcz
              wrote on last edited by
              #6

              There is not a link_styling_script field (currently running 4.5.6 version(restored from backup)

              There is result of query as .csv attachment
              SELECT id,filter FROM network_maps WHERE filter <> '';


              network_maps.csv

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

                We just fixed bug in database upgrade, we will start packing release 5.0.3 soon.

                Best regards,
                Victor

                1 Reply Last reply
                0
                • M
                  M
                  maredcz
                  wrote on last edited by
                  #8

                  Perfect. Thank You very much.

                  Martin

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

                    Windows server binaries for version 5.0.3 already in archive, we will update web site and publish deb packages during the day.

                    Best regards,
                    Victor

                    1 Reply Last reply
                    0
                    • M
                      M
                      maredcz
                      wrote on last edited by
                      #10

                      Only confirmation. The upgrade was successfull now.
                      Thank you. Martin

                      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