Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: [RESOLVED] Discovery nmap&vsphere Error On Run

  1. #1
    Member
    Join Date
    Feb 2012
    Location
    Slovenia
    Posts
    65

    [RESOLVED] Discovery nmap&vsphere Error On Run

    Hi.
    On my discovery run everything goes well, if I scan a few hosts.
    But if I want to discover all 192.168.0.0/24, i get error on run.
    After some debbuging with pdb (I am not a programmer, but I am starting to get familiar with this pdb tool) I stumbled upon this:

    Code:
    -> def get_runners_outputs(self):
    (Pdb) next
    > /usr/local/lib/python2.6/dist-packages/shinken/discovery/discoverymanager.py(226)get_runners_outputs()
    -> for r in self.allowed_runners():
    (Pdb) next
    > /usr/local/lib/python2.6/dist-packages/shinken/discovery/discoverymanager.py(227)get_runners_outputs()
    -> if r.is_finished():
    (Pdb) next
    > /usr/local/lib/python2.6/dist-packages/shinken/discovery/discoverymanager.py(228)get_runners_outputs()
    -> print r.discoveryrun_name, r.current_launch
    (Pdb) next
    nmap Check 0 status:timeout command:/usr/lib/nagios/plugins/nmap_discovery_runner.py -t 192.168.0.1-254
    > /usr/local/lib/python2.6/dist-packages/shinken/discovery/discoverymanager.py(229)get_runners_outputs()
    -> if r.current_launch.exit_status != 0:
    (Pdb) p r.discoveryrun_name
    u'nmap'
    (Pdb) p r.current_launch
    <shinken.eventhandler.EventHandler object at 0x9d2c36c>
    (Pdb) p r.current_launch.exit_status
    3
    (Pdb) next
    > /usr/local/lib/python2.6/dist-packages/shinken/discovery/discoverymanager.py(230)get_runners_outputs()
    -> print "Error on run"
    (Pdb) 
    Error on run
    > /usr/local/lib/python2.6/dist-packages/shinken/discovery/discoverymanager.py(226)get_runners_outputs()
    -> for r in self.allowed_runners():
    Why isn't this working.. if i only run nmap_discovery_runner.py -t 192.168.0.1-254, everything goes well.
    For some reason result is not getting imported in shinken.

  2. #2
    Member
    Join Date
    Feb 2012
    Location
    Slovenia
    Posts
    65

    Re: Discovery nmap&vsphere Error On Run

    Also if i specify IP range like this: 192.168.0.1-100, or 192.168.0.100-254, it works, hosts are discovered and imported into Shinken.
    I suspected until this test, that discovery stumbled upon some IP, on which he couldn't get some info or the info was weird...
    But now it seems like there is some overflow or something somwhere..
    Is there any detailed log?
    I am using latest Shinken from Github (1.0.RC1).

  3. #3
    Member
    Join Date
    Feb 2012
    Location
    Slovenia
    Posts
    65

    Re: Discovery nmap&vsphere Error On Run

    And it doesn't make a difference if I change the discovery time to 300 seconds, or 30000 seconds

  4. #4
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: Discovery nmap&vsphere Error On Run

    I think it's a size problem in the get_outputs. It take with pipes the stdout/strerr from the command, and I think there is a limit in what the buffer can accept. I'll try to reproduce it with a large output, and find a fix
    No direct support by personal message. Please open a thread so everyone can see the solution

  5. #5
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: Discovery nmap&vsphere Error On Run

    Hi,

    I find a fix for it (was not easy ) and it's in the devel branch. So it will be release with the near 1.0.1 version
    No direct support by personal message. Please open a thread so everyone can see the solution

  6. #6
    Member
    Join Date
    Feb 2012
    Location
    Slovenia
    Posts
    65

    Re: Discovery nmap&vsphere Error On Run

    Great, thanks.
    Bye

  7. #7
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: Discovery nmap&vsphere Error On Run

    Let me know if it's ok so I can putthis tread as resolved
    No direct support by personal message. Please open a thread so everyone can see the solution

  8. #8
    Member
    Join Date
    Feb 2012
    Location
    Slovenia
    Posts
    65

    Re: Discovery nmap&vsphere Error On Run

    Hm..
    Where do I find patch? or do I just download from github and install over existing installation?
    Do you have a link or something?

  9. #9
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: Discovery nmap&vsphere Error On Run

    You can download the current devel version at https://github.com/naparuba/shinken/commits/master and reinstall over your installation.

    Of course backup your configurations files before
    No direct support by personal message. Please open a thread so everyone can see the solution

  10. #10
    Member
    Join Date
    Feb 2012
    Location
    Slovenia
    Posts
    65

    Re: Discovery nmap&vsphere Error On Run

    Well, it seems to be working now, but not yet completely
    If I specify range in something like 172.20.0.0/16 (we have about 300 PC-s, and about 200 other stuff with IP address ), it still errors out. But maby this is caused by 3600 seconds time limit?

    I will try to increase time limit.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •