In message <[EMAIL PROTECTED]>, John Collins writes: 
    
    OK. I'm still stuck. I've attached a tar file that exhibits the
    problem. It's about as simple as an RMI app can be.

John,

I've taken a quick look at it. It works OK here on my system -- which
means I haven't been able to help you yet.

I'd like to take a little diversion for a second. In my E-mail to you
I said, "I had no problems registering and running a simple RMI
example on 1.1.5v5." That's not strictly true. I had problems with the
fact that I have multiple interfaces (ppp0 and eth0) on my system. I
had to be careful what I bound to in order for both ends of the
connection to work. I think in general that Java has had problems
handling multiple interfaces cleanly.

I ended up doing a Naming.rebind("//my.full.hostname/TimeServer",
this). But I didn't have the specific problem you're describing. 
Here's the exception you get:

    java.rmi.ServerException: Server RemoteException; nested exception is:
            java.rmi.AccessException: Registry.rebind

The only other hint I can offer you at this point is: look out for DNS
and /etc/hosts problems. Could you type the following and send it to
me privately?
   ^^^^^^^^^
ifconfig -a
cat /etc/hosts
netstat -r

You expressed your conclusions:

    My test on NT involved moving over just the .class files from
    Linux, and that worked, so I deduce the problem is in the Linux
    runtime.

I understand the feeling, but NT and Linux networking are sufficiently
different to warrant doubt in that assumption. One thing you *might*
be able do to help is compile your code with -g (both javac and rmic)
and use the -keepgenerated flag to rmic. You could then run the jdb
source-level, threaded debugger on your server startup and try to dump
some of the data structures that contain IP address information. (I
haven't tried this, and I don't see much to dump!)

This is a demonstration of your code working on an almost identical
system:

$ javac -g *.java
$ rmic -g ServerImpl
$ rmiregistry &
[1] 22374
$ java ServerImpl &
[2] 22410
attempting to bind...
binding succeeded
$ java ServerTest
looking for server...
found the server.
Result: The time is 18-May-98

Good luck,

Steve

Reply via email to