river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregg Wonderly <gr...@wonderly.org>
Subject Re: Finding Service Registrars on Linux
Date Mon, 05 Oct 2009 15:08:11 GMT
Hi Tom, the things that I can think of to look at are the following.

1.  What's the IP address and hostname of the machine?  Does /etc/hosts provide 
conflicting information regarding what hostname is what address, compared to 
what you expect?

2.  How many ip interfaces are actually active.  Is there just one?  Do you have 
configuration in place to select the appropriate interface if there are multiple 
active and you expect them to be active?

3.  Where is stdout and stderr directed?  Are there VM level 
NoClassDefFoundError or other Throwables happening which you can no see and that 
could keep all logging from happening because the code never gets there?

4.  Run the JVM with -verbose to see what classloading activity is occuring, and 
that the appropriate sources of classes are being used (you are overriding the 
ext dir, does that remove something that you need for example).

5.  What does 'netstat -an | grep LISTEN' show you?  Are there appropriate 
sockets listening on the appropriate ports?

Gregg Wonderly

Tom hobbs wrote:
> Hi all,
> Okay, let's just assume that I'm already highly embarrassed about asking 
> this question, but there's only so much banging my head against a wall 
> that I can do.  (And I've so far had, on and off, months of this 
> particular wall!)
> I'm currently suffering from a problem not disimilar to this one;
> http://www.nabble.com/Strange-behavior-of-remote-Linux-Registrar-td13244997.html 
> With the exception that I have only one machine, an Arch Linux laptop, 
> and I can't even grab a ServiceRegistrar.
> Here's the detail;
> The problem first came up a few months ago when I was writing a tutorial 
> for Jeremy.  I can start a reggie which looks like it has come up 
> properly.  But then looking up that reggie fails.
> When using my own script I get "reggie.jar requested from 
> localhost:50504" and similar lines in the HTTPD log.  When using the 
> river httpd.sh script, I don't get that kind of output.
> I've tried explicitly starting rmid (and also leaving it alone) all to 
> no avail.
> Here's the simple lookup code I'm using;
>     LookupLocator lookupLoactor = new LookupLocator("jini://localhost");
>     ServiceRegistrar serviceRegistrar = lookupLoactor.getRegistrar();
> but the call to getRegistrar() never returns.  Even when I supply a 
> timeout to the overloaded method, it never returns.  I don't get any 
> kind of error message/stack trace out of the above code.
> Here's the output from running reggie script;
> $ ./scripts/jrmp-reggie.sh
> + java -Djava.security.policy=config/policy.all 
> -Djava.ext.dirs=../../lib-ext/ -jar ../../lib/start.jar 
> config/start-reggie.config
> 05-Oct-2009 14:34:34 com.sun.jini.reggie.RegistrarImpl init
> INFO: started Reggie: 2b673dfb-726b-4bcb-b9b1-aaeb174d7477, 
> [nonsecure.hello.example.jini.sun.com], jini://localhost/
> Here's the HTTPD output;
> $ ./scripts/httpd.sh
> + java -jar ../../lib/classserver.jar -port 8080 -dir lib:../../lib-dl
> 05-Oct-2009 14:33:08 com.sun.jini.tool.ClassServer run
> INFO: ClassServer started [[lib/, ../../lib-dl/], port 8080]
> The irony of needing some (hopefully, painfully simple) help in order to 
> write a tutorial is not lost on me.
> Does anyone have any forehead-slapping, "Of course"-exclaiming advice 
> for me?
> Thanks,
> Tom

View raw message