abiosoft / colima

Container runtimes on macOS (and Linux) with minimal setup
MIT License
18.62k stars 380 forks source link

`error dialing "192.168.5.15:22"` when creating profile with vm-type=vz #533

Open rfay opened 1 year ago

rfay commented 1 year ago

Description

I always see tcpproxy: for incoming conn 127.0.0.1:61228, error dialing "192.168.5.15:22": connect tcp 192.168.5.15:22: no route when creating a colima profile with vm-type=vz. This doesn't happen with default qemu vm type.

colima start y --vm-type=vz
...
> [hostagent] 2022/12/21 09:26:34 tcpproxy: for incoming conn 127.0.0.1:61228, error dialing "192.168.5.15:22": connect tcp 192.168.5.15:22: no route
...

Version

Colima Version: 0.5.1 Lima Version: 0.14.1 Qemu Version: 7.2.0

Operating System

Reproduction Steps

  1. colima start y --vm-type=vz

Watch the startup

Expected behaviour

Although I don't see anything bad as a result of this, it should either not happen or not be reported as an error I'd think.

Additional context

No response

LondonAppDev commented 1 year ago

I'm getting the exact same error. The issue seems to occur when pulling images. If I clear all images using docker rmi $(docker image ls -aq), then run docker run hello-world I get this:

Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on 192.168.107.1:53: read udp 192.168.5.15:35333->192.168.107.1:53: i/o timeout.

I am using the same version as posted above (macOS M1).

If I run docker login then I get the same error.

It seems that colima is currently unable to connect to Docker? I suspect there is some ongoing issue?

balajiv113 commented 1 year ago

@rfay This is actually from lima with vz. Because vz uses gvisor-tap-vsock for network (qemu uses their own version of slirp gateway).

The error is thrown from gvisor-tap-vsock as it tries to forward ssh port before the vm is started. As you said this will not have any negative impact.

Feel free to raise one issue on lima.

yaololo commented 1 year ago

Hi @balajiv113 I got the same error of colima tcpproxy issue. I have issue using webpack dev server proxying api call for local development. Instead of proxy: { '/api': { target: 'http://localhost:5000', }, I have to proxy to IP address proxy: { '/api': { target: 'http://127.0.0.1:5000', }, Is it because of the colima tcpproxy issue during setup?