From owner-freebsd-java@FreeBSD.ORG Thu Nov 20 03:25:19 2003 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 72AF616A4CE for ; Thu, 20 Nov 2003 03:25:19 -0800 (PST) Received: from poh.gnapp.org (c-bb8772d5.05-19-73746f42.cust.bredbandsbolaget.se [213.114.135.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2460243FE0 for ; Thu, 20 Nov 2003 03:25:18 -0800 (PST) (envelope-from david@israelsson.org) Received: from hannibal.gnapp.org (localhost [127.0.0.1]) by poh.gnapp.org (8.12.9/8.12.9) with ESMTP id hAKBPJ2U013771 for ; Thu, 20 Nov 2003 12:25:20 +0100 (CET) (envelope-from david@israelsson.org) Received: (from david@localhost) by hannibal.gnapp.org (8.12.9/8.12.9/Submit) id hAKBPJGA013770; Thu, 20 Nov 2003 12:25:19 +0100 (CET) X-Authentication-Warning: hannibal.gnapp.org: david set sender to david@israelsson.org using -f To: freebsd-java@freebsd.org References: <87fzgjbdnq.fsf@poh.gnapp.org> <20031120095224.GR11487@starjuice.net> From: David Israelsson Date: Thu, 20 Nov 2003 12:25:18 +0100 In-Reply-To: <20031120095224.GR11487@starjuice.net> (Sheldon Hearn's message of "Thu, 20 Nov 2003 11:52:24 +0200") Message-ID: <877k1vb7tt.fsf@poh.gnapp.org> User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Reasonable Discussion, berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: RMI on FreeBSD X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Nov 2003 11:25:19 -0000 Sheldon Hearn 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