java.io.IOException

tip

Check if you didn't set RequestProperty Content-Type to the wrong type or if you're trying to send the wrong file to the server.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • According to Hudson 1.350 changelog: - Authentication support in Hudson CLI. (issue 3796) it should be possible now to use the CLI when Authorization is set up... but it does not seem to work. My setup: - Enable security ticked - Authorization Matrix-based security Anonymous (all denied) admin (all allowed) I can only login at the Hudson dashboard if I use the admin account. But when I try to use the hudson CLI (downloaded the jar file from http://localhost:8080/hudson/cli) I get: C:\Work\hudson>java -jar hudson-cli.jar -s http://localhost:8080/hudson help Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8080/hudson/cli at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:51) at hudson.cli.CLI.<init>(CLI.java:90) at hudson.cli.CLI.<init>(CLI.java:62) at hudson.cli.CLI.main(CLI.java:171) The same happens when I provide the username and password details: C:\Work\hudson>java -jar hudson-cli.jar -s http://localhost:8080/hudson help --username admin --password theRightPassword Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8080/hudson/cli at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:51) at hudson.cli.CLI.<init>(CLI.java:90) at hudson.cli.CLI.<init>(CLI.java:62) at hudson.cli.CLI.main(CLI.java:171) is this the correct way to provide auth credentials via the CLI args?
    via by Andrea Barbieri,
    • java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8080/cli at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) at hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:61) at hudson.cli.CLI.<init>(CLI.java:91) at hudson.cli.CLI.<init>(CLI.java:63) at hudson.cli.CLI.main(CLI.java:176)

    Users with the same issue

    hari haran
    1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    74 more bugmates