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

Set NodeLabel parameter failed, if triggered remotely (from shell)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      Linux Debian6, amd64
      Jenkins 1.430
      Label parameter plugin 0.2.0
      java version "1.6.0_24"
      Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
      Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode
    • Similar Issues:

      Description

      Hi developers,

      I've a problem to trigger a parametrized job from commandline, if a parameter is a Node ...

      Setup:

      a fresh (Test) job: TESTJOBNAME
      enable: This build is parameterized
      add Node
      define the variable name: HOSTN
      select a/mutliple hosts

      goto "Build Triggers"
      enable Trigger builds remotely (e.g., from scripts)
      -> leave token blank

      goto "Build"
      add "Execute shell"
      fill the field:
      "pwd
      date
      hostname"

      click save

      goto into a shell:
      curl --silent -u USERNAME:PASSWORD --show-error --data 'json={"parameter":[

      {"name":"HOSTN","value":"YOURHOSTNAME"}

      ]}&Submit=Build' 'http://YOURSERVER:8080/job/TESTJOBNAME/build'

      get the error:

      jenkinslaunch ERROR: The Hudson server's response was:
      jenkinslaunch ERROR: <html><head><title>Error 500</title></head><body bgcolor="#ffffff"><h1>Status Code: 500</h1>Exception: <br>Stacktrace: <pre>java.lang.IllegalArgumentException: Failed to instantiate class org.jvnet.jenkins.plugins.nodelabelparameter.NodeParameterValue from

      {"name":"HOSTN","value":"yourhostname"}

      jenkinslaunch ERROR: at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:628)
      jenkinslaunch ERROR: at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:372)
      jenkinslaunch ERROR: at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:368)
      jenkinslaunch ERROR: at org.jvnet.jenkins.plugins.nodelabelparameter.NodeParameterDefinition.createValue(NodeParameterDefinition.java:145)
      jenkinslaunch ERROR: at hudson.model.ParametersDefinitionProperty._doBuild(ParametersDefinitionProperty.java:127)
      jenkinslaunch ERROR: at hudson.model.AbstractProject.doBuild(AbstractProject.java:1571)
      jenkinslaunch ERROR: at sun.reflect.GeneratedMethodAccessor518.invoke(Unknown Source)
      jenkinslaunch ERROR: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      jenkinslaunch ERROR: at java.lang.reflect.Method.invoke(Method.java:597)
      jenkinslaunch ERROR: at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:282)
      jenkinslaunch ERROR: at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
      jenkinslaunch ERROR: at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
      jenkinslaunch ERROR: at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:104)
      jenkinslaunch ERROR: at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      jenkinslaunch ERROR: at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
      jenkinslaunch ERROR: at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
      jenkinslaunch ERROR: at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:234)
      jenkinslaunch ERROR: at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      jenkinslaunch ERROR: at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
      jenkinslaunch ERROR: at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
      jenkinslaunch ERROR: at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
      jenkinslaunch ERROR: at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
      jenkinslaunch ERROR: at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
      jenkinslaunch ERROR: at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
      jenkinslaunch ERROR: at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
      jenkinslaunch ERROR: at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
      jenkinslaunch ERROR: at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
      jenkinslaunch ERROR: at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
      jenkinslaunch ERROR: at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      jenkinslaunch ERROR: at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      jenkinslaunch ERROR: at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      jenkinslaunch ERROR: at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      jenkinslaunch ERROR: at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      jenkinslaunch ERROR: at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      jenkinslaunch ERROR: at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      jenkinslaunch ERROR: at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      jenkinslaunch ERROR: at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
      jenkinslaunch ERROR: at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      jenkinslaunch ERROR: at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      jenkinslaunch ERROR: at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      jenkinslaunch ERROR: at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      jenkinslaunch ERROR: at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      jenkinslaunch ERROR: at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      jenkinslaunch ERROR: at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      jenkinslaunch ERROR: at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
      jenkinslaunch ERROR: at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      jenkinslaunch ERROR: at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:61)
      jenkinslaunch ERROR: at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      jenkinslaunch ERROR: at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      jenkinslaunch ERROR: at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
      jenkinslaunch ERROR: at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      jenkinslaunch ERROR: at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      jenkinslaunch ERROR: at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      jenkinslaunch ERROR: at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      jenkinslaunch ERROR: at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      jenkinslaunch ERROR: at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      jenkinslaunch ERROR: at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      jenkinslaunch ERROR: at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      jenkinslaunch ERROR: at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
      jenkinslaunch ERROR: at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
      jenkinslaunch ERROR: at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
      jenkinslaunch ERROR: at java.lang.Thread.run(Thread.java:662)
      jenkinslaunch ERROR: Caused by: java.lang.IllegalArgumentException: at least one label must be given!
      jenkinslaunch ERROR: at org.jvnet.jenkins.plugins.nodelabelparameter.NodeParameterValue.<init>(NodeParameterValue.java:47)
      jenkinslaunch ERROR: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      jenkinslaunch ERROR: at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      jenkinslaunch ERROR: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      jenkinslaunch ERROR: at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      jenkinslaunch ERROR: at org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:419)
      jenkinslaunch ERROR: at org.kohsuke.stapler.RequestImpl.access$300(RequestImpl.java:75)
      jenkinslaunch ERROR: at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:626)
      jenkinslaunch ERROR: ... 61 more
      jenkinslaunch ERROR: </pre><br><hr size="1" width="90%"><i>Generated by Winstone Servlet Engine v0.9.10 at Thu Sep 15 11:11:40 CEST 2011</i></body></html>jenkinslaunch ERROR: Failed to submit job: 2

        Attachments

          Activity

          konradlorentz Konrad Lorentz created issue -
          domi Dominik Bartholdi made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 141216 ] JNJira + In-Review [ 189495 ]

            People

            • Assignee:
              domi Dominik Bartholdi
              Reporter:
              konradlorentz Konrad Lorentz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: