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

Jenkins cli - Server returned HTTP response code: 500

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • cli
    • Jenkins 2.176.1
      OS : Redhat

      When I run the below command it can successfully work at the first times. 

      java -jar /opt/jenkins/jenkins-cli.jar -http -auth admin:xxxxxx -logger FINE -s http://localhost:8080 help

      But, after running the command several times, the output changes, and I start getting the following error message : 

      Jun 25, 2019 5:37:39 AM hudson.cli.CLI _main
      FINE: using connection mode HTTP
      Jun 25, 2019 5:37:39 AM hudson.cli.CLI plainHttpConnection
      FINE: Trying to connect to http://localhost:8080/ via plain protocol over HTTP
      Jun 25, 2019 5:37:39 AM hudson.cli.FullDuplexHttpStream tryToResolveRedirects
      FINE: Failed to resolve potential redirects
      _java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/_
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
      at hudson.cli.FullDuplexHttpStream.tryToResolveRedirects(FullDuplexHttpStream.java:102)
      at hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:55)
      at hudson.cli.CLI.plainHttpConnection(CLI.java:279)
      at hudson.cli.CLI._main(CLI.java:271)
      at hudson.cli.CLI.main(CLI.java:83)

      Jun 25, 2019 5:37:39 AM hudson.cli.FullDuplexHttpStream <init>
      FINE: establishing download side
      _java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/cli?remoting=false_
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
      at hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:72)
      at hudson.cli.CLI.plainHttpConnection(CLI.java:279)
      at hudson.cli.CLI._main(CLI.java:271)
      at hudson.cli.CLI.main(CLI.java:83)

          [JENKINS-58183] Jenkins cli - Server returned HTTP response code: 500

          Lamine Drame created issue -
          Lamine Drame made changes -
          Description Original: When I run the below command it can successfully work at the first times. 

          *_java -jar /opt/jenkins/jenkins-cli.jar -http -auth admin:xxxxxx -logger FINE -s http://localhost:8080 help_*

          But suddenly, I start getting the following error message : 

          {color:#de350b}_Jun 25, 2019 5:37:39 AM hudson.cli.CLI _main_{color}
          {color:#de350b}_FINE: using connection mode HTTP_{color}
          {color:#de350b}_Jun 25, 2019 5:37:39 AM hudson.cli.CLI plainHttpConnection_{color}
          {color:#de350b}_FINE: Trying to connect to http://localhost:8080/ via plain protocol over HTTP_{color}
          {color:#de350b}_Jun 25, 2019 5:37:39 AM hudson.cli.FullDuplexHttpStream tryToResolveRedirects_{color}
          {color:#de350b}_FINE: Failed to resolve potential redirects_{color}
          {color:#de350b}_java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/_{color}
          {color:#de350b} _at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)_{color}
          {color:#de350b} _at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)_{color}
          {color:#de350b} _at hudson.cli.FullDuplexHttpStream.tryToResolveRedirects(FullDuplexHttpStream.java:102)_{color}
          {color:#de350b} _at hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:55)_{color}
          {color:#de350b} _at hudson.cli.CLI.plainHttpConnection(CLI.java:279)_{color}
          {color:#de350b} _at hudson.cli.CLI._main(CLI.java:271)_{color}
          {color:#de350b} _at hudson.cli.CLI.main(CLI.java:83)_{color}

          {color:#de350b}_Jun 25, 2019 5:37:39 AM hudson.cli.FullDuplexHttpStream <init>_{color}
          {color:#de350b}_FINE: establishing download side_{color}
          {color:#de350b}_java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/cli?remoting=false_{color}
          {color:#de350b} _at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)_{color}
          {color:#de350b} _at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)_{color}
          {color:#de350b} _at hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:72)_{color}
          {color:#de350b} _at hudson.cli.CLI.plainHttpConnection(CLI.java:279)_{color}
          {color:#de350b} _at hudson.cli.CLI._main(CLI.java:271)_{color}
          {color:#de350b} _at hudson.cli.CLI.main(CLI.java:83)_{color}
          New: When I run the below command it can successfully work at the first times. 

          *_java -jar /opt/jenkins/jenkins-cli.jar -http -auth admin:xxxxxx -logger FINE -s [http://localhost:8080|http://localhost:8080/] help_*

          But, after running the command several times, the output changes, and I start getting the following error message : 

          {color:#de350b}_Jun 25, 2019 5:37:39 AM hudson.cli.CLI _main_{color}
           {color:#de350b}_FINE: using connection mode HTTP_{color}
           {color:#de350b}_Jun 25, 2019 5:37:39 AM hudson.cli.CLI plainHttpConnection_{color}
           {color:#de350b}_FINE: Trying to connect to [http://localhost:8080/] via plain protocol over HTTP_{color}
           {color:#de350b}_Jun 25, 2019 5:37:39 AM hudson.cli.FullDuplexHttpStream tryToResolveRedirects_{color}
           {color:#de350b}_FINE: Failed to resolve potential redirects_{color}
           {color:#de350b}_java.io.IOException: Server returned HTTP response code: 500 for URL: [http://localhost:8080/_]{color}
           {color:#de350b} _at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)_{color}
           {color:#de350b} _at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)_{color}
           {color:#de350b} _at hudson.cli.FullDuplexHttpStream.tryToResolveRedirects(FullDuplexHttpStream.java:102)_{color}
           {color:#de350b} _at hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:55)_{color}
           {color:#de350b} _at hudson.cli.CLI.plainHttpConnection(CLI.java:279)_{color}
           {color:#de350b} _at hudson.cli.CLI._main(CLI.java:271)_{color}
           {color:#de350b} _at hudson.cli.CLI.main(CLI.java:83)_{color}

          {color:#de350b}_Jun 25, 2019 5:37:39 AM hudson.cli.FullDuplexHttpStream <init>_{color}
           {color:#de350b}_FINE: establishing download side_{color}
           {color:#de350b}_java.io.IOException: Server returned HTTP response code: 500 for URL: [http://localhost:8080/cli?remoting=false_]{color}
           {color:#de350b} _at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)_{color}
           {color:#de350b} _at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)_{color}
           {color:#de350b} _at hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:72)_{color}
           {color:#de350b} _at hudson.cli.CLI.plainHttpConnection(CLI.java:279)_{color}
           {color:#de350b} _at hudson.cli.CLI._main(CLI.java:271)_{color}
           {color:#de350b} _at hudson.cli.CLI.main(CLI.java:83)_{color}

            Unassigned Unassigned
            ydabo Lamine Drame
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: