ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Hill <greg.h...@RACKSPACE.COM>
Subject Re: NullPointerException when posting a Request
Date Mon, 07 Dec 2015 17:43:26 GMT
So, looking at our code a bit more, we submit multiple requests in parallel, and only one of
them failed with the 500 error.  Perhaps a locking (or lack thereof) issue?  I can adjust
our workflow to prevent the parallel submission as a workaround, but seems like Ambari should
be able to handle it.

Greg

From: Greg <greg.hill@rackspace.com<mailto:greg.hill@rackspace.com>>
Reply-To: "user@ambari.apache.org<mailto:user@ambari.apache.org>" <user@ambari.apache.org<mailto:user@ambari.apache.org>>
Date: Monday, December 7, 2015 at 11:28 AM
To: "user@ambari.apache.org<mailto:user@ambari.apache.org>" <user@ambari.apache.org<mailto:user@ambari.apache.org>>
Subject: COMMERCIAL:NullPointerException when posting a Request

Our product provisions clusters in an automated way using Ambari.  About 1 in 50 clusters
gets this error, so we're not sure exactly how to reproduce it.  It might be a race condition
of some sort.  One of the first things we do is run a set of custom actions on all the nodes
in the cluster.  We do that by POST'ing a request to the cluster.  Randomly that request will
throw a 500 error with this NullPointerException:

https://gist.githubusercontent.com/jimbobhickville/62176c2053827a90efab/raw/34fec22ff0fda2056090377ca432b18f58073d9a/gistfile1.txt

This is on Ambari 2.1.1

The code path looks pretty normal, but I'm not much of a Java dev so there could be something
that isn't obvious to me.  It's just looking up the current cluster in the database by name.
 Doing a GET /clusters/<cluster-id> works fine at the same point in the process, afaict,
so I don't see how it's getting a NullPointerException when doing it internally.

Is this a known issue?  Is there a workaround or way to tell when it's safe to issue the request?

Greg

Mime
View raw message