Why does the jenkins-cli.jar linting functionality not work? The jenkins-cli.jar has been downloaded.

It is able to run.

When one tries to check the syntax of a jenkinsfile by running java -jar ~/Desktop/jenkins-cli.jar -s https://&lt;jenkins_url&gt; -noCertificateCheck declarative-linter &lt; Jenkinsfile it results in:

Sep 27, 2017 10:46:18 AM hudson.cli.CLI _main
INFO: Skipping HTTPS certificate checks altogether. Note that this is not secure at all.
Sep 27, 2017 10:46:34 AM hudson.cli.CLI$5 run
WARNING: null
java.io.IOException: Stream is closed
        at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3512)
        at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3486)
        at java.io.DataOutputStream.writeInt(DataOutputStream.java:197)
        at hudson.cli.PlainCLIProtocol$EitherSide.send(PlainCLIProtocol.java:188)
        at hudson.cli.PlainCLIProtocol$EitherSide.send(PlainCLIProtocol.java:195)
        at hudson.cli.PlainCLIProtocol$EitherSide$1.write(PlainCLIProtocol.java:215)
        at hudson.cli.CLI$5.run(CLI.java:699)


@Tensibai asked whether there is an authentication issue. Authentication was done, but it is unclear whether it was succesfull or not:

$ java -jar ~/Desktop/jenkins-cli.jar -noCertificateCheck -s https://&lt;jenkins url&gt; login --username &lt;username&gt; --password &lt;password&gt;
Sep 27, 2017 10:57:17 AM hudson.cli.CLI _main
INFO: Skipping HTTPS certificate checks altogether. Note that this is not secure at all.
After upgrading Jenkins the issue was solved. It turned out that the issue was version related.