Apps proxy returning 502 despite healthy app runtime
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
I have two Databricks Apps that show RUNNING status and clean deployment logs, but both return 502 Bad Gateway when accessing their public URLs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hi Julie,
Host or port binding mismatch between your Streamlit application and the reverse proxy is likely. Even though the app container starts up and reports RUNNING status, the platform expects the internal server process to listen on 0.0.0.0 and bind to the port defined by the DATABRICKS_APP_PORT environment variable (defaults to port 8000). If Streamlit is explicitly forced to listen on port 8080 or bound locally to 127.0.0.1, the public proxy generally cannot route incoming web traffic to the container socket, resulting in the immediate 502 Bad Gateway error. More details here
You can remove the port/host ip references or set it to correct values (port 8000, host 0.0.0.0) as arguments in the command
command:
- "app.py"
- "--server.port" # Remove it
- "8080" # Remove itYou can remove the manually entered ports if mentioned in .streamlit/config.toml too. Check the manual Streamlit Startup Code for incorrect values. Redeploying the app with the configurations should allow the Databricks gateway to connect directly to your Streamlit runtime.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Thank you, I will try that.