You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Anjana Prakash <an...@actian.com> on 2015/12/15 16:52:41 UTC

connection to remote derby using ij fails with java.net.ConnectException

Hi

I want to connect to derby database that is running in a another machine. I am trying to connect using  IJ tool
Using command

"connect 'jdbc:derby://10.4.26.101:1527/aps';"

However this fails with message:
ERROR 08001: java.net.ConnectException : Error connecting to server 10.4.26.100 on port 1,527 with message Connection refused

When on same machine I connect using localhost i.e.
connect 'jdbc:derby://localhost:1527/aps';   It connects successfully.

Appreciate if anyone can guide on same.

Thanks,
Anjana

RE: connection to remote derby using ij fails with java.net.ConnectException

Posted by Anjana Prakash <an...@actian.com>.
Thanks Bryan for follow-up.  Enabling derby.drda.host I could connect to remote database. 

Anjana

-----Original Message-----
From: Bryan Pendleton [mailto:bpendleton.derby@gmail.com] 
Sent: Wednesday, December 16, 2015 6:06 AM
To: derby-dev@db.apache.org
Subject: Re: connection to remote derby using ij fails with java.net.ConnectException

> "connect 'jdbc:derby://10.4.26.101:1527/aps';"
>
> However this fails with message:
>
> ERROR 08001: java.net.ConnectException : Error connecting to server 
> 10.4.26.100 on port 1,527 with message Connection refused

Assuming that your use of '.101' in the first line, and '.100' in the third, was just a typo, then the most likely cause of this problem is a network firewall which is preventing connections on port 1527.

Typically, since the Derby protocol is not that widely used, most network firewalls block it by default, and to connect to a Derby Network Server from another machine you usually have to relax the restrictions of the network devices which are connecting those two machines.

thanks,

bryan



Re: connection to remote derby using ij fails with java.net.ConnectException

Posted by Bryan Pendleton <bp...@gmail.com>.
> “connect 'jdbc:derby://10.4.26.101:1527/aps';”
>
> However this fails with message:
>
> ERROR 08001: java.net.ConnectException : Error connecting to server 10.4.26.100 on port 1,527 with message Connection refused

Assuming that your use of '.101' in the first line, and '.100' in
the third, was just a typo, then the most likely cause of this
problem is a network firewall which is preventing connections on
port 1527.

Typically, since the Derby protocol is not that widely used, most
network firewalls block it by default, and to connect to a Derby
Network Server from another machine you usually have to relax the
restrictions of the network devices which are connecting those
two machines.

thanks,

bryan