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

David Legg david.legg at searchevent.co.uk
Thu Nov 20 02:15:23 UTC 2008


Hi Ron,

Thanks for the quick response and the WireShark suggestion!

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.

Regards,
David Legg


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