Archived community.zenoss.org | full text search
Skip navigation
1 2 Previous Next 22637 Views 16 Replies Latest reply: May 9, 2011 1:29 PM by guyverix RSS
Kristopher424 Rank: White Belt 15 posts since
Dec 4, 2009
Currently Being Moderated

May 18, 2010 6:13 PM

dmd Error has occurred.

All,


I'm getting the below error when attempting to view the "OS" tab of only a few devices.  Any input would be greatly appreciated.  Ubuntu 8.04 LTS [Linux (x86_64) 2.6.24 (Linux wczenoss 2.6.24-26-server #1 SMP Tue Dec 1  18:26:43 UTC 2009 x86_64)] (I believe) with Zenoss 2.5.2.

 

Type: AttributeError
Value: 'NoneType' object has no attribute 'primaryAq'

Traceback (innermost last):

  • Module ZPublisher.Publish, line 119, in publish
  • Module ZPublisher.mapply, line 88, in mapply
  • Module ZPublisher.Publish, line 42, in call_object
  • Module Shared.DC.Scripts.Bindings, line 313, in __call__
  • Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  • Module Products.CMFCore.FSPageTemplate, line 216, in _exec
  • Module Products.CMFCore.FSPageTemplate, line 155, in pt_render
  • Module Products.PageTemplates.PageTemplate, line 98, in pt_render
  • Module zope.pagetemplate.pagetemplate, line 115, in pt_render
  • Module zope.tal.talinterpreter, line 271, in __call__
  • Module zope.tal.talinterpreter, line 346, in interpret
  • Module zope.tal.talinterpreter, line 891, in do_useMacro
  • Module zope.tal.talinterpreter, line 346, in interpret
  • Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  • Module zope.tal.talinterpreter, line 521, in do_optTag
  • Module zope.tal.talinterpreter, line 516, in no_tag
  • Module zope.tal.talinterpreter, line 346, in interpret
  • Module zope.tal.talinterpreter, line 891, in do_useMacro
  • Module zope.tal.talinterpreter, line 346, in interpret
  • Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  • Module zope.tal.talinterpreter, line 521, in do_optTag
  • Module zope.tal.talinterpreter, line 516, in no_tag
  • Module zope.tal.talinterpreter, line 346, in interpret
  • Module zope.tal.talinterpreter, line 949, in do_defineSlot
  • Module zope.tal.talinterpreter, line 346, in interpret
  • Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  • Module zope.tal.talinterpreter, line 521, in do_optTag
  • Module zope.tal.talinterpreter, line 516, in no_tag
  • Module zope.tal.talinterpreter, line 346, in interpret
  • Module zope.tal.talinterpreter, line 949, in do_defineSlot
  • Module zope.tal.talinterpreter, line 346, in interpret
  • Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  • Module zope.tal.talinterpreter, line 521, in do_optTag
  • Module zope.tal.talinterpreter, line 516, in no_tag
  • Module zope.tal.talinterpreter, line 346, in interpret
  • Module zope.tal.talinterpreter, line 861, in do_defineMacro
  • Module zope.tal.talinterpreter, line 346, in interpret
  • Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  • Module zope.tal.talinterpreter, line 521, in do_optTag
  • Module zope.tal.talinterpreter, line 516, in no_tag
  • Module zope.tal.talinterpreter, line 346, in interpret
  • Module zope.tal.talinterpreter, line 891, in do_useMacro
  • Module zope.tal.talinterpreter, line 346, in interpret
  • Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  • Module zope.tal.talinterpreter, line 521, in do_optTag
  • Module zope.tal.talinterpreter, line 516, in no_tag
  • Module zope.tal.talinterpreter, line 346, in interpret
  • Module zope.tal.talinterpreter, line 949, in do_defineSlot
  • Module zope.tal.talinterpreter, line 346, in interpret
  • Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  • Module zope.tal.talinterpreter, line 521, in do_optTag
  • Module zope.tal.talinterpreter, line 516, in no_tag
  • Module zope.tal.talinterpreter, line 346, in interpret
  • Module zope.tal.talinterpreter, line 824, in do_loop_tal
  • Module zope.tal.talinterpreter, line 346, in interpret
  • Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  • Module zope.tal.talinterpreter, line 521, in do_optTag
  • Module zope.tal.talinterpreter, line 516, in no_tag
  • Module zope.tal.talinterpreter, line 346, in interpret
  • Module zope.tal.talinterpreter, line 745, in  do_insertStructure_tal
  • Module Products.PageTemplates.Expressions, line 199, in  evaluateStructure
  • Module zope.tales.tales, line 696, in evaluate
    URL:  file:/usr/local/zenoss/zenoss/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt
    Line 107, Column 6
    Expression: <PythonExpr intf.getNetworkLinks()>
    Names:
    {'container': <ZentinelPortal at /zport>,
    'context': <Device at /zport/dmd/Devices/Vecima/Subscriber Stations/RAD_15/devices/Kingman Heart Center>,
    'default': <object object at 0x7f4f9fe0b230>,
    'here': <Device at /zport/dmd/Devices/Vecima/Subscriber Stations/RAD_15/devices/Kingman Heart Center>,
    'loop': {u'intf': <Products.PageTemplates.Expressions.PathIterator object at 0x4438590>},
    'nothing': None,
    'options': {'args': ()},
    'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x3cd3680>,
    'request': <HTTPRequest, URL=http://192.168.0.5:8080/zport/dmd/Devices/Vecima/Subscriber%20Stations/RAD_15/devices/Kingman%20Heart%20Center/deviceOsDetail>,
    'root': <Application at >,
    'template': <FSPageTemplate at /zport/deviceOsDetail used for /zport/dmd/Devices/Vecima/Subscriber Stations/RAD_15/devices/Kingman Heart Center>,
    'traverse_subpath': [],
    'user': <PropertiedUser 'wecom'>}
  • Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
    __traceback_info__: intf.getNetworkLinks()
  • Module PythonExpr, line 1, in <expression>
  • Module Products.ZenModel.IpInterface, line 419, in getNetworkLinks
  • Module Products.ZenModel.ZenModelBase, line 296, in  checkRemotePerm
AttributeError: 'NoneType' object has no attribute 'primaryAq'

 

Thanks,

 

Kristopher

  • phonegi Rank: Brown Belt 446 posts since
    Apr 15, 2009
    Currently Being Moderated
    1. May 19, 2010 9:23 AM (in response to Kristopher424)
    Re: dmd Error has occurred.

    Have you tried a reindex() and commit() from zendmd?

  • chitambira Rank: Brown Belt 711 posts since
    Oct 15, 2008
    Currently Being Moderated
    3. May 21, 2010 4:20 AM (in response to Kristopher424)
    Re: dmd Error has occurred.

    You might be having a zenpack that is messing things up. (probably having an unfulfilled dependency)

  • guyverix ZenossMaster 846 posts since
    Jul 10, 2007
    Currently Being Moderated
    5. May 23, 2010 1:18 PM (in response to Kristopher424)
    Re: dmd Error has occurred.

    Can you login as the admin userid, and see if it still happens?

  • guyverix ZenossMaster 846 posts since
    Jul 10, 2007
    Currently Being Moderated
    7. May 23, 2010 4:26 PM (in response to Kristopher424)
    Re: dmd Error has occurred.

    I know you have tried to delete and re-model the device, but I suspect you did it in the normal fashion.  I am guessing that you put it into the same device class as it was before, or attempted to add the device from the drop down..

     

    Here is a possible fix, since it seems to be wedged in the database.

     

    1 delete the device

    2 make a new sub-class in the class you want the device in (you can delete it safely later on)

    3 go into the zenoss.domain.com:8080/manage portion of zenoss, and pack your database. (this will remove the old stuff)

    4 Now go into the new sub-class you have created and add the device via the dropdown menu.

    5 Rename the device to ANYTHING other than what it was named before.

    6 If RRD data is now being generated, and the OS tab is working correctly, move the device back into the proper class.

    7 Remodel the device to pick up any odd template changes that the device might not have gotten.

    8 Delete the testing subclass that you created.

     

    Dont know if this will do the trick for you, but when I make a mistake and move a device class that has devices in it, this is one of the ways I fix the problem, since that really breaks installations.

  • guyverix ZenossMaster 846 posts since
    Jul 10, 2007
    Currently Being Moderated
    9. May 23, 2010 6:21 PM (in response to Kristopher424)
    Re: dmd Error has occurred.

    Hmm.  Can you change it to a ping only device, and remodel it?  Make it basically as dumbed down as possible to see if that will clear out whatever is stuck in there..

  • guyverix ZenossMaster 846 posts since
    Jul 10, 2007
    Currently Being Moderated
    11. May 25, 2010 9:07 AM (in response to Kristopher424)
    Re: dmd Error has occurred.

    Kristopher424 wrote:

     

    I might not have changed this correctly, I went into zProperties and changed SNMPMonitorIgnore to True then remodeled and packed the database.  Still getting the dmd error.

    Nope, thats exactly what I was asking for you to do..  Is there any chance that you may have moved the class that this device resides in?  I am kind of at a loss as to what is causing your problems now..

  • chitambira Rank: Brown Belt 711 posts since
    Oct 15, 2008
    Currently Being Moderated
    13. Jun 22, 2010 11:00 AM (in response to Kristopher424)
    Re: dmd Error has occurred.

    lets get to the bottom of this:

    lets see whats in dmd:

     

     

    >>> for d in dmd.Devices.getSubDevices():
    ...   if d.id.startswith('your_problematic_device'):
    ...      for int in d.os.interfaces():
    ...           print int.getNetworkLinks()
    ...

     

    If you get the error, then we would need to find out the network thats missing. (solution could simply be to re-add the network in 'networks')

     

    >>> for d in dmd.Devices.getSubDevices():

    ...        for int in d.os.interfaces():
    ...            try:

    ...                  ntwks = int.getNetworkLinks()

    ...            except Exception:
    ...                  print d, int
    ...

  • phonegi Rank: Brown Belt 446 posts since
    Apr 15, 2009
    Currently Being Moderated
    14. Jun 22, 2010 9:34 AM (in response to chitambira)
    Re: dmd Error has occurred.

    chitambira,

     

    Just a helpful tidbit FYI: you can change the above code:

     

    >>> for d in dmd.Devices.getSubDevices():
    ...   if  d.id.startswith('your_problematic_device'):

    ...      for int  in d.os.interfaces():
    ...           print int.getNetworkLinks()
    ...

     

    to:

     

    >>> d = find('your_problematic_device')
    ... for int  in d.os.interfaces():
    ...   print int.getNetworkLinks()
    ...

     

    No functional change, but find is a lot easier if you're doing a lot of zendmd work. Good code suggestions BTW.

1 2 Previous Next

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points