Skip to content

[Bug] Stuck in a restart loop because no runtime is available #1039

@eleftherias

Description

@eleftherias

Bug Description

After updating my computer, ToolHive attempted to restart but got stuck in a loop.

It seems that the desktop app and CLI use different logic to check if a container engine is available.
In my case the desktop app think there's an engine available, but the CLI thinks there's no engine.

If I try to quit the app, it won't quit and remains in the same loop.

Logs

[2025-10-13 17:02:59.371] [error] [beforeLoad] Client baseUrl: http://localhost:50008
[2025-10-13 17:02:59.371] [error] [beforeLoad] ToolHive process running: false
[2025-10-13 17:02:59.372] [error] Error: Health check failed: TypeError: Failed to fetch (localhost:50008)
    at Object.beforeLoad (file:///Applications/ToolHive.app/Contents/Resources/app.asar/.vite/renderer/main_window/assets/index-D9GEDNx_.js:548:2422)
    at async CT (file:///Applications/ToolHive.app/Contents/Resources/app.asar/.vite/renderer/main_window/assets/index-D9GEDNx_.js:54:69275)
    at async file:///Applications/ToolHive.app/Contents/Resources/app.asar/.vite/renderer/main_window/assets/index-D9GEDNx_.js:54:80116
[2025-10-13 17:03:00.194] [info]  Container engines are now available, restarting ToolHive...
[2025-10-13 17:03:00.196] [info]  Restarting ToolHive...
[2025-10-13 17:03:00.197] [info]  ToolHive restarted successfully
[2025-10-13 17:03:00.197] [info]  Starting ToolHive from: /Applications/ToolHive.app/Contents/Resources/bin/darwin-arm64/thv on port 50016, MCP on port 54101
[2025-10-13 17:03:00.199] [info]  [startToolhive] Process spawned with PID: 36264
[2025-10-13 17:03:00.221] [info]  [ToolHive] Capturing stderr enabled
[2025-10-13 17:03:00.455] [info]  [ToolHive stderr] 5:03PM	ERROR	no container runtime available. ToolHive requires Docker, Podman, Colima, or a Kubernetes environment to run MCP servers
[2025-10-13 17:03:00.457] [warn]  ToolHive process exited with code: 1
[2025-10-13 17:03:02.159] [info]  ToolHive restarted successfully
[2025-10-13 17:03:02.173] [info]  Container engines are now available, restarting ToolHive...
[2025-10-13 17:03:02.175] [info]  Restart already in progress, skipping...
[2025-10-13 17:03:02.373] [error] ToolHive is not running
[2025-10-13 17:03:03.788] [error] [beforeLoad] Client baseUrl: http://localhost:50016
[2025-10-13 17:03:03.788] [error] [beforeLoad] ToolHive process running: false
[2025-10-13 17:03:03.793] [error] Error: Health check failed: TypeError: Failed to fetch (localhost:50016)
    at Object.beforeLoad (file:///Applications/ToolHive.app/Contents/Resources/app.asar/.vite/renderer/main_window/assets/index-D9GEDNx_.js:548:2422)
    at async CT (file:///Applications/ToolHive.app/Contents/Resources/app.asar/.vite/renderer/main_window/assets/index-D9GEDNx_.js:54:69275)
    at async file:///Applications/ToolHive.app/Contents/Resources/app.asar/.vite/renderer/main_window/assets/index-D9GEDNx_.js:54:80116
[2025-10-13 17:03:05.188] [info]  Container engines are now available, restarting ToolHive...
[2025-10-13 17:03:05.191] [info]  Restart already in progress, skipping...
[2025-10-13 17:03:07.160] [info]  ToolHive restarted successfully
[2025-10-13 17:03:07.172] [info]  Container engines are now available, restarting ToolHive...
[2025-10-13 17:03:07.173] [info]  Restarting ToolHive...
[2025-10-13 17:03:07.174] [info]  ToolHive restarted successfully
[2025-10-13 17:03:07.174] [info]  Starting ToolHive from: /Applications/ToolHive.app/Contents/Resources/bin/darwin-arm64/thv on port 50094, MCP on port 54118
[2025-10-13 17:03:07.177] [info]  [startToolhive] Process spawned with PID: 36274
[2025-10-13 17:03:07.196] [info]  [ToolHive] Capturing stderr enabled
[2025-10-13 17:03:07.217] [info]  [ToolHive stderr] 5:03PM	ERROR	no container runtime available. ToolHive requires Docker, Podman, Colima, or a Kubernetes environment to run MCP servers
[2025-10-13 17:03:07.218] [warn]  ToolHive process exited with code: 1
[2025-10-13 17:03:07.260] [error] ToolHive is not running

Video

Screen.Recording.2025-10-13.at.16.58.26.mov

Steps to Reproduce

No response

Expected Behavior

No response

Actual Behavior

No response

Priority

Medium

Environment

No response

Additional Context

v0.9.0

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions