Re: [jgroups-users] In which case Rsp could be null?
Questions/problems related to using JGroups <[email protected]>
| Newsgroups | gmane.comp.java.javagroups.general |
|---|---|
| Message-ID | <[email protected]> |
No, a Rsp element in RspList should *never* be null, as a request to A,B,C creates a RspList with 3 Rsp objects before even sending the RPC. It would be very good if you could reproduce this in a simple test... On 06/04/16 19:46, Questions/problems related to using JGroups wrote: > I use version 3.6.7. > The cluster had 35 nodes when the error happened, but it was under heavy > load. I guess the node got out of the cluster, and was thinking it is > alone)) because this error happens periodically, often, but not always. > By design, the cluster is very chatty. Each node sends requests to every > other node if the file exists on it. So, there are 34 such RPC call was > made, and I'm guessing, none of them got respond in 5 seconds, as it is > configured. > I guess I could increase the timeout for this case, if the cluster grows. > > Thank you for your quick response. > Eugene > > > On Wed, Apr 6, 2016 at 12:15 PM, Questions/problems related to using > JGroups <[email protected] > <mailto:[email protected]>> wrote: > > Hi Eugene > > MessageDispatcher.cast (which is used by > RpcDispatcher.callRemoteMethods) will return null if > real_dests.isEmpty(). In your case, that would happen if the cluster > has a single member. > > Cheers > Dan > > > On Wed, Apr 6, 2016 at 6:32 PM, Questions/problems related to using > JGroups <[email protected] > <mailto:[email protected]>> wrote: > > Hello, > > > > I use RPC, and getting NullPointerException in very unusual place: > > > > Here is my code example: > > > > ----------------- > > > > RspList<Boolean> result = dispatcher.callRemoteMethods(null, > "fileExists", > > new Object[] { localFileName }, new Class[] { String.class }, > > OPT_ALL_IN_5_SEC); > > > > for (Rsp<Boolean> rsp : result.values()) { > > > > if (rsp.getValue()) { > > > > ------------------- > > > > the last line sometimes throws NPE. Looks like rsp is null. > > > > The fileExists method returns primitive boolean, so the result > cannot be > > null by definition. > > > > Looks like something went wrong during the cluster communication. > > > > What could it be? > > > > > > Thanks, > > > > Eugene > > > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > > javagroups-users mailing list > > [email protected] > <mailto:[email protected]> > > https://lists.sourceforge.net/lists/listinfo/javagroups-users > > > > ------------------------------------------------------------------------------ > _______________________________________________ > javagroups-users mailing list > [email protected] > <mailto:[email protected]> > https://lists.sourceforge.net/lists/listinfo/javagroups-users > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > javagroups-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/javagroups-users > -- Bela Ban, JGroups lead (http://www.jgroups.org) ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z