How to debug "PHP Script Server communications lost."

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
Instigater
Cacti User
Posts: 141
Joined: Mon Dec 13, 2004 5:14 pm
Location: Jurmala, Latvia

How to debug "PHP Script Server communications lost."

#1 Post by Instigater » Mon Mar 25, 2013 3:32 am

Versions: Cacti 0.8.8a, Spine 0.8.8a

This is very weird. I have a template that works like a charm 2 years already. The device in question is Cisco Wireless controller. Now we did setup up an another two newer WLCs. Template is the same, OIDs are the same, logic in SNMP tree is the same. Basicly nothing has changed, yet whenever I make an graph of particular Radion on that WLC I always get "PHP Script Server communications lost." error message.

I did turn on verbose logging, it shows that most of the time returned values are "U" but in about 5% I get quite sane result. Dubugging script server from command line I always get perfect results. The success rate is not influenced by amount of data sources of specific device.

Lets summarize:
1. 3 Cisco WLCs, 2 newer, one old with newest software of this year
2. The oldest WLC works perfectly, 2 newest ones generate "PHP Script Server communications lost. Restarting PHP Script Server"
3. Data source count doesn't affect success rate
4. PHP Script server debug from command line always yields perfect results

I'm lost here, how can i debug such situation?

User avatar
Instigater
Cacti User
Posts: 141
Joined: Mon Dec 13, 2004 5:14 pm
Location: Jurmala, Latvia

Re: How to debug "PHP Script Server communications lost."

#2 Post by Instigater » Wed Mar 27, 2013 7:03 am

Code: Select all

l-vm-150:/srv/www/htdocs/log # tail -f cacti.log | grep 'ss_host_radios\|ERROR'

03/27/2013 02:01:04 PM - SPINE: Poller[0] Host[53] TH[2] DS[20019] SS[9] SERVER: /srv/www/htdocs/scripts/Cisco_WLC_Radios.php ss_host_radios 10.2.0.219 53 2:161:500:1:10:xxx:::::: get utilization 0.29.112.147.206.208.0, output: 1
03/27/2013 02:01:04 PM - SPINE: Poller[0] Host[53] TH[2] DS[20020] SS[1] SERVER: /srv/www/htdocs/scripts/Cisco_WLC_Radios.php ss_host_radios 10.2.0.219 53 2:161:500:1:10:xxx:::::: get utilization 0.29.112.147.206.208.1, output: 0
03/27/2013 02:01:10 PM - SPINE: Poller[0] Host[857] TH[1] DS[24268] SS[6] SERVER: /srv/www/htdocs/scripts/Cisco_WLC_Radios.php ss_host_radios 10.21.1.27 857 2:161:500:1:1:xxx:::::: get utilization 0.29.112.147.191.16.0, output: U
03/27/2013 02:01:10 PM - SPINE: Poller[0] Host[857] TH[1] DS[24269] SS[7] SERVER: /srv/www/htdocs/scripts/Cisco_WLC_Radios.php ss_host_radios 10.21.1.27 857 2:161:500:1:1:xxx:::::: get utilization 0.29.112.147.191.16.1, output: U
03/27/2013 02:01:10 PM - SPINE: Poller[0] ERROR: SS[6] PHP Script Server communications lost.  Restarting PHP Script Server
03/27/2013 02:01:10 PM - SPINE: Poller[0] ERROR: SS[7] PHP Script Server communications lost.  Restarting PHP Script Server
Debug from CMD

Code: Select all

l-vm-150:/srv/www/htdocs # php script_server.php
PHP Script Server has Started - Parent is cmd
/srv/www/htdocs/scripts/Cisco_WLC_Radios.php ss_host_radios 10.21.1.27 857 2:161:500:1:1:xxx:::::: get utilization 0.29.112.147.191.16.1
7
/srv/www/htdocs/scripts/Cisco_WLC_Radios.php ss_host_radios 10.21.1.27 857 2:161:500:1:1:xxx:::::: get utilization 0.29.112.147.191.16.1
7
/srv/www/htdocs/scripts/Cisco_WLC_Radios.php ss_host_radios 10.21.1.27 857 2:161:500:1:1:xxx:::::: get utilization 0.29.112.147.191.16.1
7
/srv/www/htdocs/scripts/Cisco_WLC_Radios.php ss_host_radios 10.21.1.27 857 2:161:500:1:1:xxx:::::: get utilization 0.29.112.147.191.16.1
7
quit
PHP Script Server Shutdown request received, exiting
As you see, script works perfectly from CMD. What else might be wrong?

User avatar
Instigater
Cacti User
Posts: 141
Joined: Mon Dec 13, 2004 5:14 pm
Location: Jurmala, Latvia

Re: How to debug "PHP Script Server communications lost."

#3 Post by Instigater » Wed Apr 10, 2013 4:37 am

rony, gandalf, do you have at least a suggestions where to look into?

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: How to debug "PHP Script Server communications lost."

#4 Post by gandalf » Sat Apr 27, 2013 1:21 pm

A guess: As the newer ones do use newer software, the output might have changed, e.g. a blank might be appended or, worse, a CRLF.
Make sure to chop that off before printing data in your script_server code
R.

Post Reply