View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001877 | Xdebug | Step Debugging | public | 2020-11-02 17:56 | 2021-03-27 13:19 |
Reporter | TomaszKane | Assigned To | derick | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | unable to reproduce | ||
Platform | Linux | OS | KDE Neon | OS Version | 5.19 |
Product Version | 3.0.0beta1 | ||||
Summary | 0001877: Xdebug from docker container can't connect to client | ||||
Description | Hi, What is missing or broke with my configuration? | ||||
Steps To Reproduce | install xdebug-3.0.0beta1via PECL and enable it (on php 7.4 fpm container) write xdebug config: xdebug.mode=debug docker-compose: version: "3"
Browser - Firefox with Cookie: XDEBUG_SESSION=PHPSTORM PhpStorm with config like on attached screenshos Listening is on: $ lsof -i :9003 | grep LISTEN /etc/hosts like: | ||||
Additional Information | php -v PHP 7.4.8 (cli) (built: Jul 9 2020 23:21:18) ( NTS ) xdebug log: [6] Log opened at 2020-11-02 17:20:12.510627 | ||||
Tags | fpm, Nginx, PHPStorm | ||||
Attached Files | |||||
Operating System | Debian | ||||
PHP Version | 7.4.0-7.4.4 | ||||
|
I don't think there is anything wrong with Xdebug here. It merely says the following:
And that indicates that Xdebug can't, or didn't connect, to the right IP address. On the machine where you ran "lsof -i :9003 | grep LISTEN", what is the output of "sudo ifconfig" ? |
|
$ sudo ifconfig br-09ed3aef8b95: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 br-126beb512707: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 br-1b9f61aa11ae: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 br-1e59254eafcf: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 br-43e421f671a5: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 br-f1dea2c77d19: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 br-feeef05eccd0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 enp0s31f6: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 veth585b027: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 veth702dc10: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 veth725fd74: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 vethbc74d65: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 vethdd1c2c2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 |
|
cat /etc/hosts 172.17.0.1 some.address.pl |
|
Thanks for the answer, derick. I know it's probably not a Xdebug bug, but I hope someone here will be able to tell me what I did wrong. Or how to run Xdebug step by step in an astepping configuration:
You can find many guides on the web on how to run the debugger in a similar configuration, but none of them explain what to do in case of problems - i.e. how to debug the launch of XDebug ;-) |
|
In example: how to debug Xdebug port?
Now you are sure that everytihng touching the port is configured properly. |
|
That's not quite true, for Xdebug 3 I've been working on some docs for this: https://3.xdebug.org/docs/errors#DBG-E-NOCON — You'd get that link when you use xdebug_info() to show you the issues. You seem to have loads of "172.17.x" networks, I suppose they're all internal docker ones? I think that instead of using "some.address.pl" you should use "172.17.0.1" in your PhpStorm config, as that seems to be the right address, but it wants to connect to 172.22.0.1 as per the error message. Why the domain some.address.pl does not resolve to that, I don't know. I'd generally recommend that if you use docker, you also don't rely on xdebug.discover_client_host=1, but hard code it in php.ini (or friends) with the right IP address (172.17.0.1, I believe). |
|
In my case containers have no access to the host on any port.
|
|
In my case containers have no access to the host on any port. sudo iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 9003 -j ACCEPT helped to fix |
|
I can't reproduce this, and no more feedback was provided. Please reopen if you can provide more information. |
|
Solution was easy and sad: |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-11-02 17:56 | TomaszKane | New Issue | |
2020-11-02 17:56 | TomaszKane | Tag Attached: fpm | |
2020-11-02 17:56 | TomaszKane | Tag Attached: Nginx | |
2020-11-02 17:56 | TomaszKane | Tag Attached: PHPStorm | |
2020-11-02 17:56 | TomaszKane | File Added: Screenshot_20201102_184329.png | |
2020-11-02 17:56 | TomaszKane | File Added: Screenshot_20201102_184346.png | |
2020-11-02 17:56 | TomaszKane | File Added: Screenshot_20201102_184537.png | |
2020-11-03 17:24 | derick | Assigned To | => derick |
2020-11-03 17:24 | derick | Status | new => feedback |
2020-11-03 17:24 | derick | Note Added: 0005494 | |
2020-11-10 08:17 | TomaszKane | Note Added: 0005506 | |
2020-11-10 08:18 | TomaszKane | Note Added: 0005507 | |
2020-11-10 08:23 | TomaszKane | Note Added: 0005508 | |
2020-11-10 08:57 | TomaszKane | Note Added: 0005509 | |
2020-11-14 10:10 | derick | Note Added: 0005530 | |
2020-12-18 08:42 | heil | Note Added: 0005594 | |
2020-12-18 08:42 | heil | Note Added: 0005595 | |
2020-12-30 12:15 | derick | Status | feedback => resolved |
2020-12-30 12:15 | derick | Resolution | open => unable to reproduce |
2020-12-30 12:15 | derick | Note Added: 0005624 | |
2021-03-27 13:19 | TomaszKane | Note Added: 0005817 |