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

Error Launching instances: timed out waiting for initialization to complete. #3536

Open
ManitejaDev opened this issue May 25, 2024 · 7 comments
Assignees
Labels
bug needs triage Issue needs to be triaged

Comments

@ManitejaDev
Copy link

ManitejaDev commented May 25, 2024

Describe the bug
Describe what your problem is.
Multipass throwing errors when trying to launch the instance from CLI. Tried to launch two instances of docker. Got the same error both times, however I was able to exec into second instance.
I believe the cloud-init is taking a long time to finish.

To Reproduce
How, and what happened?
$ multipass launch docker --name manager
launch failed: The following errors occurred:
manager: timed out waiting for response

$ multipass exec manager -- lsb_release -a
exec failed: ssh connection failed: 'Timeout connecting to 127.0.0.1'

$ multipass launch docker --name worker1
launch failed: The following errors occurred:
timed out waiting for initialization to complete

$ multipass exec worker1 -- lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy

Expected behavior
What did you expect to happen?
Instances to initialize properly without timeout errors.

Other information:
Was not able to properly launch new instances, even if I was able to ssh into them. I was not able to make one as docker worker node out of them. The docker swarm join is failing.

@ManitejaDev ManitejaDev added bug needs triage Issue needs to be triaged labels May 25, 2024
@andrei-toterman
Copy link
Contributor

Hey, @ManitejaDev! Indeed the cloud-init of the docker blueprint might take too long to complete. You can try passing a longer timeout to the launch command using launch --timeout 1000 which will hopefully give it enough time (1000 seconds in this case).

@ricab
Copy link
Collaborator

ricab commented May 27, 2024

Also, @ManitejaDev, the initialization continues in the background, even after that Multipass timeout. So if you wait for a little while longer, your instance should eventually finish setting up. When it does, it will have this file: /var/lib/cloud/instance/boot-finished.

@ManitejaDev
Copy link
Author

I tried using timeout flag, but still have the trouble.
$ multipass launch docker --name manager --timeout 1000
launch failed: The following errors occurred:
manager: timed out waiting for response

$ multipass exec manager -- bash
exec failed: ssh connection failed: 'Timeout connecting to 127.0.0.1'

$ multipass ls
Name State IPv4 Image
manager Running N/A Ubuntu 22.04 LTS

@andrei-toterman
Copy link
Contributor

What OS are you running? Could you also give us the output of multipass get local.driver?

@ManitejaDev
Copy link
Author

I use Windows.
$ multipass get local.driver
virtualbox

@andrei-toterman
Copy link
Contributor

Hey, @ManitejaDev! Sorry for the late reply. One thing you could try is to use VirtualBox directly to see if the instances boot up correctly. You will need psexec for that. Once you get that in your PATH, run the following command in an Administrator shell (of course, change the VirtualBox location if you have it installed somewhere else):

psexec.exe -s -i "C:\Program Files\Oracle\VirtualBox\VirtualBox.exe"

This should bring up the VirtualBox GUI. From there, you can open up an instance and see its boot sequence. If it eventually arrives at a login screen, it means that the instance should've started correctly.

@ricab
Copy link
Collaborator

ricab commented Jul 1, 2024

Hi @ManitejaDev, did you get a chance to try what @andrei-toterman suggested? Any new findings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants