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
% 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 The qemu driver process seems already stopped
INFO Sending SIGKILL to the host agent process 1223
ERRO operation not permitted
INFO Removing *.pid *.sock under "/Users/karthik.dk/.lima/colima"
INFO Removing "/Users/karthik.dk/.lima/colima/ga.sock"
INFO Removing "/Users/karthik.dk/.lima/colima/ha.pid"
INFO Removing "/Users/karthik.dk/.lima/colima/ha.sock"
Later, you can start the colima as usual
% colima start
INFO starting colima
INFO runtime: docker
INFO preparing network ... context=vm
INFO starting ... context=vm
INFO provisioning ... context=docker
INFO starting ... context=docker
You can see your Colima up and running properly.
- 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.