Skip to content
Latchkey

JFrog "connection refused" / wrong JF_URL in CI

The jf CLI could not open a connection to the platform. JF_URL points at the wrong host, port, or scheme, so the request is refused or the host does not resolve.

What this error means

A jf command fails with "connection refused", "dial tcp ... connect: connection refused", or "no such host" instead of an HTTP status. Auth never happens because the socket does not open.

jf
[Error] Get "https://artifactory.internal:8081/artifactory/api/system/ping":
dial tcp 10.0.0.5:8081: connect: connection refused

Common causes

Wrong host, port, or scheme in JF_URL

A typo, an http vs https mismatch, or the wrong port means the CLI dials a socket that is closed or does not exist.

The URL is unreachable from the runner

A private Artifactory not reachable from hosted runners, or a DNS name that does not resolve, produces a connection or host error.

How to fix it

Set JF_URL to the reachable platform base URL

  1. Confirm the correct scheme, host, and port for your platform.
  2. Set JF_URL as a workflow variable and re-run.
  3. Verify with a ping before other jf commands.
.github/workflows/ci.yml
env:
  JF_URL: https://acme.jfrog.io
# then
jf rt ping

Use a runner with network access to Artifactory

For a private Artifactory, run on a self-hosted or managed runner inside the network, or expose it through an accessible endpoint.

How to prevent it

  • Store JF_URL as a variable so every job uses the same correct URL.
  • Include the /artifactory context path when your deployment requires it.
  • Ping the platform early to catch URL problems before real work.

Frequently asked questions

What causes "jf "connection refused""?
A typo, an http vs https mismatch, or the wrong port means the CLI dials a socket that is closed or does not exist.
How do I fix jf "connection refused"?
Set JF_URL to the reachable platform base URL

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card