How to Fix the “.lima/colima/ha.sock: connect: connection refused” Error on macOS (Colima Issue Resolved)

How to Fix the “.lima/colima/ha.sock: connect: connection refused” Error on macOS (Colima Issue Resolved)

ByKarthik Kumar D K | read
Listen Pause Resume Stop

If you use Colima on macOS for container management, you may occasionally run into the error:

.lima/colima/ha.sock: connect: connection refused

This error appears simple, but for developers who rely on Colima for daily local development (especially with tools like DDEV), it can completely break your workflow. The good news? The issue has a clean, repeatable fix — and this article explains exactly how to resolve it.

Why This Colima Error Happens on macOS

This issue usually occurs when:

  • You shut down or restart your Mac without stopping Colima,
  • Or when dependent services (like DDEV or Docker running under Colima) are not shut down cleanly,
  • Or after some Lima upgrades.

What Is Lima and Why Does It Matter?

  • Lima is the underlying service Colima uses.
  • It launches lightweight Linux VMs on macOS and provides file sharing + port forwarding.
  • Colima is essentially a layer on top of Lima.

So when Colima becomes “Broken,” it’s usually Lima that failed to stop properly, leaving behind leftover .sock and .pid files.

How the Error Appears

Running Colima commands often leads to:

.lima/colima/ha.sock: connect: connection refused

If you list Colima profiles, you’ll usually see something like this:

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

The keyword here is Broken.
This means the Colima VM is no longer in a valid state.

Step-by-Step Fix for Colima “connection refused” ha.sock Error

Follow this solution exactly — it's the safest and most reliable method.

Step 1: Force-Stop the Lima Instance Used by Colima

Run:

% limactl stop -f colima

You may see output like:

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"

This is normal.
Lima will delete stale PID and socket files that cause the “connection refused” error.

Step 2: Start Colima Normally

Once Lima has been cleaned up, start Colima again:

% colima start

Typical output:

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

Your Colima instance should now be up and running without errors.

Your Colima is Now Working Again

After restarting, running colima list should show a healthy status:

PROFILE STATUS ...
default Running

This confirms that the .sock corruption issue is resolved.

Additional Notes & Tips

1. Lima Upgrades Can Also Cause This Issue

If you recently upgraded Lima and suddenly encounter this problem, upgrading Lima again to the latest stable version usually fixes it.

2. You Can Also Try Stopping Colima Directly

Colima has its own force-stop command:

% colima stop -f

If this works, great — but if it fails, it means the VM is corrupted, and you should use the Lima command mentioned earlier.

3. Don’t Shut Down macOS While Colima Is Running

Avoid hard shutdowns while Colima or DDEV is running.
Always stop services first to prevent .sock corruption.

Conclusion

The “failed to get Info from .lima/colima/ha.sock: connect: connection refused” error in Colima is common on macOS, especially after improper shutdowns or upgrades. Thankfully, the fix is easy:

  1. Force-stop Lima using limactl stop -f colima
  2. Restart Colima using colima start

With these steps, you can get Colima back to a working state quickly and avoid recreating your environment from scratch.

Thanks for reading! For more quick troubleshooting guides and Drupal-related articles, continue exploring PeoplesBLOG

Related Articles

17% OFF
Apple iPhone 15 (128 GB) - Black

Apple iPhone 15 (128 GB) - Black

57,999 69,900

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