Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

java.sql.SQLException: JZ006 IOException: java.net.ConnectException: Connection refused: connect

2,441 views
Skip to first unread message

Daniel Téllez

unread,
May 23, 2006, 12:39:42 PM5/23/06
to
I'm newbie in Sybase.
I'm trying to connect to Sybase with com.sybase.jdbc2.jdbc.SybDriver
and with the URL 'jdbc:sybase:Tds:liviana:1699/coptsrv', where liviana
is my host and coptsrv is my service name.

i've got an user and a remote user, and i'had tried to connect with
these ones, but nothing.

always the same error.

someone knows why ?

-----
sorry but my painful english

J

unread,
May 23, 2006, 2:34:32 PM5/23/06
to
On 23 May 2006 09:39:42 -0700, =?ISO-8859-1?Q?Daniel_T=E9llez?=
<daniel...@yerbabuena.es> wrote:


Please paste some more details in this problem. Your whole errror
message is not in the subject line that I am able to read:

Complete error message.
SQLWarnings?
What version of Server? ASE or ASA
Did you install the proper metadata for the server from
jConnect-5_5/sp directory?
What version of jConnect?
Can you connect to the server with isql or jisql?

Jay

Daniel Téllez

unread,
May 23, 2006, 3:09:03 PM5/23/06
to J...@bogusemailaddress.com
J escribió:

> On 23 May 2006 09:39:42 -0700, =?ISO-8859-1?Q?Daniel_T=E9llez?=
> <daniel...@yerbabuena.es> wrote:
>
>
> Please paste some more details in this problem. Your whole errror
> message is not in the subject line that I am able to read:
>
> Complete error message.
java.sql.SQLException: JZ006: Se ha detectado IOException:
java.net.ConnectException: Connection refused: connect

> SQLWarnings?
> What version of Server? ASE or ASA
Sybase (not ASE) v5.5.04

> Did you install the proper metadata for the server from
> jConnect-5_5/sp directory?
What's that ? I've seen that directory, but i haven't use it.
I have created a network server and i've tried to connect
with jconnect 5_5.
I neither know if is necesary to create a new different user
for use with that connection...

> What version of jConnect?
5.5


> Can you connect to the server with isql or jisql?

i didn't tried it


>
> Jay
>
>> I'm newbie in Sybase.
>> I'm trying to connect to Sybase with com.sybase.jdbc2.jdbc.SybDriver
>> and with the URL 'jdbc:sybase:Tds:liviana:1699/coptsrv', where liviana
>> is my host and coptsrv is my service name.
>>
>> i've got an user and a remote user, and i'had tried to connect with
>> these ones, but nothing.
>>
>> always the same error.
>>
>> someone knows why ?
>>
>> -----
>> sorry but my painful english
>

What I want to do is to connect to my local database through jdbc,
I say it just in case you need it.

thanks for your time and sorry again for my english.

J

unread,
May 23, 2006, 4:54:58 PM5/23/06
to
On 23 May 2006 12:09:03 -0700, =?ISO-8859-1?Q?Daniel_T=E9llez?=
<daniel...@yerbabuena.es> wrote:

I'm not an expert on ASA setup. Connection refused means that the
attempt to connect to liviana:1699 means that no one was listening to
the port 1699 on hostname liviana. Does netstat show a listener?

If you try to connect to a bad port (one not having a listener because
you have nothing running there like liviana:4567), do you get the
idential error messages.

Maybe someone with a little more SQL Anywhere knowledge might be able
to tell us if there is some level of tracing.

jConnect only talks to TCP and SQL Anywhere 5.5 needs the network
server I understand because it maps the TCP to the SQL Anywhere. I
don't think you pass the service name to the ASA server with url the
way you have it specified at all levels.
'jdbc:sybase:Tds:liviana:1699/coptsrv' where coptsrv is the
servicename.

You can use the servicename property on the connection options in
jConnect.

Jay

Daniel Téllez

unread,
May 23, 2006, 5:22:34 PM5/23/06
to J...@bogusemailaddress.com
J escribió:

> On 23 May 2006 12:09:03 -0700, =?ISO-8859-1?Q?Daniel_T=E9llez?=
> <daniel...@yerbabuena.es> wrote:
>
> I'm not an expert on ASA setup. Connection refused means that the
> attempt to connect to liviana:1699 means that no one was listening to
> the port 1699 on hostname liviana. Does netstat show a listener?
>
> If you try to connect to a bad port (one not having a listener because
> you have nothing running there like liviana:4567), do you get the
> idential error messages.
>
> Maybe someone with a little more SQL Anywhere knowledge might be able
> to tell us if there is some level of tracing.
>
> jConnect only talks to TCP and SQL Anywhere 5.5 needs the network
> server I understand because it maps the TCP to the SQL Anywhere. I
> don't think you pass the service name to the ASA server with url the
> way you have it specified at all levels.

I had created a service that was listening on UDP port.
I was thinking that there was the problem, but i don't know
how to specify to dbsrv50 the appropriate protocol.
The parameters that i've used are:

-n COPTSRV
-x tcpip
C:\docume~1\daniel~1\misdoc~1\Copt.db

With these parameters, the server listen at 1498 UDP port.

Putting that: -x tcpip{myip=xxxx;port=yyyy} i can control where
listen the server, but not the protocol...

You say that I must put database name instead of servicename... ok.
It was the first I putted ... but testing and testing ...

Thanks for your time.
I think that the only i need at this moment is to know how
to specify the protocol to the service .

Daniel Téllez

unread,
May 24, 2006, 3:59:25 AM5/24/06
to Daniel Téllez, J...@bogusemailaddress.com
I've tried to connect with jisql, but i received the same error.
I've tried to configure the Windows XP firewall ... but nothing.
All i can do now is to cry...


Daniel Téllez escribió:

J

unread,
May 24, 2006, 11:18:21 AM5/24/06
to
On 23 May 2006 14:22:34 -0700, =?ISO-8859-1?Q?Daniel_T=E9llez?=
<daniel...@yerbabuena.es> wrote:

Try posting on one of the SQL Anywhere newsgroups. The problem is
getting SQL Anywhere network server to listen to the proper TCP port
and jConnect cannot help there.

jblackx...@yahoo.com

unread,
Jun 17, 2006, 3:10:45 PM6/17/06
to
I was stupid and had the server configured with -x namedpipes. Make
sure your server is listening on tcpip so jConnect can connect.

Best,

lname>R

cjyothi...@gmail.com

unread,
Apr 12, 2019, 4:04:52 AM4/12/19
to
Hi I was facing the same issue.could you please suggest me how i can verify whether the server is connecting to the tcpip port and all.If the resolved can u post the solution please.

Thanks
0 new messages