dowww icon indicating copy to clipboard operation
dowww copied to clipboard

WSL2 中的127.0.0.1 和 localhost

Open RealTong opened this issue 3 years ago • 0 comments

我在这个页面的配置过程遇到了问题:

Windows侧环境:Windows 10 Pro 21H1 WSL侧环境:OS: Arch Linux on Windows 10 x86_64 Kernel: 5.10.16.3-microsoft-standard-WSL2

问题

在WSL侧启动了ES,在Windows侧使用浏览器访问 localhost:9200返回正确的结果,访问127.0.0.1:9200 则显示拒绝连接

最后测试发现Postman,curl,还有SpringBoot程序里都显示连接失败。

image

RealTong avatar Sep 08 '21 14:09 RealTong