incubator-river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregg Wonderly <ge...@cox.net>
Subject Re: Finding Service Registrars on Linux
Date Wed, 07 Oct 2009 18:40:20 GMT
It would probably be wise to just put

com.sun.jini.level=ALL
net.jini.level=ALL

in your logging config to see where things are stopping at.  This will also 
expose some hidden exceptions that can occur normally and are not considered 
"errors", but in your case might be what you need to deal with.

Gregg Wonderly

Tom hobbs wrote:
> Nope, the mystery deepens...
> 
>         if(null == System.getSecurityManager()) {
>             System.setSecurityManager(new RMISecurityManager());
>         }
> 
> ...is the first thing the simple main method does.  And sysout proves 
> that the if-block is entered.
> 
> Confusing huh?  :-)
> 
> 
> 
> On Tue, 06 Oct 2009 16:46:40 -0000, Dennis Reedy 
> <dennis.reedy@gmail.com> wrote:
> 
>> Maybe a RMISecurityManager is not being created?
>>
>> On Oct 6, 2009, at 141PM, Tom hobbs wrote:
>>
>>> Sort of solved...
>>>
>>> Life just gets more weird.  Which I suppose makes it interesting.  
>>> I'm currently laying the blame for this on Eclipse Galileo.
>>>
>>> As mentioned, when run in Eclipse the code seems to hang on the line;
>>>
>>>     lookupLoactor.getRegistrar();
>>>
>>> Eclipse thinks that the process is still running (at least that's 
>>> what it tells me) but nothing happens and there's no output in any 
>>> log that I can find.
>>>
>>> netstat claims that the right sockets are open;
>>>
>>> e.g.
>>>     tcp        0      0 :::4160                 
>>> :::*                    LISTEN
>>>     tcp        0      0 :::8080                 
>>> :::*                    LISTEN
>>>
>>> However, dropping to the command line and executing the same Java it 
>>> all works as expected.
>>>
>>> Eclipse isn't missing a policy file, that was the first thing I 
>>> checked.  So I'm at a loss to explain what is different in the IDE 
>>> compared to what's different on the command line.
>>>
>>> Thanks to Gregg for writing enough pointers down to give me the idea 
>>> of trying it somewhere else.
>>>
>>> Gah!  This has cost me at least 2 months of motivation to working on 
>>> those tutorials!  I knew I should never have the left the safety of 
>>> the command line and vi.
>>>
>>> Just what is Eclipse doing and how do I find out?
>>>
>>> Cheers,
>>>
>>> Tom
>>>
>>>
>>>
>>> On Mon, 05 Oct 2009 15:08:11 -0000, Gregg Wonderly 
>>> <gregg@wonderly.org> wrote:
>>>
>>>> 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
>>>>>
>>>>
>>>
>>>
>>>
>>> --Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>>
> 
> 
> 


Mime
View raw message