xDebug remote_connect_back not working for AWS EC2 instance
The EC2 instance (with Ubuntu 12.04) has setup of Apache 2.4.6 and Php 5.5.6 + xDebug 2.2.2. Apache and PHP were built using make. Everything is working fine, except for xDebug.
Contents of log file and php.ini
zend_extension="/opt/php/lib/php/extensions/no-debug-zts-20121212/xdebug.so" xdebug.remote_enable=1 xdebug.remote_handler=dbgp xdebug.remote_mode=req xdebug.idekey=xdebug xdebug.remote_port=9000 xdebug.remote_connect_back=1 xdebug.remote_log="/tmp/xdebug_remote_log.log" xdebug.extended_info=1
Log opened at 2013-11-29 13:18:35 I: Checking remote connect back address. I: Remote address found, connecting to 188.8.131.52:9000. E: Could not connect to client. :-( Log closed at 2013-11-29 13:18:36
I've exactly the same setup of Apache 2.4.6 and PHP 5.5.6 on a local CentOS 6.3 machine, that works just fine.
Depending on How you connect to the EC2 instance, you can have to open a Tunnel between your Computer and the EC2. This is specially the case if you can't redirect the port 9000 from the EC2 to your computer at work or at home (for any reason, like security, unable to open a port in the router etc... )
From your computer (OSX or Linux), open the SSH Tunnel:
ssh -N -R 9000:localhost:9000 ubuntu@domain_or_ip
Assuming you've already installed php5-xdebug, add these lines at the end of your php.ini:
xdebug.remote_enable = 1 xdebug.remote_handler = dbgp xdebug.remote_mode = req xdebug.remote_host = 127.0.0.1 xdebug.remote_port = 9000
And restart apache:
service apache2 restart
The port 9000 should be successfully redirected to netbeans (if you use Netbeans) or your editor which supports xdebug
Hope this can help somebody
xDebug remote_connect_back not working, xDebug remote_connect_back not working for AWS EC2 instance. Posted by: monu29. Posted on: Nov 29, 2013 8:51 AM How do I troubleshoot Remote Desktop connection issues to my Amazon EC2 Windows instance? Last updated: 2019-06-12 I can't connect to my Amazon Elastic Compute Cloud (Amazon EC2) Windows instance with Remote Desktop Protocol (RDP).
It was my DLink Router preventing any inbound connection requests.
Setting up port-forwarding resolved this.
Note : Only set desired port(s) for inbound connections.
Debugging PHP with Xdebug, PHP Storm and AWS Elastic Beanstalk, The EC2 instance (with Ubuntu 12.04) has setup of Apache 2.4.6 and Php 5.5.6 + xDebug 2.2.2. Apache and PHP were built using make. Everything is working To connect using the EC2 Instance Connect CLI, your instance does not need to have a public IPv4 address because the private IP address can be used. If your instance has both a public and private IP address, the API first tries to connect using the public IP address.
Don't forget to restart:
sudo service httpd restart
Debugging PHPStorm on Windows with Amazon Web Services , Getting Xdebug running is usually a pain on a normal PHP server, Elastic go to EC2 -> Security Groups, then create a new one if you do not already have one We don't need to SSH and do any commands on the instance, the remote_connect_back=0 This one tells xdebug that it must not allow any The following information can help you troubleshoot issues with connecting to your instance. For additional help with Windows instances, see Troubleshooting Windows Instances in the Amazon EC2 User Guide for Windows Instances.
Pro Python System Administration, I'd like to be able to debug them using PHPStorm (v7.1.3) without So I've got a SSH tunnel working with putty, but I'm confused on what I have ssh setup to remote forward port 9000 on the AWS EC2 instance back to the If you can't connect to the instance by using the Services snap-in, detach the root volume from the instance, take a snapshot of the volume or create an AMI from it, attach the original volume to another instance in the same Availability Zone as a secondary volume, and modify the Start registry key. When you are finished, reattach the root volume to the original instance.
Remote debugging via SSH tunnel - Help, Establish a connection to the remote database running on an EC2 instance. 7. Find out what local data does not exist on the remote database yet. 8. for a brief period of time: def _copy_db(self): self.logger.debug('Backing up the DB. server is not 386 Chapter 14 □ Using amazon eC2/s3 asa DataWarehoUse solUtion For more information on creating or modifying security groups, see Working with Security Groups. Because security groups are stateful, the return traffic from the instance to users is allowed automatically, so you don't need to modify the security group's outbound rules.
How to debug from a remote server using Xdebug and PHPStorm , PhpStorm supports debugging with two most popular tools: Xdebug and Zend To avoid this problem, you need to update the corresponding sections in the the remote server can connect to the developer machine directly (for example, with For more information, see Status checks for your instances and Troubleshooting Instances with Failed Status Checks (Amazon EC2 User Guide for Linux Instances). Verify that the route table for the subnet has a route that sends all traffic destined outside the VPC to the internet gateway for the VPC.