Fix Colima connection refused error: failed to get Info from .lima/colima/ha.sock on Mac

Fix Colima connection refused error: failed to get Info from .lima/colima/ha.sock on Mac

On19th Apr 2023, 2024-12-02T21:27:44+05:30 ByKarthik Kumar D K | read
Listen Pause Resume Stop

This article is about fixing only a single error which you see with Colima on Mac machines. This might be a simple & specific issue, but people who are facing this issue will really feel grateful with the solution provided.

While you are running Colima on your mac machines, generally you get into such issue, when you power off or shut down your mac, without stopping the colima service (and dependent services like ddev etc)

Lima is a service which launches Linux virtual machines with automatic file sharing and port forwarding on Mac machines and Colima uses Lima for working with Containers.

So, while you see an error like .lima/colima/ha.sock: connect: connection refused

Check the list of colima profiles on your mac machine, you can notice the status as Broken.

% colima list
PROFILE    STATUS    ARCH      CPUS    MEMORY    DISK     RUNTIME    ADDRESS
default    Broken    x86_64    4       4GiB      60GiB

To stop the colima properly, use the below command

% limactl stop -f colima
INFO[0000] The qemu driver process seems already stopped
INFO[0000] Sending SIGKILL to the host agent process 1223
ERRO[0000] operation not permitted
INFO[0000] Removing *.pid *.sock under "/Users/karthik.dk/.lima/colima"
INFO[0000] Removing "/Users/karthik.dk/.lima/colima/ga.sock"
INFO[0000] Removing "/Users/karthik.dk/.lima/colima/ha.pid"
INFO[0000] Removing "/Users/karthik.dk/.lima/colima/ha.sock"

Later, you can start the colima as usual

% colima start
INFO[0000] starting colima
INFO[0000] runtime: docker
INFO[0000] preparing network ...                         context=vm
INFO[0001] starting ...                                  context=vm
INFO[0032] provisioning ...                              context=docker
INFO[0033] starting ...                                  context=docker
INFO[0039] done

You can see your Colima up and running properly.

Other notes

  • Sometime because of the Lima upgrade also such issues show up, in such cases, upgrading the Lima to the latest version.
  • Colima has a command stop where you can run colima stop -f, to kill the process. If you are not able to stop, then you are having a different issue.

This way you can fix Colima connection refused error: failed to get Info from .lima/colima/ha.sock on Mac. 

Thanks for reading the article, for more drupal related articles read and subscribe to peoples blog articles.

Related Articles

Recent Articles

Recent Quick Read

Recent Great People

We Need Your Consent
By clicking “Accept Cookies”, you agree to the storing of cookies on your device to enhance your site navigation experience.
I Accept Cookies