jenkinsci/jenkins · critical · CLI.NotTalkingToJenkinsException
There's no Jenkins running at {}, or is not serving the HTTP
Error message
There's no Jenkins running at {}, or is not serving the HTTP Duplex transport What it means
Thrown by FullDuplexHttpStream when the download-side POST response lacks the 'Hudson-Duplex' header. Jenkins sets that header specifically on the HTTP duplex transport, so its absence means the target is not Jenkins or is a Jenkins version that does not serve the duplex transport.
Source
Thrown at cli/src/main/java/hudson/cli/FullDuplexHttpStream.java:76
URL target = new URL(this.base, relativeTarget);
UUID uuid = UUID.randomUUID(); // so that the server can correlate those two connections
// server->client
LOGGER.fine("establishing download side");
HttpURLConnection con = openHttpConnection(target);
con.setDoOutput(true); // request POST to avoid caching
con.setRequestMethod("POST");
con.addRequestProperty("Session", uuid.toString());
con.addRequestProperty("Side", "download");
if (authorization != null) {
con.addRequestProperty("Authorization", authorization);
}
con.getOutputStream().close();
input = con.getInputStream();
// make sure we hit the right URL; no need for CLI.verifyJenkinsConnection here
if (con.getHeaderField("Hudson-Duplex") == null) {
throw new CLI.NotTalkingToJenkinsException("There's no Jenkins running at " + target + ", or is not serving the HTTP Duplex transport");
}
LOGGER.fine("established download side"); // calling getResponseCode or getHeaderFields fails
// client->server uses chunked encoded POST for unlimited capacity.
LOGGER.fine("establishing upload side");
con = openHttpConnection(target);
con.setDoOutput(true); // request POST
con.setRequestMethod("POST");
con.setChunkedStreamingMode(0);
con.setRequestProperty("Content-type", "application/octet-stream");
con.addRequestProperty("Session", uuid.toString());
con.addRequestProperty("Side", "upload");
if (authorization != null) {
con.addRequestProperty("Authorization", authorization);
}
output = con.getOutputStream();
LOGGER.fine("established upload side");
}View on GitHub (pinned to 2e228ff40b)
Solutions
- Confirm the -s URL is the actual Jenkins root and that the user can authenticate (pass -auth or an API token).
- Upgrade the controller to a version supporting the duplex transport, or run the CLI over SSH (-ssh) / Remoting instead.
- Remove or reconfigure any reverse proxy that short-circuits the duplex POST before it reaches Jenkins.
Example fix
# before java -jar jenkins-cli.jar -s http://jenkins help # after: authenticate and bypass proxy java -jar jenkins-cli.jar -s http://jenkins -auth user:token help
Defensive patterns
Strategy: try-catch
Validate before calling
// Verify the duplex transport advertises itself
HttpURLConnection c = (HttpURLConnection) new URL(baseUrl + "/cli").openConnection();
c.setRequestMethod("POST");
c.setRequestProperty("Side", "download");
boolean duplex = c.getHeaderField("Hudson-Duplex") != null;
if (!duplex) {
throw new IOException("Duplex transport not available at " + baseUrl);
} Try / catch
try {
new FullDuplexHttpStream(new URL(baseUrl), "cli?remoting=false", auth);
} catch (CLI.NotTalkingToJenkinsException e) {
// switch to SSH CLI transport or upgrade the controller
} Prevention
- Authenticate every CLI call with -auth user:token.
- Ensure the controller version supports the duplex transport.
- Avoid proxies that intercept the duplex POST.
When it happens
Trigger: The CLI opens the duplex download channel against a URL that returns a normal page or error instead of the duplex stream; common when the controller is too old, the URL is wrong, or a proxy returns its own response.
Common situations: Old Jenkins controller without duplex transport support; CLI pointed at a static page or load-balancer error; reverse proxy terminating the long-lived POST; authentication challenge returning a login page.
Related errors
- There's no Jenkins running at {}
- expected to see initial zero byte; perhaps you are connectin
- corrupt stream: negative frame length
- corrupt stream: negative operation code
- unknown operation #{}
AI-assisted analysis of jenkinsci/jenkins@2e228ff40b (2026-08-14).
Data as JSON: /api/errors/f55c2c025eab1693.
Report an issue: GitHub.