db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Embretsen <John.Embret...@Sun.COM>
Subject Re: remote network server - connection refused
Date Mon, 06 Aug 2007 07:05:57 GMT
Nat Gross wrote:
> Although I am using the -h option on the server, a client still can't 
> connect due to 'connection refused'.
> On machine whose ip address is: <>, I 
> tried
> 1. startNetworkServer -h <>
> 2.startNetworkServer -h <>
> 3.startNetworkServer -h <>
> But when trying to connect from <>, I 
> get the connection refused message.
> The firewall on  the  112  machine is set to allow all traffic from and 
> to the 101 machine.

I believe startNetworkServer (or any of the other scripts) does not pass any 
options you specify on the command line along to the network server, which means 
that the -h option you specified is ignored, and your server will only listen on 
the local loopback interface.

Some possible solutions:

a) Edit the startNetworkServer script to include the -h option (you can either 
hard code the option or make the script more advanced by reading options from 
the command line.)

b) Use derbyrun.jar (available with Derby or newer) instead, for example:
java -jar lib/derbyrun.jar server start -h

c) Invoke the Network Server main class directly, for example:
java -cp lib/derbynet.jar org.apache.derby.drda.NetworkServerControl -h

Besides, I think the first and second values of the -h option you specified will 
not work the way you may think. The -h option specifies which interface the 
server will listen on, so specifying the IP address of another host won't help.
"-h" and "-h" should work, though.

Hope this helps,


View raw message