Ping Results - Cannot connect to host

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

astropaul
Posts: 4
Joined: Tue Jan 30, 2007 7:43 pm

Ping Results - Cannot connect to host

Post by astropaul »

I've been using Cacti for a while, but just set up a new upgraded server
running the latest Apache + PHP 5.2.5 and Cacti 0.8.7a. I have added
some devices, but I get the following error all the time:

Ping Results - Cannot connect to host

I have 'Downed Host Detection' set to ICMP ping in the device template.
However I can ping the target server fine from the command line.

[06-Dec-2007 17:49:34] PHP Warning: socket_create() [<a href='function.socket-create'>function.socket-create</a>]: Unable to create socket [1]: Operation not permitted in /var/www/cacti/lib/ping.php on line 148

PHP is compiled with --enable-sockets

Any ideas?
mbaki
Posts: 3
Joined: Mon Apr 10, 2006 9:19 am

Post by mbaki »

Hi,

I have the same error, did you find a solution?


Thanks
yann
Posts: 2
Joined: Wed Jun 16, 2004 7:01 am

Post by yann »

Hello,

Same error... just after an update from 0.8.6j to 0.8.7a...

My host are well graphed with advanced ping.. and monitoring is ok too.

Only this error when i want to edit a device...

Have you find any solution?

Thanks !
Attachments
screencopy011.jpg
screencopy011.jpg (21.03 KiB) Viewed 15617 times
screencopy012.jpg
screencopy012.jpg (37.44 KiB) Viewed 15617 times
brent192
Posts: 5
Joined: Mon Nov 24, 2003 11:56 am

same....

Post by brent192 »

I have the same issue, after I upgraded to 0.8.7a....... and yes, the poller is running as root.
User avatar
sizulku
Cacti User
Posts: 110
Joined: Mon Nov 04, 2002 9:15 am
Location: ACEH
Contact:

Post by sizulku »

damn...it happen to me too :(
c3nt0s
Posts: 2
Joined: Fri Jan 11, 2008 8:41 am

Re: same....

Post by c3nt0s »

brent192 wrote:I have the same issue, after I upgraded to 0.8.7a....... and yes, the poller is running as root.
me too after upgrade 0.8.7a:
Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/cacti-0.8.7a/lib/ping.php on line 148
Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/cacti-0.8.7a/lib/ping.php on line 150


Someone had the same problems (and the resolution?) ? :wink:
yann
Posts: 2
Joined: Wed Jun 16, 2004 7:01 am

Post by yann »

Same Problems.... as i have said before...

Has someone have opened a bug request ?
c3nt0s
Posts: 2
Joined: Fri Jan 11, 2008 8:41 am

Post by c3nt0s »

Not me... anyone know this issue?
pachu
Posts: 8
Joined: Tue May 08, 2007 2:49 pm

Post by pachu »

i´am with the same problem....

i´am trying to find any solution
User avatar
pshankland
Cacti User
Posts: 247
Joined: Fri Dec 31, 2004 7:07 am
Location: UK

Post by pshankland »

Am not sure this is just a Linux/Unix error as I am getting this same error on a Windows Cacti server.

Anyone got a fix??
User avatar
pshankland
Cacti User
Posts: 247
Joined: Fri Dec 31, 2004 7:07 am
Location: UK

Post by pshankland »

I have just double checked and although through the 'Device' screen I get this error when I select either ICMP or TCP ping method, I do not get this with UDP ping!! There is no firewall in between the Cacti server and device so I am a bit lost as to why it cannot connect.

Also, with the same devices that are having ICMP and TCP ping connectivity problems, I am using the Advanced Ping Template 1.3 and that is using ICMP to ping and that is fine!!

Very strange...
kyosanim
Posts: 37
Joined: Thu Apr 05, 2007 5:33 am

Post by kyosanim »

for ICMP ping you need root-privilegues.
your poller is running as root right? So your graphs will be created correctly.
but if you click on "device" a php script tries to send a ICMP ping NOT the poller. and normally the webserver (wwwrun or something) not runs with root-privilegues.
User avatar
pshankland
Cacti User
Posts: 247
Joined: Fri Dec 31, 2004 7:07 am
Location: UK

Post by pshankland »

My web user is running with the correct privileges (windows: web user needs access to run cmd.exe). Have double checked the rights but everything is, errr 'right' :)
User avatar
sizulku
Cacti User
Posts: 110
Joined: Mon Nov 04, 2002 9:15 am
Location: ACEH
Contact:

Post by sizulku »

seemed no one able to solved this issue or this issue are not important :D
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

As I do not need the full functionality of advanced ping (only ICMP required) and as I do NOT like to run the poller as root, I implemented a "simple" workaround. I've re-written the basic php script server script (hmm, was it perl or was in shell, don't know by heart) to produce the exactly same output. And IMHO, it's way faster.
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests