Closed jessebye closed 4 years ago
Hi @jessebye, does the pod in this deployment have multiple containers on it? If you're reverse proxying port 8999, why is the tunnel established to port 9000?
Could you try using the expose
subcommand, and configure your pod connect to the ip addr or host of the exposed service?
@omrikiei I've tried that as well, here's the log result doing that:
ktunnel expose -n poor-cannon xdebug 9000:9000
INFO[2020-04-14 15:36:58] Exposed service's cluster ip is: 172.20.32.156
INFO[2020-04-14 15:36:58] waiting for deployment to be ready
INFO[2020-04-14 15:37:02] Waiting for port forward to finish
INFO[2020-04-14 15:37:03] Forwarding from 127.0.0.1:28688 -> 28688
Forwarding from [::1]:28688 -> 28688
INFO[2020-04-14 15:37:03] starting tcp tunnel from source 9000 to target 9000
INFO[2020-04-14 15:40:34] 76ff906b-af26-43a3-b017-dfe5c0c7ca32; new session; connecting to port 9000
ERRO[2020-04-14 15:40:37] 76ff906b-af26-43a3-b017-dfe5c0c7ca32; failed reading from socket, exiting: read tcp 127.0.0.1:50306->127.0.0.1:9000: read: connection reset by peer
It seems like the connection was closed by the pod that sent the request to the xdebug service.
Does you development environment listen to DBGP on port 9000?
Do you see anything in the IDE?
Yes, it is listening to DBGP on port 9000. The IDE shows that a connection is going and receives some traffic from xdebug, but then loses the connection.
I assume that when you run xdebug locally and bind it to port 9000 it works right? I want to try an reproduce the issue to debug it, can you recommend on an easy setup of a php app with xdebug, and the IDE you're using?
@omrikiei this seems like a good one to use: https://github.com/okteto/php-getting-started I am using https://www.jetbrains.com/phpstorm/ for IDE.
Hi @jessebye, i've download phpStorm, and followed this tutorial to start debugging with the minimal PHP app from okteto. I managed to sporadically reproduce the issue and I'm looking into this.
@jessebye, I released an alpha version - hopefully it should resolve the issue.. could you please try to work with v1.2.3-alpha and let me know the issue persists?
Hey @omrikiei , that version works! I no longer get disconnected partway through debugging 😄 Thanks for tracking this down and getting it resolved, it will make a big difference for our team!
This is awesome to hear, closing this.. thank for your feedback, will release this soon
When we try to use
ktunnel
to establish a connection for usingxdebug
in one of our containers, it works for about 15 seconds before failing with this error:The ktunnel command we were using was
ktunnel inject -n poor-cannon deployment api 8999:8999
ktunnel version
:1.2.2