Skip navigation
6602 Views 6 Replies Latest reply: Jan 24, 2012 2:41 AM by alexandrud RSS
chrisv Rank: White Belt 38 posts since
Apr 4, 2007
Currently Being Moderated

Oct 13, 2010 12:07 PM

Debugging ZenWin

I'm getting ZenWin errors on a handful of my windows server (2008 R2) related to the query of Windows service status. Running:

zenwin run -v10 -d windowsmachine.domain.com

returns the following error (abbriviated for clarity):

2010-10-13 08:45:02,408 ERROR zen.zenwin: Unable to scan device windowsmachine.domain.com: 'NoneType' object has no attribute 'lower'
2010-10-13 08:45:02,409 DEBUG zen.zenwin: Queueing event {'severity': 4, 'component': 'zenwin', 'agent': 'zenwin', 'summary': "\n            Could not read Windows services ('NoneType' object has no attribute 'lower'). Check your\n            username/password settings and verify network connectivity.\n            ", 'manager': 'zenosshost.domain.com', 'device': 'windowsmachine.domain.com', 'eventClass': '/Status/Wmi', 'monitor': 'localhost'}

 

I'm not sure why a NoneType object is being returned but I'd like to debug it further. Unfortunately I'm also not sure where the code is getting hung up. Does anyone know where the WMIC_PROCESS takes place?

 

ChrisV

  • cgibbons Rank: White Belt 60 posts since
    Apr 9, 2008
    Currently Being Moderated
    2. Oct 15, 2010 10:43 AM (in response to chrisv)
    Re: Debugging ZenWin

    Chris,

     

    I haven't been able to reproduce this on one of our local Windows 2008 R2 servers. There's probably either a software component enabled on your server that I don't have, or some differences in the code, such as a ZenPack, that I don't have installed locally.

     

    What ZenPacks do you have installed?

     

    Can you run the following WMI queries with wmic and make sure they work OK, too?

     

    wmic -U 'yourdomain\youruser' //yourhost 'select name,CSDVersion,version from win32_operatingsystem'

     

    wmic -U 'yourdomain\youruser' //yourhost 'select * from win32_service'

  • fdeckert Rank: Green Belt 110 posts since
    Jul 2, 2008
    Currently Being Moderated
    5. Dec 29, 2011 5:17 AM (in response to chrisv)
    Re: Debugging ZenWin

    Hi guys

     

    Had the same issue here and digged a bit down.

    finally found that that some services were send back as (null)

    --

    Just found the ticket in track

    http://dev.zenoss.org/trac/ticket/7428

    --

    After patching Products/ZenWin/zenwin.py to detect this, it works.

        def _handleResult(self, name, state):

             """

             Handle a result from the wmi query. Results from both the initial WMI

             client query and the watcher's notification query are processed by

            this method. Log running and stopped transitions. Send an event if the

             service is monitored.

            """        

         if state is None:            

              state="unknown"       

         state = state.lower()

    --

    ./wmic --debug-stderr //wbarcdc02.barc.es.sopra "SELECT Name, State FROM Win32_Service"

      sppsvc|Stopped
      vds|Running
      TermService|(null)

    --


  • alexandrud Newbie 2 posts since
    Aug 24, 2010
    Currently Being Moderated
    6. Jan 24, 2012 2:41 AM (in response to fdeckert)
    Re: Debugging ZenWin

    Had the same exact problem on a 3.2.1 installation. The above fix worked. In addition to those 2 code lines in the file I also issued a zenwin restart.

More Like This

  • Retrieving data ...

Legend

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