Unable to open debugger port (localhost:8617): java.net.ConnectException "Connection time out"
原因是host被修改
cmd窗口执行命令:sudo vi /etc/hosts)
里面localhost需要设置成127.0.0.1。之前写的是别的地址,所以debug模式提示连接超时。通过这个也可以发现,调试程序是通过localhost定位的。


当遇到调试器无法连接(如:'Connection timeout'错误)时,问题可能出在hosts文件上。文章指出,localhost的IP地址被错误地设置为非默认值127.0.0.1,导致调试失败。解决方案是通过命令行工具如cmd,使用sudo编辑/etc/hosts文件,将localhost恢复为127.0.0.1。此问题揭示了调试过程中的主机定位依赖于localhost。
Unable to open debugger port (localhost:8617): java.net.ConnectException "Connection time out"
原因是host被修改
cmd窗口执行命令:sudo vi /etc/hosts)
里面localhost需要设置成127.0.0.1。之前写的是别的地址,所以debug模式提示连接超时。通过这个也可以发现,调试程序是通过localhost定位的。


2445

被折叠的 条评论
为什么被折叠?