PHP Debugging session failed to start with the message: "failed to connect to the client address <address>"
This is the set of instructions to troubleshoot and fix the communications between dbg - php debugger and PhpED - PHP IDE.
Why am I seeing this message?
You may see this message if the server side dbg module can not communicate to the machine with PhpED (dbglistener in particular).
This may happen due to the following possible reasons:
- Firewall on the server or on the client machine or on both do not allow the communications to be established
- Client and serevr are in different networks. For example there a network router between the client machine
running PhpED and the server and this router does not forward debugger connection to the IDE, although it allows
connecting to the server fine.
What can I do to troubleshoot this issue?
We recomment to start with Project Settings Wizard and follow its instructions.
If it didn't help, you may want to check communication between debugger on the server and PhpED (dbglistener):
- If web server and development machine (client) are connected to the same network and there is no SSH tunnel setup
between the machines, please follow the instructions here
- If web server and development machine are connected to different networks, you have to
follow additional steps
to establish connectivity between the machines. If you have already followed them but connectivity still fails
to establish, follow these troubleshooting instructions
How do I fix it?
In most cases the problem is caused by firewalls that by default block communications on all ports and for
most applications. So you need to configure them:
- allow dbglistener.exe to receive inbound connections on tcp/7869 port on your development machine
- allow debuger module to establish outbound connections on tcp/7869 port on your server.
- you may also want to check instructions on how to setup remote debugging
I think I fixed it. How do I make sure that it is working?
You can try to start the debugging session again or follow the troubleshooting instructions:
- If dbg and PhpED are installed on the same network or there is no SSH tunneling setup between their machines please follow the instructions here
- If dbg and PhpED are installed on the different networks and there is SSH tunneling setup between their machines please follow the instructions here