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

CLI hangs through reverse proxy with JNLP disabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • cli
    • None
    • Fedora or RHEL, jenkin 1.436.

      Have jenkins setup on http port 8080 or AJP port 8009.

      Put a reverse proxy in front of it (in this case apache)

      Disable JNLP port.

      Download and run the client tools:

      java -jar jenkins-cli.jar -s http://192.168.122.3/ help

      This will hang for some time and error out:

      Exception in thread "main" java.io.IOException: Premature EOF
      at sun.net.www.http.ChunkedInputStream.readAheadBlocking(ChunkedInputStream.java:556)
      at sun.net.www.http.ChunkedInputStream.readAhead(ChunkedInputStream.java:600)
      at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:687)
      at java.io.FilterInputStream.read(FilterInputStream.java:133)
      at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2582)
      at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2577)
      at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2566)
      at hudson.remoting.Channel.<init>(Channel.java:406)
      at hudson.remoting.Channel.<init>(Channel.java:366)
      at hudson.remoting.Channel.<init>(Channel.java:327)
      at hudson.remoting.Channel.<init>(Channel.java:323)
      at hudson.remoting.Channel.<init>(Channel.java:311)
      at hudson.cli.CLI.connectViaHttp(CLI.java:122)
      at hudson.cli.CLI.<init>(CLI.java:105)
      at hudson.cli.CLI.<init>(CLI.java:83)
      at hudson.cli.CLI._main(CLI.java:267)
      at hudson.cli.CLI.main(CLI.java:216)

      I've attached a sample debug from jenkins in not working mode.

      If I switch to using HAProxy, it succeeds but takes about 20 seconds to do so. Using the CLI to contact the port directly takes less than a second. Something here is causing non jnlp cli connections to fail.

            Unassigned Unassigned
            imlinux Mike McGrath
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: