Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

dispatch yields NullPointerException and fails

#553
  • Issue Type: Bug
  • Rundeck version: 1.4.1

Issue:

java.lang.NullPointerException occurs after executing dispatch that resolves to many hosts either by a tag list or specific list of names. In my debugging, it appears to happen when the resolved set of nodes is 48 or more:

java.lang.NullPointerException
at com.dtolabs.client.utils.HttpClientChannel.makeRequest(HttpClientChannel.java:356) at com.dtolabs.client.services.ServerService.makeRundeckRequest(ServerService.java:134) at com.dtolabs.client.services.ServerService.makeRundeckRequest(ServerService.java:97) at com.dtolabs.client.services.RundeckAPICentralDispatcher.reportExecutionStatus(RundeckAPICentralDispatcher.java:179) at com.dtolabs.rundeck.core.cli.ExecTool.runAction(ExecTool.java:576) at com.dtolabs.rundeck.core.cli.ExecTool.run(ExecTool.java:414) at com.dtolabs.rundeck.core.cli.ExecTool.main(ExecTool.java:722)

The following commands have triggered the error:

dispatch -C 5 -I tags='qa[0-9]+,int[0-9]+,rgs[0-9]+' -L -- hostname

dispatch -C 5 -I tags='qa1,int1,rgs1,qa2,int2,rgs2,qa3,int3,rgs3,qa4,int4,rgs4,qa5,int5,rgs5,qa6,int6,rgs6,qa7,int7,rgs7,qa8,int8,rgs8,qa9,int9,rgs9' -L -- hostname


Reproduce: (Enter steps to reproduce bug here.)

When using the -I name= parameter,
and set the list to 48 names or longer, we get the NPE

47 works.

Example:

this fails:

dispatch -C 5 -I name='pbintrk1v,pbqark1v,pbqark2v,pbqark3v,pbqark4v,pbqark5v,pbqark6v,pbqark7v,pbqark8v,pbrgsrk1v,pkintrk1v,pkqark1v,pkqark2v,pkqark3v,pkqark4v,pkqark5v,pkqark6v,pkqark7v,pkqark8v,pkrgsrk1v,ptintrk1v,ptqark1v,ptqark2v,ptqark3v,ptqark4v,ptqark5v,ptqark6v,ptqark7v,ptqark8v,ptrgsrk1v,weintrk1v,weqark1v,weqark2v,weqark3v,weqark4v,weqark5v,weqark6v,weqark7v,weqark8v,wergsrk1v,wsintrk1v,wsqark1v,wsqark2v,wsqark3v,wsqark4v,wsqark5v,wsqark6v,pbdevrk1v' -L -- hostname

this works (with one fewer node name)

dispatch -C 5 -I name='pbintrk1v,pbqark1v,pbqark2v,pbqark3v,pbqark4v,pbqark5v,pbqark6v,pbqark7v,pbqark8v,pbrgsrk1v,pkintrk1v,pkqark1v,pkqark2v,pkqark3v,pkqark4v,pkqark5v,pkqark6v,pkqark7v,pkqark8v,pkrgsrk1v,ptintrk1v,ptqark1v,ptqark2v,ptqark3v,ptqark4v,ptqark5v,ptqark6v,ptqark7v,ptqark8v,ptrgsrk1v,weintrk1v,weqark1v,weqark2v,weqark3v,weqark4v,weqark5v,weqark6v,weqark7v,weqark8v,wergsrk1v,wsintrk1v,wsqark1v,wsqark2v,wsqark3v,wsqark4v,wsqark5v,wsqark6v' -L -- hostname

Reported by Charles Scott · April 9th, 2012 @ 02:17 PM

State: new
Milestone: none
Assigned to: Greg Schueler Greg Schueler

Activity

  1. Charles Scott
  2. Greg Schueler
    Greg Schueler

    I see that if the content is too large, the API call receives a HTTP 413 result, as it is using GET instead of POST.

    the API client code was throwing NPE in the case that there is not Content-Type in the result.

    the fix will be to prevent NPE in that case, and to change the API call to use POST.

    April 9th, 2012 @ 05:28 PM

  3. Greg Schueler
    Greg Schueler

    FYI: workaround is to not use dispatch with "-L" flag.

    April 9th, 2012 @ 05:31 PM

  4. Greg Schueler
    Greg Schueler
    • State changed from new to needs_verification
    • Tag set to bug, dispatch
    • Milestone set to Rundeck 1.4.3
    • Milestone order changed from 124 to 0

    April 9th, 2012 @ 07:11 PM

  5. Greg Schueler
    Greg Schueler
    • State changed from needs_verification to resolved
    • Milestone order changed from 33 to 0

    May 16th, 2012 @ 06:30 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.