Cannot Delete Nodes

Started by AllstateComputers, March 15, 2018, 09:17:35 PM

Previous topic - Next topic

AllstateComputers

Good Afternoon,

I'm a new user to NetXMS. I'm running version 2.2.4 on Centos 7.4. I'm using a MariaDB Galera cluster for the database because we're setting this up to run in across multiple datacenters. I'm having a problem where I cannot delete a node from NetXMS. Using the desktop management console I've tried right clicking and and left clicking delete on the node, it disappears from the management app and if I close it and reopen it its still not there, however, if I try to re-add the node it says there's an IP conflict. If I stop the netXMS daemon and restart it, the nodes show back up. I tried setting them to unmanaged and trying the same thing with the same result. I tried removing all of the interfaces and then removing the node, same result.

I can add nodes just fine, I can move nodes around to different containers, but I cannot seem to delete them. I am able create and delete dci parameters. I ran the nxdbmgr check also.


[root@nms1 etc]# nxdbmgr check
NetXMS Database Manager Version 2.2.4 Build 9506 (2.2.4) (UNICODE)

Checking database (excluding collected data):
Database is locked by server 10.3.1.1 [nms1.allstatehosting.local Linux Release 3.10.0-693.21.1.el7.x86_64]
Do you wish to force database unlock? (Yes/No) y
Database lock removed
* Checking zone object properties                                      [PASSED]
* Checking node object properties                                      [PASSED]
* Checking node to subnet bindings                                     [PASSED]
* Checking interface object properties                                 [PASSED]
* Checking interface bindings                                          [PASSED]
* Checking network service object properties                           [PASSED]
* Checking network service bindings                                    [PASSED]
* Checking cluster object properties                                   [PASSED]
* Checking cluster member nodes                                        [PASSED]
* Checking template to node mapping                                    [PASSED]
* Checking object properties                                           [PASSED]
* Checking container membership                                        [PASSED]
* Checking event processing policy                                     [PASSED]
* Checking network map links                                           [PASSED]
* Checking data tables                                                 [PASSED]
* Checking raw DCI values table                                        [PASSED]
* Checking DCI thresholds                                              [PASSED]
* Checking table DCI thresholds                                        [PASSED]
Database doesn't contain any errors
Database check completed


Anybody have any thoughts?

Thanks,
Brian

Tursiops

Hi,

I believe that can happen if a device is scheduled for removal, but hasn't actually been removed from the database yet.
In memory, it will be gone (hence you can't see it in the Console), but it is still in the database (causing conflicts when you try to re-add the node).
The syncer thread which runs every minute by default should write updates to the database, but I guess it could be running into problems.

Try setting debug for obj.sync and sync to 7 and watch the NetXMS server logs after you delete the object.
To enable debug open the NetXMS Server Console and enter "debug obj.sync 7" and "debug sync 7".
An example of a deletion gone wrong from our logs:
Object 120.150.216.0/24 [205198] marked for deletion
Unable to delete object with id 205198 because it is being referenced 8 time(s)

In our case the above was removed after about an hour (we run the syncer every 5 minutes), presumably because the references were eventually removed.

Cheers