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

Jenkins Plugin - Terminal Plugin - [JENKINS TERMINAL] ERROR: 405

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When run cmd in Terminal Plugin cosole, like cmd ls, reports:
      [JENKINS TERMINAL] ERROR: 405
      Add below line to terminal.js
      self.log(xhr.responseText)
      And then it reports below error

      [JENKINS TERMINAL] java.lang.Exception: requires POST
      at org.kohsuke.stapler.HttpResponses.error(HttpResponses.java:79)
      at jenkins.model.Jenkins._doScript(Jenkins.java:3381)
      at jenkins.model.Jenkins.doScript(Jenkins.java:3361)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:583)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:214)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:50)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:722)

      [JENKINS TERMINAL] ERROR: 405

        Attachments

          Activity

          Hide
          joeyjiao Joey Jiao added a comment -

          Adding this will solve:
          'type' : 'POST',

          Show
          joeyjiao Joey Jiao added a comment - Adding this will solve: 'type' : 'POST',
          Show
          joeyjiao Joey Jiao added a comment - https://github.com/JoeyJiao/terminal-plugin/commit/6c0a8334e08e5d98b88709971d0c72ef0d89e070
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Joey Jiao
          Path:
          pom.xml
          src/main/resources/index.jelly
          src/main/webapp/js/terminal.js
          http://jenkins-ci.org/commit/terminal-plugin/6c0a8334e08e5d98b88709971d0c72ef0d89e070
          Log:
          [FIXED JENKINS-18057] Run os cmd needs to use POST method instead of GET

          Signed-off-by: Joey Jiao <joey.jiaojg@gmail.com>

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Joey Jiao Path: pom.xml src/main/resources/index.jelly src/main/webapp/js/terminal.js http://jenkins-ci.org/commit/terminal-plugin/6c0a8334e08e5d98b88709971d0c72ef0d89e070 Log: [FIXED JENKINS-18057] Run os cmd needs to use POST method instead of GET Signed-off-by: Joey Jiao <joey.jiaojg@gmail.com>
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kiyotaka Oku
          Path:
          pom.xml
          src/main/resources/index.jelly
          src/main/webapp/js/terminal.js
          http://jenkins-ci.org/commit/terminal-plugin/f7259751320fc28e672345276f6e9d4031a78ea0
          Log:
          Merge pull request #1 from JoeyJiao/master

          [FIXED JENKINS-18057] Run os cmd needs to use POST method instead of GET

          Compare: https://github.com/jenkinsci/terminal-plugin/compare/2c57e9dab96d...f7259751320f

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kiyotaka Oku Path: pom.xml src/main/resources/index.jelly src/main/webapp/js/terminal.js http://jenkins-ci.org/commit/terminal-plugin/f7259751320fc28e672345276f6e9d4031a78ea0 Log: Merge pull request #1 from JoeyJiao/master [FIXED JENKINS-18057] Run os cmd needs to use POST method instead of GET Compare: https://github.com/jenkinsci/terminal-plugin/compare/2c57e9dab96d...f7259751320f

            People

            • Assignee:
              kiy0taka kiy0taka
              Reporter:
              joeyjiao Joey Jiao
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: