RMI on FreeBSD

David Israelsson david at israelsson.org
Thu Nov 20 03:25:19 PST 2003


Sheldon Hearn <sheldonh at starjuice.net> writes:

>> Has anyone had any success with RMI on FreeBSD?  I can't get the most
>> simple test program to work.
>
> RMI has to be working for some cases at least, because it's used heavily
> by JBoss, which works on both -CURRENT and -STABLE (for some definition
> of works).
>
>> The problem is registering to the naming service.
>> java.rmi.Naming.rebind() takes 75 seconds (socket timeout?), and after
>> another 45 seconds the program exits.  No exceptions are thrown.
>
> Sounds like a "network problem", which I realize doesn't help you very
> much.  If you can find out what TCP port on what host it's trying to
> communicate with, you have a chance.
>
> The first thing I always do in these situations is rule out IPv6.  If
> you don't use it, turn it off to rule it out.
>
I've set net.inet6.ip6.v6only to 0, and I've tried to let the program
contact both localhost and 127.0.0.1 (the latter has no ipv6
equivalent).  It does connect, because if I try to run the program
without having started the rmiregistry I get
java.net.ConnectException: Connection refused.

I also checked the network traffic when I tried the same program on a
Linux box where it's working ok.

1: myclass -> rmiregistry: RMIK
2: myclass <- rmiregistry: N     127.0.0.1
3: myclass -> rmiregistry: (sends ip addr followed by the stub (and
                           possibly more, I don't know, it's all
                           binary))
4: myclass <- rmiregistry: (answers with cryptic binary data)
   (wait for some time)
5: myclass -> rmiregistry: EOF
6: myclass <- rmiregistry: EOF
   (disconnect)

On my FreeBSD box, the 75 seconds of waiting appears between step 3
and 4.

How do I turn off ipv6 completely?

    /David


More information about the freebsd-java mailing list