[v0.9] Problem with ping/nmap - live hosts do not ping from GUI.
phpipam open-source IP address management
Brought to you by:
myha
I am able to ping the hosts in question from the machine as displayed below.
PING xxx.xxx.xxx.1 (xxx.xxx.xxx.1) 56(84) bytes of data. 64 bytes from xxx.xxx.xxx.1: icmp_seq=1 ttl=255 time=0.788 ms 64 bytes from xxx.xxx.xxx.1: icmp_seq=2 ttl=255 time=0.814 ms ^C --- xxx.xxx.xxx.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1859ms rtt min/avg/max/mdev = 0.788/0.801/0.814/0.013 ms
Scan subnet on xxx.xxx.xxx.0/24 (using the Star Icon) produces
No alive hosts found!
During this process a large number of php Defunct processes are created, its running, but something is failing.
Ping check result (using the arrow recycle icon) on singular "Added IP" produces
Error: unknown host
Any help or direction on where I can see the command that is trying to be run
Anonymous
Just to make sure everybody knows - ping and nmap locations have been modified in the scan config file.
Not a single person here can help??? We'd love to use the software and would be happy to donate if we got it working:(
Still having problems with this issue, need debugging tips on where to look to see why it is unable to run.
We would love to use this software and would donate towards development if we can get some support. As of right now without pinging/nmap the product requires too much manual intervention to consider a viable product for intranet usage.
Thanks Again.
Hi gyoza, will try to help you with this issue. I had similar problem on one of my machines and I resolved it somehow but cannot remember how :/
For starters try to enable debugging in ping script:
functions/scan/DiscoveryPingScript.php
ini_set('display_errors', 1);
error_reporting(E_ALL ^ E_NOTICE);
And print output form script:
site/ipaddr/scan/subnetScanDiscoveryPing.php
After this line:
exec($cmd, $output, $retval);
add
print_r($output);
this should give you an output of scan script.
I am also having the same issues, love the product hopefully this will be resolved sooin.......
I get stuff like this...
Array [3015] => ( [3016] => [10] => You must specify a valid function name that can be called from the current scope. [3017] => [15] => pcntl_fork() returned a status of -1. No new process was created [3018] => ) [3019] => [3020] => [runnable:protected] => pingHost [3021] => [pid:Thread:private] => 745 [3022] => [exitCode:Thread:private] => 2 [3023] => ) [3024] => [] )
Not too sure on how to do threads in PHP so any help would be great.
You have to enable pcntl extension for php cli, depends on your system.
Check for support with
php -m | grep pcn
yes that is running.
php -m | grep pcn
pcntl
Any other ideas?
Is there anyway to run this from the console? I do not need to do it from the website as long as it can put the information into the DB I am happy.
:P
** RESOLVED - CENTOS 6.5 APPEARS TO HAVE PROBLEM WITH FORKING **
Anyway to run this from the command prompt manually? I'd prefer this method as I can then watch the nmap scans go by :P
As long as I can get the information into the DB I am happy, it does not need to be done through the Web UI. Thanks!
Best Regards,
GYOZA
Last edit: gyoza 2013-12-24
Here are some more details from the system when run manually.
[root@ipinventory scan]# php DiscoveryPingScript.php 3634257928
Thread Object
(
[errors:Thread:private] => Array
(
[10] => You must specify a valid function name that can be called from the current scope.
[15] => pcntl_fork() returned a status of -1. No new process was created
)
)
[][root@ipinventory scan]#
Disable SELinux...
I thought I had disabled it.. I always check if its selinux. There is a printout at my desk at work "If something is not working right check selinux".. So I am sure I checked it.. I will double check on Monday.
Disabling SElinux resolved my discovery ping problem but I stil get the unknown host when I use the check availibility option for an IP address.
SElinux was most certainly disabled on the system.
THIS IS RESOLVED. CENTOS 6.5 Was the problem. It appears that it doesn't process php threading correctly.
I am using ubuntu server 12.03 now.
Last edit: gyoza 2013-12-24
Hi, nice to hear, thanks for info !
Any help on this Miha? am getting an output of Array ( [0] => [] )
Thanks
Hi, I noticed same problems on one of my servers, and I noticed apache did not have permissions to execute ping (permissions on /sbin/ping).
[root@server ~]# ls -la /sbin/ping
-r-xr-xr-x 1 root wheel 24132 Jun 11 2013 /sbin/ping
[root@server ~]#
I changed to
[root@server ~]# ls -la /sbin/ping
-r-sr-xr-x 1 root wheel 24132 Jun 11 2013 /sbin/ping
[root@server ~]#
and it worked afterwards. Can you try to do that?
chmod 4555 /sbin/ping
Also, if you upgrade to devel release it will now display errors if something fails.
Not the s in owner permissions (setuid).
http://www.za.freebsd.org/doc/handbook/permissions.html (Chapter 4.3.3)
These settings are important for some UNIX operations as they provide functionality not normally granted to normal users. To understand them, the difference between the real user ID and effective user ID must be noted.
Thanks Miha.... it worked!!!
Oh great news :) I was trying to figure it out for quite some time last day, and it seems this is causing the problem. Will know for future reference :) Also in 1.0 the errors will be shown, instead of no hosts found as it is now.
brm
Last edit: Miha Petkovsek 2014-01-17
Not run PingSCAN in host ISPConfig PHP FAST-CGI, run PHP PHP-FPM