通过SSH隧道远程调试:接收“在套接字y上发送x字节时出现问题:管道损坏”

问题描述 投票:0回答:1

我们的想法是设置“通过SSH隧道进行远程调试”。更详细:我们在本地Windows PC上运行PhpStorm。在远程Centos服务器上运行Xdebug。我们使用SSH隧道选项通过Putty进行连接。

我们遵循以下指南:https://www.jetbrains.com/help/phpstorm/remote-debugging-via-ssh-tunnel.html

问题是如果我们在远程服务器上使用XDEBUG_CONFIG=idekey=phpstorm php myscriptcommand.php启动CLI调试,我们会在ssh屏幕中收到如下错误xxxx.xx: There was a problem sending 318 bytes on socket 4: Broken pipe

Netstat向我们展示

prompt on server$ netstat -a -n | grep 9000
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN
tcp        0      1 remote_server_ip:47160     66.249.79.197:9000      SYN_SENT

问题:我们如何防止管道破裂或出现问题?

ssh phpstorm ssh-tunnel
1个回答
1
投票

通过将默认端口更改为空闲端口来解决此问题,在本例中为9001.php fpm在端口9000上运行。

xdebug的端口(putty / ssh隧道和phpstorm都需要更新到端口:9001(或其他自由端口))

© www.soinside.com 2019 - 2024. All rights reserved.