nanjiek commented on issue #724:
URL: https://github.com/apache/dubbo-go-pixiu/issues/724#issuecomment-3277278117

   ### Reproduction Summary
   
   **Environment**
   
   * Windows 11 + WSL2 (Ubuntu)
   * Pixiu (develop branch) running in Docker Desktop
   * Sample server (`http/simple/server/app/*`) running in WSL2
   
   **Observation**
   
   * With upstream configured as `127.0.0.1:1314`, Pixiu in Docker cannot reach 
the server (health check timeout, requests return 503/404).
   * `host.docker.internal` resolves inside the container, but still cannot 
connect to WSL loopback.
   
   **Conclusion**
   Pixiu in Docker cannot directly access WSL’s loopback service. Workarounds 
are:
   
   * Run the server on Windows and use `host.docker.internal`.
   * Or expose the server on WSL’s IP (e.g. `172.xx.xx.xx`) / forward with 
`socat`.
   * Or containerize the server and run it in the same Docker network.
   
   ---
   
   ### 复现总结
   
   **环境**
   
   * Windows 11 + WSL2 (Ubuntu)
   * Pixiu(develop 分支)运行在 Docker Desktop
   * 示例服务(`http/simple/server/app/*`)运行在 WSL2
   
   **现象**
   
   * 当上游配置为 `127.0.0.1:1314` 时,运行在 Docker 内的 Pixiu 无法访问 WSL2 中的 
server(健康检查超时,请求返回 503/404)。
   * 容器内能解析 `host.docker.internal`,但依然无法连通 WSL 的 loopback。
   
   **结论**
   Pixiu 在 Docker 内无法直接访问 WSL 的本地回环服务。可行的解决方案包括:
   
   * 在 Windows 直接运行 server,并通过 `host.docker.internal` 访问;
   * 或在 WSL 暴露服务到其 IP(如 `172.xx.xx.xx`)/ 使用 `socat` 转发;
   * 或将 server 容器化,与 Pixiu 一起运行在同一个 Docker 网络中。
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to