Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-17142

java cli does not work behind proxy

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • cli
    • None

      Hi,
      I try to use jenkins cli but I got 403 errors:

      null:Downloads viroos$ java -jar ~/Downloads/jenkins-cli.jar -s https://dev.polidea.pl/jenkins help
      Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: https://dev.polidea.pl/jenkins/cli
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1625)
      at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
      at hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:77)
      at hudson.cli.CLI.connectViaHttp(CLI.java:156)
      at hudson.cli.CLI.<init>(CLI.java:140)
      at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:68)
      at hudson.cli.CLI._main(CLI.java:439)
      at hudson.cli.CLI.main(CLI.java:374)

      I added my public key to may jerkins account so this is not the reason. I check jenkins logs and I find out:

      Mar 10, 2013 5:11:28 PM hudson.security.csrf.CrumbFilter doFilter
      WARNING: No valid crumb was included in request for /jenkins/cli. Returning 403.

      But I have ignore_invalid_headers off; directive added in my proxy server. I use to have crumb errors in web interface but after adding this directive I don't have such errors any more.

      I attached crumbs.trace file that you can open in charles proxy (www. charlesproxy.com) and shows sniffed jenkins cli <-> jenkins server conversation.

            Unassigned Unassigned
            maciej_sawicki Maciej Sawicki
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: