Results 1 to 5 of 5

Thread: Nmap ends up with IO Error

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Posts
    5

    Nmap ends up with IO Error

    Hello i got Shinken freshly installed on a debian;

    i used nicolargo's script and followed your 10 minutes tutorial;

    unfortunatly the discovery tool end's up with this IO error :
    IOError: [Errno 2] No such file or directory: '/etc/shinken/discovery/Shinken/Shinken.cfg'

    kind of strange that this cfg doesn't exists;

    any help ? ;D


    Code:
    I'm launching nmap
    {'id': 0}
    Got Raw disco data Got our target ['192.168.1.1-254', 'localhost']
    propose a tmppath /tmp/tmpXcnId3
    Launching command, sudo nmap 192.168.1.1-254 localhost -T4 -O --traceroute -oX /tmp/tmpXcnId3
    Try to communicate
    Got it ('\nStarting Nmap 5.00 ( http://nmap.org ) at 2011-08-29 15:13 UTC\nInteresting ports on Shinken.DCFORDATA.LOCAL (192.168.1.113):\nNot shown: 996 closed ports\nPORT   STATE SERVICE\n22/tcp  open ssh\n111/tcp  open rpcbind\n3000/tcp open ppp\n50000/tcp open iiimsf\nDevice type: general purpose\nRunning: Linux 2.6.X\nOS details: Linux 2.6.19 - 2.6.24\nNetwork Distance: 0 hops\n\nAll 1000 scanned ports on localhost.localdomain (127.0.0.1) are filtered\nToo many fingerprints match this host to give specific OS details\nNetwork Distance: 0 hops\n\nOS detection performed. Please report any incorrect results at http://nmap.org/submit/ .\nNmap done: 255 IP addresses (2 hosts up) scanned in 110.86 seconds\n', '')
    Can be ('Linux', '2.6.X', '100')
    Try to match ('Linux', '2.6.X')
    Shinken.DCFORDATA.LOCAL::isup=1
    Shinken.DCFORDATA.LOCAL::os=linux
    Shinken.DCFORDATA.LOCAL::osversion=2.6.X
    Shinken.DCFORDATA.LOCAL::macvendor=
    Shinken.DCFORDATA.LOCAL::openports=22,111,3000,50000
    Shinken.DCFORDATA.LOCAL::fqdn=Shinken.DCFORDATA.LOCAL
    Shinken.DCFORDATA.LOCAL::ip=192.168.1.113
    localhost.localdomain::isup=1
    localhost.localdomain::os=Unknown OS
    localhost.localdomain::osversion=Unknown Version
    localhost.localdomain::macvendor=
    localhost.localdomain::fqdn=localhost.localdomain
    localhost.localdomain::ip=127.0.0.1
    
    --> Shinken isup 1
    --> Shinken os linux
    --> Shinken osversion 2.6.X
    --> Shinken macvendor
    --> Shinken openports 22,111,3000,50000
    --> Shinken fqdn Shinken.DCFORDATA.LOCAL
    --> Shinken ip 192.168.1.113
    --> localhost isup 1
    --> localhost os Unknown OS
    --> localhost osversion Unknown Version
    --> localhost macvendor
    --> localhost fqdn localhost.localdomain
    --> localhost ip 127.0.0.1
    Generating Shinken {u'use': u'generic-host'}
    Generating Shinken {u'service_description': u'Ssh', u'use': u'generic-service', u'check_command': u'check_ssh'}
    Generating localhost {u'use': u'generic-host'}
    Writing Shinken configuration
    Will generate {u'use': u'generic-host', 'host_name': 'Shinken'}
    Want to create host path /etc/shinken/discovery/Shinken
    Traceback (most recent call last):
     File "/usr/bin/shinken-discovery", line 699, in <module>
      d.write_config()
     File "/usr/bin/shinken-discovery", line 562, in write_config
      self.write_host_config(name)
     File "/usr/bin/shinken-discovery", line 584, in write_host_config
      self.write_host_config_to_file(host, d)
     File "/usr/bin/shinken-discovery", line 608, in write_host_config_to_file
      fd = open(cfg_p, 'w')
    IOError: [Errno 2] No such file or directory: '/etc/shinken/discovery/Shinken/Shinken.cfg'

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

    Re: Nmap ends up with IO Error

    Hi,

    Is the directory /etc/shinken/discovery/Shinken exist? And with which rights ? (the same user you are launching the discovery or not? ).

    Thanks,


    Jean
    No direct support by personal message. Please open a thread so everyone can see the solution

  3. #3
    Junior Member
    Join Date
    Aug 2011
    Posts
    5

    Re: Nmap ends up with IO Error

    i chmoded the folder to 777 and same result;

    Code:
    nmap -v -sP 192.168.1.0/24
    found the right host number ...

    i seem to have the same problem as ninja21a on comments on this nicolargo's blog post :

    http://blog.nicolargo.com/2011/05/sh...pour-vous.html

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

    Re: Nmap ends up with IO Error

    And what if you launch as the same user :
    touch '/etc/shinken/discovery/Shinken/Shinken.cfg'

    ?
    No direct support by personal message. Please open a thread so everyone can see the solution

  5. #5
    Junior Member
    Join Date
    Aug 2011
    Posts
    5

    Re: Nmap ends up with IO Error

    for now the working file is :
    '/etc/shinken/objects/discovery/Shinken/Shinken.cfg'

    and a touch '/etc/shinken/objects/discovery/Shinken/Shinken.cfg'

    works fine


    Code:
    admin@Shinken:/etc/shinken/objects$ ls -l
    total 16
    drwxr-xr-x 2 shinken shinken 4096 Aug 29 15:09 contacts
    drwxrwxrwx 3 shinken shinken 4096 Aug 30 07:11 discovery
    drwxr-xr-x 2 shinken shinken 4096 Aug 30 07:12 hosts
    drwxr-xr-x 2 shinken shinken 4096 Aug 30 07:12 services
    admindc4@Shinken:/etc/shinken/objects$ cd discovery/
    Code:
    admin@Shinken:/etc/shinken/objects/discovery$ ls -l
    total 4
    drwxrwxrwx 2 shinken shinken 4096 Sep 1 07:25 Shinken



Posting Permissions

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