{"record":{"id":"f55c2c025eab1693","repo":"jenkinsci/jenkins","slug":"there-s-no-jenkins-running-at-or-is-not-servin","errorCode":null,"errorMessage":"There's no Jenkins running at {}, or is not serving the HTTP Duplex transport","messagePattern":"There's no Jenkins running at (.+?), or is not serving the HTTP Duplex transport","errorType":"exception","errorClass":"CLI.NotTalkingToJenkinsException","httpStatus":null,"severity":"critical","filePath":"cli/src/main/java/hudson/cli/FullDuplexHttpStream.java","lineNumber":76,"sourceCode":"        URL target = new URL(this.base, relativeTarget);\n\n        UUID uuid = UUID.randomUUID(); // so that the server can correlate those two connections\n\n        // server->client\n        LOGGER.fine(\"establishing download side\");\n        HttpURLConnection con = openHttpConnection(target);\n        con.setDoOutput(true); // request POST to avoid caching\n        con.setRequestMethod(\"POST\");\n        con.addRequestProperty(\"Session\", uuid.toString());\n        con.addRequestProperty(\"Side\", \"download\");\n        if (authorization != null) {\n            con.addRequestProperty(\"Authorization\", authorization);\n        }\n        con.getOutputStream().close();\n        input = con.getInputStream();\n        // make sure we hit the right URL; no need for CLI.verifyJenkinsConnection here\n        if (con.getHeaderField(\"Hudson-Duplex\") == null) {\n            throw new CLI.NotTalkingToJenkinsException(\"There's no Jenkins running at \" + target + \", or is not serving the HTTP Duplex transport\");\n        }\n        LOGGER.fine(\"established download side\"); // calling getResponseCode or getHeaderFields fails\n\n        // client->server uses chunked encoded POST for unlimited capacity.\n        LOGGER.fine(\"establishing upload side\");\n        con = openHttpConnection(target);\n        con.setDoOutput(true); // request POST\n        con.setRequestMethod(\"POST\");\n        con.setChunkedStreamingMode(0);\n        con.setRequestProperty(\"Content-type\", \"application/octet-stream\");\n        con.addRequestProperty(\"Session\", uuid.toString());\n        con.addRequestProperty(\"Side\", \"upload\");\n        if (authorization != null) {\n            con.addRequestProperty(\"Authorization\", authorization);\n        }\n        output = con.getOutputStream();\n        LOGGER.fine(\"established upload side\");\n    }","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/jenkinsci/jenkins/blob/2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc/cli/src/main/java/hudson/cli/FullDuplexHttpStream.java#L58-L94","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before\njava -jar jenkins-cli.jar -s http://jenkins help\n# after: authenticate and bypass proxy\njava -jar jenkins-cli.jar -s http://jenkins -auth user:token help","handlingStrategy":"try-catch","validationCode":"// Verify the duplex transport advertises itself\nHttpURLConnection c = (HttpURLConnection) new URL(baseUrl + \"/cli\").openConnection();\nc.setRequestMethod(\"POST\");\nc.setRequestProperty(\"Side\", \"download\");\nboolean duplex = c.getHeaderField(\"Hudson-Duplex\") != null;\nif (!duplex) {\n    throw new IOException(\"Duplex transport not available at \" + baseUrl);\n}","typeGuard":null,"tryCatchPattern":"try {\n    new FullDuplexHttpStream(new URL(baseUrl), \"cli?remoting=false\", auth);\n} catch (CLI.NotTalkingToJenkinsException e) {\n    // switch to SSH CLI transport or upgrade the controller\n}","preventionTips":["Authenticate every CLI call with -auth user:token.","Ensure the controller version supports the duplex transport.","Avoid proxies that intercept the duplex POST."],"tags":["jenkins-cli","duplex-transport","network","http-headers"],"backgroundTag":null,"analyzedSha":"2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc","analyzedAt":"2026-08-14T07:07:15.274Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}