TECHZEN Zenoss User Community ARCHIVE  

Unable to delete devices

Subject: Unable to delete devices
Author: J K
Posted: 2020-03-16 08:25

Hi,

I've been using ZenOSS for ages but the newer versions sometimes leave me dumbfounded as the services seem to be too well hidden.

Here's another one to add to that list - we had an issue with one of the devices just throwing out what looks like an error that is being replayed incorrectly. However when I tried to delete the device, I got hit by a stuck ZenOSS UI - left it for an hour and came back to find the deleting bar gone and the device still there. So I went into Zope and tried to delete but got this. How do I clear this out?

Regards,
JK

Type: <class 'zExceptions.BadRequest'>
Value: x.x.x.x does not exist

Traceback (most recent call last):
File "/opt/zenoss/lib/python2.7/site-packages/ZPublisher/Publish.py", line 126, in publish
request, bind=1)
File "/opt/zenoss/lib/python2.7/site-packages/ZPublisher/mapply.py", line 77, in mapply
if debug is not None: return debug(object,args,context)
File "/opt/zenoss/lib/python2.7/site-packages/ZPublisher/Publish.py", line 46, in call_object
result=apply(object,args) # Type s<cr> to step into published object.
File "/opt/zenoss/lib/python2.7/site-packages/OFS/ObjectManager.py", line 533, in manage_delObjects
raise BadRequest, '%s does not exist' % escape(ids[-1])
BadRequest: x.x.x.x does not exist


------------------------------
JK
------------------------------


Subject: RE: Unable to delete devices
Author: Jane Curry
Posted: 2020-03-17 15:09

I guess you are now in that unenviable position where the device is half-in and half-out :( 

Have a look at this wiki item that I wrote - http://wiki.zenoss.org/RemoveDevices  .  It was written with Zenoss 4 in mind so if you need to do zendmd hacks then you will need to attach to the zope container.

If you are lucky, the toolbox tools will fix it without needing the zendmd hacks - but one is not always lucky ;)

Cheers,
Jane

------------------------------
Jane Curry
Skills 1st United Kingdom
jane.curry@skills-1st.co.uk
------------------------------


Subject: RE: Unable to delete devices
Author: Larry
Posted: 2020-03-18 17:44

Thanks Jane!

------------------------------
Larry
------------------------------

Subject: RE: Unable to delete devices
Author: J K
Posted: 2020-03-31 06:21

I wasn't sure if I was looking at the document correctly but thanks for pointing me in the right direction.

That was in fact half in, half out and it was a world of hurt especially now that I'm leaning in on the platform. Good news is I did manage to resuscitate it and in case it helps someone else:

Login to the ZenOSS server and drop to a shell.
Attach Zope and become ZenOSS user
serviced service attach zope
su zenoss


Once in, run these and look carefully to see what errors out:

For the one with error, run it with the -f flag.

In my case, I did actually run this and even though the issue was fixed, it would not resume. Reloaded the entire server and was back in business.

I have to ask, would it make sense to run the following:
  1. zencheckdbstats
  2. zenindextool
  3. zennetworkclean


------------------------------
J K
------------------------------


< Previous
Getting "network error" for most Windows Devices
  Next
Zope RoleManager Auth Redirect
>