Repository navigation
Gateway - Start reports a failure while downloading the image #299
Description
Area
Gateway / DEX
What happened
When a Gateway image needs to be downloaded, Settings → Gateway should keep waiting or say that the download is still in progress instead of reporting that the start failed.
I used my agents to help run and monitor two tests. Both tests used Condor's existing local server, which points to the Hummingbot API running locally in Docker. In the first run, the agent ran Deploy → Latest for me while hummingbot/gateway:latest was not downloaded, and monitored the result. After about 60 seconds, Condor showed:
Failed to start gateway: the trading API is unreachable
In both tests, Condor reported that Start failed before the 1.8 GB image finished downloading, but the original request continued and Gateway started without a retry. The first test captured the exact 502 response, while the second confirmed the same behavior through Docker monitoring. With the image already downloaded, the form closed in about 0.31 seconds without an error.
First test — hummingbot/gateway:latest (UTC)
10:53:05— Start clicked with the image not downloaded.- About 60 seconds later — Condor reported
the trading API is unreachable(HTTP 502). - During the download — one status request took 28.4 seconds, 18 browser status polls failed with 502 responses, and the API's MQTT connection dropped.
- About
10:59:32— Gateway appeared as Running without another Start request. - After Gateway was stopped — reopening Deploy still showed the old error.
Second test — hummingbot/gateway:development (UTC), run by me and monitored by an agent
11:08:41–11:08:54— Start was confirmed with the image not downloaded.- After the wait timed out — the UI reported
Failed to start Gateway; the exact HTTP status and response body were not captured. 11:15:29— Docker still showed no Gateway container, and no retry had been sent.11:15:34— Docker created the Gateway container.11:15:39— Gateway was observed running on127.0.0.1:15888, about 6 minutes 45 seconds to 6 minutes 58 seconds after Start.
Severity: Medium
Steps to reproduce
-
Run Condor from source with a local Hummingbot API, select the configured
localserver, and open Settings → Gateway. -
Stop Gateway if it is running. Make sure the test image is not present locally:
docker image inspect hummingbot/gateway:latest # If it exists and is not in use: docker rmi hummingbot/gateway:latest -
Click Deploy → Latest → Start Gateway.
-
After about 60 seconds, observe
Failed to start gateway: the trading API is unreachable. Do not click Start again. -
Continue watching the Gateway status and Docker. Observe that the same request eventually creates the container and the page changes to Gateway Running.
-
Stop Gateway, reopen Deploy, and observe that the old error can still be displayed.
-
Start Gateway again with the now-downloaded image. Observe that it completes quickly without the timeout error.
Environment
- Condor
0.1.0, run from source on Linux in Chromium. The affected code is unchanged onmain@0ea6e353. - Selected Condor server:
local, connected to the locally running Hummingbot API Docker container. - Hummingbot API
hummingbot/hummingbot-api:latest(Docker). The Gateway start code is the same onmain@7ae108f. - Missing Gateway images
hummingbot/gateway:developmentandhummingbot/gateway:latest, about 1.8 GB each after download.
Logs
Captured on the local Condor 0.1.0 setup on 2026-10-27; the affected paths were confirmed unchanged on main @ 0ea6e353:
POST /api/v1/settings/gateway/start?server=local
Content-Type: application/json
{"image":"hummingbot/gateway:latest","port":15888}
HTTP/1.1 502 Bad Gateway
{"detail":"Failed to start gateway: the trading API is unreachable"}First run — hummingbot/gateway:latest
+ ~60 seconds: Condor reports HTTP 502 and says the trading API is unreachable
+ ~6.5 minutes: Gateway is running; no second Start request was needed
+ downloaded-image control: form closes in about 0.31 seconds
Second run — hummingbot/gateway:development (UTC)
11:08:41–11:08:54 Start confirmed
11:15:29 No Gateway container yet; no retry sent
11:15:34 Gateway container created
11:15:39 Gateway observed running on 127.0.0.1:15888
Activity