Unable to connect host after restart instance
- Dominant language
- Go
- Stars
- 21.9k
- Forks
- 957
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 53
Description
### Description
Environment: MacBook ARM - M1
Steps to reproduce:
- limactl create --name=default template://docker
- Open an editor to review or modify the current configuration
- set arch: "x86_64"
```
# Review and modify the following configuration for Lima instance "default2".
# - To cancel starting Lima, just save this file as an empty file.
(...)
arch: "x86_64"
# This template requires Lima v0.8.0 or later
images:
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
- location: "https://cloud-images.ubuntu.com/releases/22.04/release-20231211/ubuntu-22.04-server-cloudimg-amd64.img"
arch: "x86_64"
digest: "sha256:6d6af17f28c895d87e29092725370387c5e19efe57e58b96dc574feed4245f89"
- location: "https://cloud-images.ubuntu.com/releases/22.04/release-20231211/ubuntu-22.04-server-cloudimg-arm64.img"
arch: "aarch64"
digest: "sha256:f885a8e8f62ab2c39ab0442ea182b69d49ccd990d24791acb4f1724573d8120f"
# Fallback to the latest release image.
# Hint: run `limactl prune` to invalidate the cache
- location: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img"
arch: "x86_64"
- location: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-arm64.img"
arch: "aarch64"
(...)
```
- create a docker container in lima instance
- `docker run --name nginx -p 8044:80 -d nginx`
- from host: `curl -Ss "http://127.0.0.1:8044" -o /dev/null && echo ok` returns ok
- limactl stop default
- limactl start default
- lima
- docker start $(docker ps -a -q)
- from host: `curl -Ss "http://127.0.0.1:8044" -o /dev/null && echo ok` returns `curl: (7) Failed to connect to 127.0.0.1 port 8044 after 3 ms: Couldn't connect to server`
Somehow after lima instance restart I cannot connect to docker container again.
Right now I need to remove lima instance and set up everything from scratch to make it works - but it is just workaround.
Contributor guide
Assessment
This issue has not been assessed yet.