Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to start a new docker instance with v1.0.6 on MacOS (Failed to fetch https://download.docker.com/linux/ubuntu/dists/noble/InRelease Could not handshake: The TLS connection was non-properly terminated. [IP: 3.169.231.6 443]) #3370

Closed
allenwugh opened this issue Mar 20, 2025 · 3 comments

Comments

@allenwugh
Copy link

allenwugh commented Mar 20, 2025

Description

MacOS Sequoia 15.3.2
Chip Apple M3 Pro
Lima version 1.0.6

Env:
LIMA_SSH_PORT_FORWARDER=false

(base) a1234@hostname ~ % limactl start ~/Downloads/docker.yaml --name docker
? Creating an instance "docker" Proceed with the current configuration
WARN[0001] local username "a1234" is not a valid Linux username (must match "^[a-z_][a-z0-9_-]*$"); using "lima" instead 
INFO[0002] Starting the instance "docker" with VM driver "vz" 
INFO[0002] Attempting to download the image              arch=aarch64 digest="sha256:f11282a728ad42f8bfe0b646a6807674d79a019bfc229d80032345dd3228a2db" location="https://cloud-images.ubuntu.com/releases/24.04/release-20250115/ubuntu-24.04-server-cloudimg-arm64.img"
INFO[0002] Using cache "/Users/a1234/Library/Caches/lima/download/by-url-sha256/89c8f4302f00811ca8ec0bfb2ae83db3db77dd08fb30de04fe05c7c9192f27ac/data" 
INFO[0002] Converting "/Users/a1234/.lima/docker/basedisk" (qcow2) to a raw disk "/Users/a1234/.lima/docker/diffdisk" 
3.50 GiB / 3.50 GiB [---------------------------------------] 100.00% 1.69 GiB/s
INFO[0004] Expanding to 100GiB                          
INFO[0005] [hostagent] hostagent socket created at /Users/a1234/.lima/docker/ha.sock 
INFO[0005] [hostagent] Starting VZ (hint: to watch the boot progress, see "/Users/a1234/.lima/docker/serial*.log") 
INFO[0005] SSH Local Port: 56812                        
INFO[0005] [hostagent] Waiting for the essential requirement 1 of 2: "ssh" 
INFO[0005] [hostagent] [VZ] - vm state change: running  
INFO[0015] [hostagent] Waiting for the essential requirement 1 of 2: "ssh" 
INFO[0016] [hostagent] The essential requirement 1 of 2 is satisfied 
INFO[0016] [hostagent] Waiting for the essential requirement 2 of 2: "user session is ready for ssh" 
INFO[0027] [hostagent] Waiting for the essential requirement 2 of 2: "user session is ready for ssh" 
INFO[0027] [hostagent] The essential requirement 2 of 2 is satisfied 
INFO[0027] [hostagent] Waiting for the optional requirement 1 of 1: "user probe 1/1" 
INFO[0027] [hostagent] Forwarding "/run/user/501/docker.sock" (guest) to "/Users/a1234/.lima/docker/sock/docker.sock" (host) 
INFO[0027] [hostagent] Guest agent is running           
INFO[0027] [hostagent] Not forwarding TCP 127.0.0.53:53 
INFO[0027] [hostagent] Not forwarding TCP 127.0.0.54:53 
INFO[0027] [hostagent] Not forwarding TCP [::]:22       
INFO[0027] [hostagent] Not forwarding UDP 127.0.0.54:53 
INFO[0027] [hostagent] Not forwarding UDP 127.0.0.53:53 
INFO[0027] [hostagent] Not forwarding UDP 192.168.5.15:68 
INFO[0067] [hostagent] Waiting for the optional requirement 1 of 1: "user probe 1/1" 
INFO[0107] [hostagent] Waiting for the optional requirement 1 of 1: "user probe 1/1" 
INFO[0148] [hostagent] Waiting for the optional requirement 1 of 1: "user probe 1/1" 
INFO[0188] [hostagent] Waiting for the optional requirement 1 of 1: "user probe 1/1" 
INFO[0228] [hostagent] Waiting for the optional requirement 1 of 1: "user probe 1/1" 
INFO[0268] [hostagent] Waiting for the optional requirement 1 of 1: "user probe 1/1" 
INFO[0308] [hostagent] Waiting for the optional requirement 1 of 1: "user probe 1/1" 
INFO[0348] [hostagent] Waiting for the optional requirement 1 of 1: "user probe 1/1" 
INFO[0388] [hostagent] Waiting for the optional requirement 1 of 1: "user probe 1/1" 
INFO[0428] [hostagent] Waiting for the optional requirement 1 of 1: "user probe 1/1" 
INFO[0468] [hostagent] Waiting for the optional requirement 1 of 1: "user probe 1/1" 
INFO[0508] [hostagent] Waiting for the optional requirement 1 of 1: "user probe 1/1" 
INFO[0548] [hostagent] Waiting for the optional requirement 1 of 1: "user probe 1/1" 
INFO[0588] [hostagent] Waiting for the optional requirement 1 of 1: "user probe 1/1" 
FATA[0605] did not receive an event with the "running" status 

Error log:

# Executing docker install script, commit: 4c94a56999e10efcf48c5b8e3f6afea464f9108e
+ sh -c apt-get -qq update >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get -y -qq install ca-certificates curl >/dev/null
+ sh -c install -m 0755 -d /etc/apt/keyrings
+ sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" -o /etc/apt/keyrings/docker.asc
+ sh -c chmod a+r /etc/apt/keyrings/docker.asc
+ sh -c echo "deb [arch=arm64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu noble stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get -qq update >/dev/null
W: Failed to fetch https://download.docker.com/linux/ubuntu/dists/noble/InRelease  Could not handshake: The TLS connection was non-properly terminated. [IP: 3.169.231.6 443]
W: Some index files failed to download. They have been ignored, or old ones used instead.
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get -y -qq install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin >/dev/null
E: Package 'docker-ce' has no installation candidate
E: Package 'docker-ce-cli' has no installation candidate
E: Unable to locate package containerd.io
E: Couldn't find any package by glob 'containerd.io'
E: Couldn't find any package by regex 'containerd.io'
E: Unable to locate package docker-compose-plugin
E: Unable to locate package docker-ce-rootless-extras
E: Unable to locate package docker-buildx-plugin
LIMA 2025-03-20T11:09:09+08:00| WARNING: Failed to execute /mnt/lima-cidata/provision.system/00000001
LIMA 2025-03-20T11:09:09+08:00| Executing /mnt/lima-cidata/provision.user/00000002 (as user lima)
+ systemctl --user start dbus
+ dockerd-rootless-setuptool.sh install
/home/lima.linux/.lima-user-script: line 4: dockerd-rootless-setuptool.sh: command not found
LIMA 2025-03-20T11:09:09+08:00| WARNING: Failed to execute /mnt/lima-cidata/provision.user/00000002 (as user lima)
LIMA 2025-03-20T11:09:09+08:00| Exiting with code 1
2025-03-20 03:09:09,403 - cc_scripts_per_boot.py[WARNING]: Failed to run module scripts_per_boot (per-boot in /var/lib/cloud/scripts/per-boot)
2025-03-20 03:09:09,403 - log_util.py[WARNING]: Running module scripts_per_boot (<module 'cloudinit.config.cc_scripts_per_boot' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_scripts_per_boot.py'>) failed
Cloud-init v. 24.4-0ubuntu1~24.04.2 finished at Thu, 20 Mar 2025 03:09:09 +0000. Datasource DataSourceNoCloud [seed=/dev/vdb].  Up 130.00 seconds

cloud-init-output.log

@allenwugh allenwugh changed the title Failed to start a new docker instance on 1.0.6 Failed to start a new docker instance with v1.0.6 on MacOS Mar 20, 2025
@AkihiroSuda AkihiroSuda changed the title Failed to start a new docker instance with v1.0.6 on MacOS Failed to start a new docker instance with v1.0.6 on MacOS (Failed to fetch https://download.docker.com/linux/ubuntu/dists/noble/InRelease Could not handshake: The TLS connection was non-properly terminated. [IP: 3.169.231.6 443]) Mar 20, 2025
@AkihiroSuda
Copy link
Member

Failed to fetch https://download.docker.com/linux/ubuntu/dists/noble/InRelease Could not handshake: The TLS connection was non-properly terminated. [IP: 3.169.231.6 443]

Your company may have MITM proxy?
You may have to install their certificate to VM?

@allenwugh
Copy link
Author

allenwugh commented Mar 24, 2025

It may cause by unstable network. Just rerun the command within limactl shell, it worked.

But get below warning while restart the lima instance.

(base) a1234@HOSTNAME ~ % limactl start docker
...
INFO[0048] [hostagent] Not forwarding TCP 127.0.0.53:53 
INFO[0048] [hostagent] Not forwarding TCP 127.0.0.54:53 
INFO[0048] [hostagent] Not forwarding TCP [::]:22       
WARN[0058] [hostagent] guest agent events closed unexpectedly  error="rpc error: code = Unavailable desc = error reading from server: EOF"
INFO[0064] [hostagent] The optional requirement 1 of 1 is satisfied 
INFO[0064] [hostagent] Waiting for the guest agent to be running 
INFO[0064] [hostagent] Waiting for the final requirement 1 of 1: "boot scripts must have finished" 
INFO[0068] [hostagent] Guest agent is running           
INFO[0068] [hostagent] Not forwarding TCP 127.0.0.53:53 
INFO[0068] [hostagent] Not forwarding TCP 127.0.0.54:53 
INFO[0068] [hostagent] Not forwarding TCP [::]:22       
INFO[0077] [hostagent] The final requirement 1 of 1 is satisfied 
INFO[0077] READY. Run `limactl shell docker` to open the shell. 
INFO[0077] Message from the instance "docker":          
To run `docker` on the host (assumes docker-cli is installed), run the following commands:
------
docker context create lima-docker --docker "host=unix:///Users/a1234/.lima/docker/sock/docker.sock"
docker context use lima-docker
docker run hello-world
------
(base) a1234@HOSTNAME ~ %

@jandubois
Copy link
Member

But get below warning while restart the lima instance.

This looks like a duplicate of #2558. Unfortunately there is not much we can do unless we get instructions that allow us to replicate the issue.

Feel free to re-open if you can provide additional information!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants