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. netxmsd dies when trying to setup and delete users and groups

netxmsd dies when trying to setup and delete users and groups

Scheduled Pinned Locked Moved Support
8 Posts 2 Posters 57.5k 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.
  • D
    D
    Dan
    wrote on last edited by
    #1

    Hi,
    Im running 0.2.30 under ubuntu intrepid.
    Netxms where running fine during configuration until I tried to configure new users and groups, like adding new access, removing access, adding users to groups, as well as deleting some of them.
    This happens when running it both as a daemon and in the foreground,

    netxmsd  -c /etc/netxms/netxmsd.conf
    Using configuration file "/etc/netxms/netxmsd.conf"
    Configuration file OK
    [14-Oct-2009 17:06:05] Platform subagent "/usr/lib/libnsm_linux.so" successfully loaded
    [14-Oct-2009 17:06:05] Database driver "/usr/local/lib/libnxddr_pgsql.so" loaded and initialized successfully
    [14-Oct-2009 17:06:05] Stalled database lock removed
    [14-Oct-2009 17:06:05] Listening for SNMP traps on UDP socket 0.0.0.0:162
    [14-Oct-2009 17:06:05] Listening for client connections on TCP socket 0.0.0.0:4701
    [14-Oct-2009 17:06:05] NetXMS Server started

    NetXMS Server V0.2.30 Ready
    Enter "help" for command list or "down" for server shutdown
    System Console

    netxmsd: Segmentation fault

    When I restart netxms and connect again, the deleted and altered groups/users are still there.

    I am able to add nodes and change other things without any hazard.

    I am running it with PostgreSQL 8.3.8

    I have attached an strace of a crash.

    Anyone got an idea what could be wrong?


    strace-1.tar.gz

    strace-1.tar.gz

    1 Reply Last reply
    0
    • D
      D
      Dan
      wrote on last edited by
      #2

      Checked the eventlog and noticed the following entry when trying to remove one of the groups:

      "Database query failed [Query: DELETE FROM groups WHERE id =-2147483643; Error: ERROR: relation "groups" does not exist]

      Which is correct as there is no such table.

      It seems like that error causes netxmsd to crash.

      Located in src/server/core/userdb_objects.cpp on row 651,
      _sntprintf(query, 256, _T("DELETE FROM groups WHERE id=%d"), m_id);

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

        Hi!

        Yes, it's a bug - there should be

        DELETE FROM user_groups WHERE id=%d

        However, failed SQL query should not cause server to crash anyway. Could you try to replace groups to user_groups in this query, recompile server and try delete group again?

        Best regards,
        Victor

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

          Just tested on my Ubuntu machine with PostgreSQL - I got failed SQL query, but no crash. Could you please run netxmsd under gdb and when it crashes get stack trace with bt command?

          To run under gdb:

          # gdb netxmsd
          (gdb) run

          when crashes
          (gdb) bt

          Best regards,
          Victor

          1 Reply Last reply
          0
          • D
            D
            Dan
            wrote on last edited by
            #5

            Will do,

            I have recompiled the server though and it seems like I am able to remove groups without any problem.
            But I will run it in gdb and send a trace.

            Best regards,
            Dan

            1 Reply Last reply
            0
            • D
              D
              Dan
              wrote on last edited by
              #6

              Here it is, this time when I created a few groups,

              Program received signal SIGSEGV, Segmentation fault.
              [Switching to Thread 0x42807950 (LWP 29468)]
              0x00007f91007b0055 in free () from /lib/libc.so.6
              (gdb) bt
              #0  0x00007f91007b0055 in free () from /lib/libc.so.6
              #1  0x00007f91020ff143 in ~Group (this=0x186c000) at userdb_objects.cpp:561
              #2  0x00007f91020fd64a in SaveUsers (hdb=0x7f90f001b510) at userdb.cpp:136
              #3  0x00007f91020f897d in Syncer (arg=<value optimized out>) at syncer.cpp:116
              #4  0x00007f9101e5c3ea in start_thread () from /lib/libpthread.so.0
              #5  0x00007f910081acbd in clone () from /lib/libc.so.6
              #6  0x0000000000000000 in ?? ()
              (gdb)

              Best regards,
              Dan

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

                I was able to reproduce this problem on my machine. Please replace file src/server/core/userdb_objects.cpp and recompile server - problem should be fixed.

                Best regards,
                Victor


                userdb_objects.cpp

                1 Reply Last reply
                0
                • D
                  D
                  Dan
                  wrote on last edited by
                  #8

                  Ah nice.
                  Thanks for the very fast help and answers!

                  Best regards,
                  Dan

                  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