You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by "Rafn, Mark" <MR...@stanleyworks.com> on 2009/01/26 17:22:14 UTC
Trouble connecting to Network Server
~hey all
I am now trying to port my application to a multi-user environment using
Derby, and I am having some trouble connecting to the server. I am
getting a connection refused error.
I've read the guides and tried several things with no resolution, so I'm
looking for a little hwlp.
Using Derby 10.4.2.0
On the remote computer acting as Server--
StartNetworkServer starts fine with Basic BuiltIn security. I have a
derby.properties file located in the home directory with the following
entries:
derby.connection.requireAuthentication=true
derby.authentication.provider=BUILTIN
derby.user."guest"=guest
I know the user is created, because I have to enter the user and
password to shutdown. So from here all appears to be correct.
I am trying to connect using ij (first off, can ij work with remote
databases?).
within ij I set driver=org.apache.derby.jdbc.ClientDriver. I think I
have classpath to all Derby jars correctly. But when I try to ij>
connect 'jdbc:derby://twoenp11/d:/db/bm_db;user=guest;password=guest';
across a WinNT server i get the following error:
/* ERROR 08001: java.net.ConnectException : Error connecting to server
twoenp11 on
/* port 1527 with message Connection refused: connect.
twoenp11 is the computer name of the "server" and obviously d:/db/bm_db
is the Derby database on the server's D: drive. The Server is actually
another workstation on the network where the StartNetworkServer was
launched. I am successfully using this same workstation as a remote
connection using Borland's JDatastore, so it ~should be allowed with
Derby(?).
Any help would be appreciated!
-mark
Re: Trouble connecting to Network Server
Posted by Kristian Waagan <Kr...@Sun.COM>.
Rafn, Mark wrote:
> ~hey all
Hello Mark,
See my reply below.
>
> I am now trying to port my application to a multi-user environment
> using Derby, and I am having some trouble connecting to the server. I
> am getting a connection refused error.
>
> I've read the guides and tried several things with no resolution, so
> I'm looking for a little hwlp.
>
> Using Derby 10.4.2.0
>
> On the remote computer acting as Server--
> StartNetworkServer starts fine with Basic BuiltIn security. I have a
> derby.properties file located in the home directory with the following
> entries:
> derby.connection.requireAuthentication=true
> derby.authentication.provider=BUILTIN
> derby.user."guest"=guest
> I know the user is created, because I have to enter the user and
> password to shutdown. So from here all appears to be correct.
>
> I am trying to connect using ij (first off, can ij work with remote
> databases?).
Yes, ij can work with remote databases. It is a general tool that can
work with any JDBC driver.
> within ij I set driver=org.apache.derby.jdbc.ClientDriver. I think I
> have classpath to all Derby jars correctly. But when I try to ij>
> connect 'jdbc:derby://twoenp11/d:/db/bm_db;user=guest;password=guest';
> across a WinNT server i get the following error:
>
> /* ERROR 08001: java.net.ConnectException : Error connecting to server
> twoenp11 on
> /* port 1527 with message Connection refused: connect.
>
> twoenp11 is the computer name of the "server" and obviously
> d:/db/bm_db is the Derby database on the server's D: drive. The
> Server is actually another workstation on the network where the
> StartNetworkServer was launched. I am successfully using this same
> workstation as a remote connection using Borland's JDatastore, so it
> ~should be allowed with Derby(?).
You are not telling us how you start the Derby network server.
By default, it only allows connections from localhost. To allow
connections from remote hosts, you must specify the interface/ip you
want Derby to listen on. There is also a special value which makes Derby
listen on any available interfaces on the machine. This should be in the
docs, but if you are using NetworkServerControl to start the server, the
option is -h.
Regards,
--
Kristian
>
> Any help would be appreciated!
> -mark
Re: Trouble connecting to Network Server
Posted by Blair Zajac <bl...@orcaware.com>.
Rafn, Mark wrote:
> ~hey all
>
> I am now trying to port my application to a multi-user environment using
> Derby, and I am having some trouble connecting to the server. I am
> getting a connection refused error.
>
> I've read the guides and tried several things with no resolution, so I'm
> looking for a little hwlp.
>
> Using Derby 10.4.2.0
>
> On the remote computer acting as Server--
> StartNetworkServer starts fine with Basic BuiltIn security. I have a
> derby.properties file located in the home directory with the following
> entries:
> derby.connection.requireAuthentication=true
> derby.authentication.provider=BUILTIN
> derby.user."guest"=guest
> I know the user is created, because I have to enter the user and
> password to shutdown. So from here all appears to be correct.
>
> I am trying to connect using ij (first off, can ij work with remote
> databases?).
> within ij I set driver=org.apache.derby.jdbc.ClientDriver. I think I
> have classpath to all Derby jars correctly. But when I try to ij>
> connect 'jdbc:derby://twoenp11/d:/db/bm_db;user=guest;password=guest';
> across a WinNT server i get the following error:
>
> /* ERROR 08001: java.net.ConnectException : Error connecting to server
> twoenp11 on
> /* port 1527 with message Connection refused: connect.
>
> twoenp11 is the computer name of the "server" and obviously d:/db/bm_db
> is the Derby database on the server's D: drive. The Server is actually
> another workstation on the network where the StartNetworkServer was
> launched. I am successfully using this same workstation as a remote
> connection using Borland's JDatastore, so it ~should be allowed with
> Derby(?).
>
> Any help would be appreciated!
> -mark
See if this helps:
http://db.apache.org/derby/docs/dev/adminguide/cadminnetservsecurity.html
Regards
Blair
--
Blair Zajac, Ph.D.
CTO, OrcaWare Technologies
<bl...@orcaware.com>
Subversion training, consulting and support
http://www.orcaware.com/svn/