abiosoft / colima

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

Colima won't start - log says 'error calling fd_connect' #938

Open joachim-n opened 10 months ago

joachim-n commented 10 months ago

Description

When I do colima start I get this:

> exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} (hint: see "/Users/joachim/.colima/_lima/colima/ha.stderr.log")

The last item in the log is this:

{"level":"fatal","msg":"template: :1:21: executing \"\" at \u003cfd_connect \"/Users/joachim/.colima/_lima/_networks/user-v2/user-v2_qemu.sock\"\u003e: error calling fd_connect: fd_connect: dial unix /Users/joachim/.colima/_lima/_networks/user-v2/user-v2_qemu.sock: connect: connection refused","time":"2023-12-20T10:10:40Z"}

I've tried restarting my mac but the error still occurs

Version

colima version 0.6.1 git commit: fa1bc249f921287745f01fb02075c9ecbb491c31 limactl version 0.18.0 qemu-img version 8.1.3 Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers

Operating System

Output of colima status

FATA[0000] colima is not running

Reproduction Steps

  1. Do colima start

Expected behaviour

No response

Additional context

No response

joachim-n commented 10 months ago

Maybe relevant: I installed and ran Orbstack so I could do some work. This appeared to fix the problem with colima start as when I tried it again, it worked!

s-renz commented 10 months ago

I keep running into the same problem every other day. Sometimes rebooting does fix it, but today for example it doesn't.

Last time I had to delete all containers and re-create them, which made me lose progress due to now having a daily snapshot.

Is there any solution to this that doesn't require completely wiping the containers?

joachim-n commented 10 months ago

This appeared to fix the problem with colima start as when I tried it again, it worked!

Running Orbstack didn't fix the problem the second time I tried it.

I can confirm that rebooting doesn't always work.

jbcjorge commented 10 months ago

I had this issue today, the error (if is the same) lies in lima, which now have an improved network stack more info

So I ended up deleting all (brew remove qemu lima colima && rm -rf ~/.lima && rm -rf ~/.colima) and reinstalling it...

Possibly removing only lima and reinstalling it could work... also apparently to this could be only a configuration file in lima; but since I didn't care about deleting everything I went for the easy fix

s-renz commented 10 months ago

I had this issue today, the error (if is the same) lies in lima, which now have an improved network stack more info

I only used colima since mid Oct, so it always had the improved network stack as far as I see. Also nothing changed on my system from the last time I ran colima (15th Dec) to till today. So that shouldn't be the issue, or am I missing something?

So I ended up deleting all (brew remove qemu lima colima && rm -rf ~/.lima && rm -rf ~/.colima) and reinstalling it...

I actually tried that as a last resort and it didn't work. So for now I installed Orbstack to at least get my ddev intsances backup and running. However since it isn't free I would love to use colima again.

vyskoczilova commented 10 months ago

Same here. I've just updated Ventura from 13.6.1 to 13.6.3, and it broke down; maybe it's related? Removing qemu & restart worked for me right now, but I hope it won't get back.

AndreasA commented 9 months ago

I was able to fix such an issue by running rm -rf ~/.colima/_lima/_networks/user-v2. but still it should not occur in the first place.

klodeckl commented 9 months ago

Thanks @AndreasA removing the folder worked also in my case.

AndreasA commented 9 months ago

it might also be enough to just remove the .pid file in that folder. but to be safe removing the whole folder might be better.

viirak commented 9 months ago

I was able to fix such an issue by running rm -rf ~/.colima/_lima/_networks/user-v2. but still it should not occur in the first place.

I've tried this, and it does work for me.

asnowfix commented 9 months ago

I was able to fix such an issue by running rm -rf ~/.colima/_lima/_networks/user-v2. but still it should not occur in the first place.

I've tried this, and it does work for me.

Both renaming the profile (I use --profile test), forcing reachable networks --network-address & removing the former _network worked for me: I was able to recover my containers & images.

I am not sure wether profile renaming & reachable network are mandatory.

asnowfix commented 9 months ago

I was able to fix such an issue by running rm -rf ~/.colima/_lima/_networks/user-v2. but still it should not occur in the first place.

I've tried this, and it does work for me.

Both renaming the profile (I use --profile test), forcing reachable networks --network-address & removing the former _network worked for me: I was able to recover my containers & images.

I am not sure wether profile renaming & reachable network are mandatory.

Profile renaming is useless: I was able to restart w/o it.

deltakapa commented 9 months ago

This is also reproducible in Apple Silicon >= 14 (Sonoma) Workaround of AndreasA seem to temporarily solve the issue.

HatemTemimi commented 8 months ago

@deltakapa I started having this very weird behavior on colima since yesterday and nothing is solving it.. trying install // reinstall with brew, deleting all config files, the @AndreasA solution, I am on MacOS 14.3.1.

Update: @jbcjorge 's solution just worked for, brew remove qemu lima colima && rm -rf ~/.lima && rm -rf ~/.colima

ovidiu-munteanu commented 8 months ago

Had the same issue, installed and uninstalled a few times, restarted a few times, still no use.

This is what worked in the end (not sure if all steps are required exactly like this).

brew uninstall --zap qemu colima lima docker
brew autoremove
rm -rf ~/.colima && rm -rf ~/.lima && rm -rf ~/Library/Caches/lima

<restart>

brew update && brew upgrade
brew install lima
brew install --HEAD colima
brew install docker
colima start --cpu 4 --memory 6 --disk 100 --arch aarch64 --vm-type=vz
sudo ln -sf /Users/$USER/.colima/docker.sock /var/run/docker.sock

A bit brute force, but it worked.

s-renz commented 8 months ago

All of these solutions, especially those that require removing and reinstalling colima are only fixing the symptoms but not the actual underlying issue.

I would love to see this resolved, but so far there doesn't seem to be any progress or even recognition of the issue?

tiilikainen commented 8 months ago

it might also be enough to just remove the .pid file in that folder. but to be safe removing the whole folder might be better.

Removing only the pid file fixed this issue for me. Thanks @AndreasA!

AndrewAtkinson commented 8 months ago

rm -rf ~/.colima/_lima/_networks/user-v2

Also worked for me! thank you!

drimmeer commented 8 months ago

it might also be enough to just remove the .pid file in that folder. but to be safe removing the whole folder might be better.

Thank you @AndreasA ! I had the same problem after upgrading to MacOS Ventura 13.6.4. Simply removing _~/.colima/_lima/_networks/user-v2/usernetuser-v2.pid solved the problem. You saved my day!

joachim-n commented 7 months ago

Could Colima act on shutdown to delete that .pid file?

AndrewAtkinson commented 7 months ago

Could Colima act on shutdown to delete that .pid file?

What if you just click upgrade. Would Colima be shutdown when restarting?

jensf-sidious commented 7 months ago

@AndreasA fix worked for me too 👍

MiaousX commented 6 months ago

@AndreasA Thank you! It solved my problem!

JDavidMares commented 6 months ago

I was able to fix such an issue by running rm -rf ~/.colima/_lima/_networks/user-v2. but still it should not occur in the first place.

It work for me on Sonoma 14.4.1, Thanks!

MichaelSp commented 5 months ago

For me the above suggestions did not help. I was abel to fix it with:

colima stop -f && colima start

edysmp commented 5 months ago

i am now using DDEV with lima. no issues so far.

zahid-self commented 5 months ago

I was able to fix such an issue by running rm -rf ~/.colima/_lima/_networks/user-v2. but still it should not occur in the first place.

It worked for me too, thanks.

Priyankad19 commented 4 months ago

Other solutions like re-installing or restarting didnt help in my case but removing ~/.colima/_lima/_networks/user-v2/usernet_user-v2.pid file worked for me

eunrui commented 4 months ago

All of these solutions, especially those that require removing and reinstalling colima are only fixing the symptoms but not the actual underlying issue.

I would love to see this resolved, but so far there doesn't seem to be any progress or even recognition of the issue?

Hero! It works for me. Thanks.

simmonsren commented 4 months ago

delete pid work for me, I met this issue yesterday, I tried to delete ~/.colima/_lima/_networks/user-v2 too, after recovery, I lost every containers and images, anyone met this case as well?

jfmulero commented 4 months ago

Other solutions like re-installing or restarting didnt help in my case but removing ~/.colima/_lima/_networks/user-v2/usernet_user-v2.pid file worked for me

This work for me

aniruddha-adhikary commented 3 months ago

Other solutions like re-installing or restarting didnt help in my case but removing ~/.colima/_lima/_networks/user-v2/usernet_user-v2.pid file worked for me

This works, thank you!

JDavidMares commented 3 months ago

I was able to fix such an issue by running rm -rf ~/.colima/_lima/_networks/user-v2. but still it should not occur in the first place.

Months ago I tried the solution from @AndreasA and It worked, but I lost all my containers and my images, which is not a big deal, but I prefer not lost them.

it might also be enough to just remove the .pid file in that folder. but to be safe removing the whole folder might be better.

I had the same problema again and tried the other option from AndreasA, remove only the usernet_user-v2.pid file and it worked but the result is the same, I lost my containers and images.

abiosoft commented 3 months ago

@JDavidMares do you have multiple user accounts on your mac?

JDavidMares commented 3 months ago

@abiosoft No, my user is the admin

abiosoft commented 3 months ago

I would dig a bit more into this, it should not be happening.

JDavidMares commented 3 months ago

@abiosoft Ok, If I can help you with any logs or something like that, just let me know

ssi-ee commented 2 months ago

Other solutions like re-installing or restarting didnt help in my case but removing ~/.colima/_lima/_networks/user-v2/usernet_user-v2.pid file worked for me

Helped me too, thanks :)

davidkaufman commented 6 days ago

it might also be enough to just remove the .pid file in that folder. but to be safe removing the whole folder might be better.

removing just the PID file worked for me, as a workaround. Would still love for this to stop happening, of course 😁

rm ~/.colima/_lima/_networks/user-v2/usernet_user-v2.pid

Thanks @AndreasA!

davidkaufman commented 6 days ago

it might also be enough to just remove the .pid file in that folder. but to be safe removing the whole folder might be better.

removing just the PID file worked for me, as a workaround. Would still love for this to stop happening, of course 😁

rm ~/.colima/_lima/_networks/user-v2/usernet_user-v2.pid

Actually, though, the problem came back after the next restart

😭

davidkaufman commented 6 days ago

it might also be enough to just remove the .pid file in that folder. but to be safe removing the whole folder might be better.

removing just the PID file worked for me, as a workaround. Would still love for this to stop happening, of course 😁 rm ~/.colima/_lima/_networks/user-v2/usernet_user-v2.pid

Actually, though, the problem came back after the next restart

😭

Deleting the whole directory rm -rf ~/.colima/_lima/_networks/user-v2/ resolved the error, but blew away my all my virtual machines and volumes, causing me to lose days of work...

😭 😭

icecreamsandwich commented 4 days ago

I was able to fix such an issue by running rm -rf ~/.colima/_lima/_networks/user-v2. but still it should not occur in the first place.

This resolved my issue 👍. Can somebody explain what this does?