-
Notifications
You must be signed in to change notification settings - Fork 632
[Bug] Cannot connect to gateway on host from within docker (#482 & #491 incorrectly closed) #498
Description
Describe the Bug
Note: #482, #491 were both incorrectly closed, but the PR #481, #485 but does not address the same issue. I am seeing 0 packets (tcpdump), that PR related to a different endpoint returning 404.
I don't know how to make this more specific.
I am running 'tcpdump -i lo port 18789'. I don't see packets (not a SYN) from the container.
openclaw runs on the host (no container). It listens on 127.0.0.1. I have a proxy setup so that it will also listen on 172.17.0.1 which is my docker0 interface.
If I run curl http://host-gateway:18789 inside the mission-control container, it works, so i know the path is correct as given.
I have these env vars:
OPENCLAW_GATEWAY_PORT=18789
OPENCLAW_GATEWAY_TOKEN=XXX
OPENCLAW_GATEWAY_HOST=host-gateway
When I run mission-control, 0 packets arrive.
--
My gateway runs on my docker host. It is listening on 127.0.0.1:18789.
I have run socat to 'proxy' as:
/usr/bin/socat TCP4-LISTEN:18789,fork,reuseaddr,bind=172.17.0.1 TCP4:127.0.0.1:18789
From within the mission-control container I can run 'curl http://172.17.0.1:18789' and it works.
I have added the entry to hosts:
172.17.0.1 host-gateway
I have set OPENCLAW_GATEWAY_HOST=host-gateway (have also tried 172.17.0.1).
I am not seeing a connect, nor an error in the log.
if it matters, I have mounted my ~/.openclaw dir
Steps to Reproduce
- setup .env
- run socat
- run docker-compose up
Expected Behavior
Connect via http on port 18789 from container to socat, and onwards
Screenshots
If applicable, add screenshots.
Environment
- OS: Ubuntu 24.04
- Browser: Chrome 147
- Mission Control Version: git sha 648347c (2026-03-22)
I am not sure how to debug this. It doesn't seem to even try. I see in the UI that the gateway variables are set, but, no packets are emitted
If i run it outside of docker-compose environment, it does connect normally. If i run curl http://host-gateway:18789 inside the running container, it works.
OPENCLAW_GATEWAY_PORT=18789
OPENCLAW_GATEWAY_TOKEN=XXXX
OPENCLAW_GATEWAY_HOST=host-gateway
is there some way to debug or enable logging? I set LOG_LEVEL=debug and DEBUG=*. I see a lot of logs but nothing regarding the gateway connection.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status