MLflow tracking URI error: 'Connection refused' failed to connect to remote server
Treat connection refused as a reachability problem in order: is the server process up, is it listening on the host and port in the tracking URI, and can this machine route to it. Use when an MLflow client connecting to a remote tracking server. Not for a server that is up but rejecting at the application layer with auth errors, where the fix is credentials rather than reachability.
TL;DR
Treat connection refused as a reachability problem in order: is the server process up, is it listening on the host and port in the tracking URI, and can this machine route to it. Check the server's own log and listening socket first, then the URI's host and port from the client machine, then any proxy variables that send local or cluster addresses through a proxy that refuses them.
MLflow tracking URI error: 'Connection refused' failed to connect to remote serverUse this when
- The run or call fails with this symptom: Connection refused when the MLflow client connects to the remote tracking server.
- You are working on an MLflow client connecting to a remote tracking server and the failure repeats on the same run or configuration.
- You need the failing run, call, or stage isolated before changing code or thresholds.
Not for this skill when
- A server that is up but rejecting at the application layer with auth errors, where the fix is credentials rather than reachability.
- The error text names a different tool, stage, or root cause. Match the verbatim error first and use that skill.
Steps
- From the client machine, test the exact host and port in the tracking URI with a plain HTTP request and note the result. Verify: the refusal is reproduced outside MLflow
- On the server host, confirm the MLflow process is running and listening on the expected interface, not only a loopback address. Verify: the server's listening state is confirmed
- Compare the URI's port with the port the server was actually started on, including container port mappings. Verify: URI and listener ports match
- Check proxy environment variables on the client for the server's hostname and add it to the no-proxy list if it is internal. Verify: the client reaches the server and a read call succeeds
Variant phrasings
mlflow tracking uri connection refused remote server
The verbatim phrasing.
mlflow client cannot connect tracking server port
The port phrasing.
mlflow connection refused proxy no_proxy fix
The proxy phrasing.
Compatibility: MLflow 2.x and 3.x remote tracking server connections
Why it happens
Connection refused is a transport answer: nothing accepted the connection at that address. It says nothing about MLflow itself, and the cause sits in one of four places, process, listener, address, or an intercepted route, each cheap to test in sequence.
Edge cases / pitfalls
- A server bound inside a container without a published port refuses every external client while looking healthy internally.
- After a server restart, confirm the artifact and backend settings loaded; a refused UI port sometimes means it started on defaults.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_-NBKYDupDo41IhPHgHlbmw