[Mulgara-general] Can't connect to remote Mulgara repository using ConnectionFactory

Life is hard, and then you die ronald at innovation.ch
Thu Nov 20 02:49:20 UTC 2008


On Thu, Nov 20, 2008 at 02:15:23AM +0000, David Legg wrote:
> 
> I've installed WireShark and fully disabled the Windows firewall 
> (instead of just enabling port 1099 like last time).  I'm still getting 
> the same exception but WireShark shows some sort of two way RMI 
> interaction going on between the client and server: -
> 
>   RMI  JRMI, ReturnData
>   TCP  hotu-chat > rmi registry [ACK]
>   RMI  JRMI, Ping
>   RMI  JRMI, PingAck
>   RMI  JRMI, DgcAck
>   RMI JRMI, Ping
>   TCP rmi registry > hotu-chat [ACK]
>   RMI  JRMI, PingAck
>   RMI  JRMI, Call
>   RMI  JRMI, ReturnData
>   RMI  JRMI, Ping
>   RMI  JRMI, PingAck
>   RMI  JRMI, DcgAck
>   TCP  rmi registry > hotu-chat [ACK]
>   TCP  hotu-chat > rmi registry [RST, ACK]
> 
> That looks like the two machines are talking to each other OK although 
> that last entry is coloured Red which indicates a Reset.

Those JRMI calls, I presume they are on port 1099 (i.e. talking to the
registry)? And there are no other attempts to create connections from
the client to the server on other ports? Because the ConnectException
"Connection refused: connect" really means it failed to create a TCP
connection, and that should show up as at least a SYN (from client to
server) and probably a RST in the reverse direction (make sure you
don't filter out too much traffic in wireshark).


  Cheers,

  Ronald


> Life is hard, and then you die wrote:
> > On Thu, Nov 20, 2008 at 12:32:54AM +0000, David Legg wrote:
> >   
> >> I'm having trouble getting a test program to talk to a remote Mulgara 
> >> repository and wondered if anyone has any suggestions.
> >>
> >> The test program is based on the one mentioned on the Wiki [1] and 
> >> explicitly located here [2]
> >>
> >> This is my first attempt to use the ConnectionFactory and it looks like 
> >> it is falling over somewhere in the call to 
> >> org.mulgara.connection.ConnectionFactory.newConnection().  I'm using the 
> >> latest revision from SVN (revision 1378) on the server side and an 
> >> identical set of jar files on the client side.
> >>
> >> Thinking that perhaps I've got the wrong URL I've tried all sorts of 
> >> combinations from rmi://optimus:1099/server1 to 
> >> rmi://192.168.1.10/server1 but it makes little difference to the 
> >> result.  I've disabled firewalls and I've even run telnet to see if I 
> >> could access the remote port (which I could).  I've also run netstat -l 
> >> on the remote (Ubuntu) server and it lists something listening on port 
> >> 1099 (well, actually it says :::1099 which makes me think it is an IPv6 
> >> port).  I know the server is working because I can see the web interface 
> >> if I view http://optimus:8080 either locally on the server or remotely 
> >> from my laptop.
> >>     
> > [snip]
> >   
> >> DEBUG [main] (SessionConnection.java:273) - Finding session factory for rmi://optimus/server1
> >>     
> > [snip]
> >   
> >> Caused by: java.net.ConnectException: Connection refused: connect
> >>     
> > [snip]
> >   
> >>     at java.net.Socket.<init>(Socket.java:179)
> >>     at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
> >>     
> > [snip]
> >
> > Note that RMI uses several ports, not just 1099 one. Specifically,
> > it'll connect to registry on 1099 first to get the client stubs, but
> > then it'll use random ports to actually do the RMI calls. Now, you say
> > you've disabled firewalls, does that mean you have _all_ ports (all
> > the way up to 65000) open?
> >
> > A couple suggestions:
> >
> >  1. Try starting mulgara with '--rmiobjectport 1099'  (i.e. can be the
> >     same port as used for the registry) - this will cause the actual
> >     RMI calls to use port 1099 too.
> >    
> >  2. Fire up wireshark (or whatever your favorite snooper is) and see
> >     what it's trying to connect to that is failing.
> >
> >
> >   Cheers,
> >
> >   Ronald



More information about the Mulgara-general mailing list