You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
brew services restart openshell on macOS results in a crash loop. The gateway process starts, binds successfully to 127.0.0.1:17670, but then also attempts to bind to 10.89.0.1:17670 — the gateway IP of the openshell-docker podman network. On macOS with podman machine (libkrun), this address only exists inside the Linux VM and is not reachable from the host. The bind fails with EADDRNOTAVAIL (os error 49), the process exits, and launchd respawns it every ~10 seconds.
Actual behavior: Gateway crash-loops, brew services list shows error status with exit code 1.
Expected behavior: Gateway should not attempt to bind to podman bridge IPs on macOS, since they are VM-internal addresses unreachable from the host.
Reproduction Steps
Install openshell via Homebrew on macOS (Apple Silicon)
INFO openshell_server::cli: Starting OpenShell server bind=127.0.0.1:17670
INFO openshell_server: Using compute driver driver=docker
INFO openshell_server: Server listening address=127.0.0.1:17670
The primary bind to 127.0.0.1:17670 succeeds, but a secondary bind to the podman bridge gateway IP fails.
system log shows the spawn/inactive cycle:
Successfully spawned openshell-gateway-homebrew-service[60695] because semaphore
service inactive: homebrew.mxcl.openshell
Analysis
The openshell-docker podman network has subnet 10.89.0.0/24 with gateway 10.89.0.1. The gateway binary discovers this network and tries to also listen on the bridge gateway IP. On Linux (native podman), this would work because the bridge interface exists on the host. On macOS with podman machine (libkrun/Apple HV), all podman networking is inside the VM — 10.89.0.1 is not a host-side address.
$ ifconfig | grep 10.89
(no output — address does not exist on host)
$ podman network inspect openshell-docker | jq '.[0].subnets'
[{"subnet": "10.89.0.0/24", "gateway": "10.89.0.1"}]
When running on macOS with podman machine, the gateway should skip binding to podman bridge network gateway IPs (they are unreachable from the host). The gateway could:
Detect macOS + podman machine and only bind to the configured OPENSHELL_BIND_ADDRESS
Probe whether the bridge IP is actually assigned to a local interface before attempting to bind
Treat the bridge bind failure as non-fatal (log a warning, continue with 127.0.0.1 listener only)
Description
brew services restart openshellon macOS results in a crash loop. The gateway process starts, binds successfully to127.0.0.1:17670, but then also attempts to bind to10.89.0.1:17670— the gateway IP of theopenshell-dockerpodman network. On macOS with podman machine (libkrun), this address only exists inside the Linux VM and is not reachable from the host. The bind fails withEADDRNOTAVAIL(os error 49), the process exits, and launchd respawns it every ~10 seconds.Actual behavior: Gateway crash-loops,
brew services listshowserrorstatus with exit code 1.Expected behavior: Gateway should not attempt to bind to podman bridge IPs on macOS, since they are VM-internal addresses unreachable from the host.
Reproduction Steps
brew services restart openshellbrew services listshowsopenshell error 1Logs
stderr (
/opt/homebrew/var/log/openshell/openshell-gateway.err.log):Repeats every ~10 seconds as launchd respawns.
stdout (
/opt/homebrew/var/log/openshell/openshell-gateway.out.log):The primary bind to
127.0.0.1:17670succeeds, but a secondary bind to the podman bridge gateway IP fails.system log shows the spawn/inactive cycle:
Analysis
The
openshell-dockerpodman network has subnet10.89.0.0/24with gateway10.89.0.1. The gateway binary discovers this network and tries to also listen on the bridge gateway IP. On Linux (native podman), this would work because the bridge interface exists on the host. On macOS with podman machine (libkrun/Apple HV), all podman networking is inside the VM —10.89.0.1is not a host-side address.Environment
Related Issues
host-gatewayresolution in containerhostadd; this issue is about the gateway server itself binding to the bridge IP.Proposed Fix
When running on macOS with podman machine, the gateway should skip binding to podman bridge network gateway IPs (they are unreachable from the host). The gateway could:
OPENSHELL_BIND_ADDRESS127.0.0.1listener only)Note
Responses generated with Claude