PDA

View Full Version : How do I troubleshoot an Aptana debugger timeout?



sgoodman
2012-12-22, 08:54 PM
Greetings,

I've installed Zend Debugger (http://www.zend.com/en/solutions/php-debugging/) on my remote Linux server. I've verified the installation by looking at phpinfo().

I'm trying to debug a PHP page in Aptana (http://www.aptana.com) 3.3.1, but I keep getting the following error message:


A timeout occurred when the debug server attempted to connect to the following client hosts/IPs:
-192.168.1.64
-127.0.0.1
!DefaultDebugServerConnectionTest_theClientHostIPs !

Click here for more information on setting up remote debugging.
Clicking "here" doesn't do anything.

I've verified that Aptana is reaching the dummy.php file, because if I delete it, I get an error message saying that dummy.php is missing. The problem seems to be that dummy.php can't connect back to me.

I've tried forwarding ports 10000 and 10137 on my router to my laptop, but it hasn't helped. Windows Firewall isn't logging any dropped packets, and Apache error_log doesn't show anything unusual. If there is another error message, I can't find it.

Is there anything else I could try? I'm really struggling.

Thanks,
Shane.

jeremya
2013-01-02, 10:09 AM
Hi Shane,

If you're connecting remotely, those appear to be local IPs. I'm not particularly familiar with the Aptana, but I suspect you need to configure it to connect to your web accessible IP unless your connection is local in some way.

Based on the error message I found:

GrepCode: org / eclipse / php / internal / server / PHPServerUIMessages.properties - Source Code View (http://grepcode.com/file/repository.grepcode.com/java/eclipse.org/3.6.1/org.eclipse.php.server/ui/2.2.0/org/eclipse/php/internal/server/PHPServerUIMessages.properties)

DefaultDebugServerConnectionTest_theClientHostIPs = The client hosts/IPs to which your debug server will attempt a connection can be configured from: Window | Preferences | PHP | Debug | Installed Debuggers

jeremya
2013-01-02, 10:12 AM
Further, I found this:

Configuring Eclipse for Remote Debugging with Zend | drupal.org (http://drupal.org/node/157609)

If you are not developing/serving on the same machine, your IP will have to be the client IP.
I use zend_debugger.allow_hosts=192.160.0.* to mean any machine on my LAN.
If you are trying to do this on a remote server, things will be trickier as you neet network port frowarding, as well as a high level of control of the remote host anyway, so best not to do this. Debugging is best done locally anyway.

So you may actually need to port forward on your VPS?

sgoodman
2013-01-03, 03:34 AM
My modem doesn't allow me to forward ports properly, so the only alternative is to try tunneling.

I've followed the instructions (http://kb.zend.com/index.php?View=entry&EntryID=109), but I'm still getting the same error.

I can verify that Aptana is listening to port 10137 on my local laptop, because when I type "netstat -ap TCP" into the Windows 7 command line, I get this returned:


TCP 0.0.0.0:10137 Shane:0 LISTENING

I can verify that the tunnel is open and listening to port 10137 on the remote CentOS server, because when I type "netstat -tln | grep 10137" into the Bash command line, I get this returned:


tcp 0 0 127.0.0.1:10137 0.0.0.0:* LISTEN
tcp 0 0 ::1:10137 :::* LISTEN

So, once again I'm stuck. I've never used tunneling before, and I don't know how to troubleshoot where the problem is (the client, the server, etc). Any suggestions would be appreciated.

Thanks,
Shane.

jeremya
2013-01-03, 09:53 AM
Hi Shane,

It sounds like you've setup your side just fine but you still need the centos server to connect back to your machine or vice versa. If your local machine is configured to connect to your centos server we would need a better understanding of how that connection is made.

You can check if your centos server port is open using: Open Port Check Tool - Test Port Forwarding on Your Router (http://www.yougetsignal.com/tools/open-ports/)

Enter the IP and the port and it will tell you if it's listening publicly. Then you need to configure your connection from your local machine to the debug server on the centos box using your centos IP. To do this you can probably just using the port forwarding features in Putty (PuTTY: a free telnet/ssh client (http://www.chiark.greenend.org.uk/~sgtatham/putty/)) or your SSH client. You'll want to forward information running on your remote port 10137 to your local port 10137.

Something like the attached setup in putty should work i think? Again, this assumes that the data flow is from the centos box on that port, to the local box on that same port. 108

jeremya
2013-01-03, 09:54 AM
actually, if the recommended setup works, you may want to close out the port publicly on the centos side if you can. You shouldn't need it since putty connects to create the tunnel on port 22. Once connected you can access any port you create a forward for on the remote host.

sgoodman
2013-01-05, 05:04 AM
Jeremya,

Sorry - I didn't get an email when you replied.

For a better understanding of how the connection should be made, you can check this out:

Connecting Zend Studio to Zend Debugger over an SSH Tunnel - Zend Technologies: Customer Support Knowledgebase (http://kb.zend.com/index.php?View=entry&EntryID=109)

I think I might try making a connection myself, to see where the problem lies. I'm going to look into using Telnet to try connecting from the CentOS server to myself.

Thanks,
Shane.