Zend Studio / Zend Server Integration

I have recently had the opportunity to work with Zend Server and Zend Studio as part of performance testing / bench-marking a large application. I had an interesting, intermittent problem getting Zend Server and Zend Studio to work together as part of the debugging/profiling process with the following error showing up frequently:

Failed to communicate with Zend Studio. Make sure Zend Studio is running on 'xxx.xxx.xxx.xxx,127.0.0.1' according to the settings in Server Setup | Monitor

This error message is mis-leading. The IP listed (xxx.xxx.xxx.xxx) is the IP address of my client desktop machine passed in through the browser.

The error actually means (in my case) that an instance of Zend Server was not configured to allow my client debugger access and was failing when attempting to open a debug session with this Zend Server instance, which was not on the Zend Server where I was reviewing monitoring events from. (How many Zend Servers are involved here?)

Here is the process that occurs when you review a monitored event and attempt to debug this event (assuming Zend Server and Zend Studio are setup to integrate):
1. Clicking on the “Debug Event” button sends an HTTP request to Zend Server where the event was captured.
2. The Zend Server where the request was sent sends an HTTP request to the host where the application is hosted and attempts to open a debug session with that Zend Server to your client Zend Studio.
3. Zend Server communicates with your client over port(s) 20080/10137 to start a debug session in Zend Studio.

Here is the process that I was experiencing with the error above:
1. Click “Debug Event” in Zend Server console, which triggers an HTTP request to Zend Server where the event was captured.
2. The Zend Server performed a DNS lookup on the domain where the application was hosted, which was a production server and not the performance environment where I was working.
3. The Zend Server where the application was hosted in production did not allow remote debug access from my client so the debug session was never initiated.
4. The Zend Server where I attempted to open a debug session from reported the error at the top of this post indicating that my client was not listening from Zend Studio – mis-leading error.

The end result was that I needed to ensure a host entry was in the hosts file (could also be done properly via DNS) for each site that I was troubleshooting/debugging/profiling on the Zend Server where I was monitoring the testing that was being performed. This would create a scenario where the Zend Server where the monitoring was being performed at would also initiate the debugging session with my Zend Studio client and things would work as I expect them to work.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *