Inconsistent database due to deleted objects

Started by adimitrov, November 14, 2016, 02:44:43 PM

Previous topic - Next topic

adimitrov

Hello Team ,

I am observing the following issue. Starting the netxmsd in the logs i can see a lot of these massages:

[14-Nov-2016 14:14:08.701] [ERROR] Inconsistent database: interface 6321 linked to non-existing node 6302
[14-Nov-2016 14:14:08.702] [ERROR] Failed to load interface object with id 6321 from database
[14-Nov-2016 14:14:08.703] [ERROR] Inconsistent database: interface 6382 linked to non-existing node 6372
[14-Nov-2016 14:14:08.704] [ERROR] Failed to load interface object with id 6382 from database
[14-Nov-2016 14:14:08.706] [ERROR] Inconsistent database: interface 6384 linked to non-existing node 6375
[14-Nov-2016 14:14:08.707] [ERROR] Failed to load interface object with id 6384 from database

[13-Nov-2016 09:21:09.508] [ERROR] Inconsistent database: container object 3602 has reference to non-existing child object 6294
[13-Nov-2016 09:21:09.508] [ERROR] Inconsistent database: container object 3602 has reference to non-existing child object 6295
[13-Nov-2016 09:21:09.508] [ERROR] Inconsistent database: container object 3602 has reference to non-existing child object 6302
[13-Nov-2016 09:21:09.508] [ERROR] Inconsistent database: container object 3602 has reference to non-existing child object 6372


Checked this and these are already deleted nodes, but obviously netxms is still trying to monitor the interfaces and some other object related to the already deleted nodes.
I ran the following:

service netxmsd stop
mysqlcheck --auto-repair netxms -u root –p (just in case)
nxdbmgr check (this fixed some inconsistencies)
service netxmsd start

Unfortunately i am still seeing the same errors. I ran nxdbmgr couple more times, but with no success. I checked and these are for real deleted nodes, so i am looking for a way to clear up the database from unneeded objects (related with deleted nodes).

I am using NetXMS server version 2.0.6 on debian host.

Another question is if there is a good practice to delete nodes/conteiners so they don't leave unparented child objects.

Best Regards,
Adrian

Victor Kirhenshtein

Hi,

server supposed to handle deletion correctly and do not leave unparented objects. This is a known bug and it will be fixed eventually. There is also a registered issue for improving database check (https://dev.raden.solutions/issues/1335) - will be fixed during 2.1 development. You can leave it as is for now - references to non-existent objects are not read from database so the only consequence are errors being reported on server startup.

Best regards,
Victor