java.sql.SQLException: JZ006: Caught IOException: java.net.UnknownHostException:
xxx.com
at com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:485)
at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3064)
at com.sybase.jdbc2.tds.Tds.login(Tds.java:394)
at com.sybase.jdbc2.jdbc.SybConnection.tryLogin(SybConnection.java:219)
at
com.sybase.jdbc2.jdbc.SybConnection.regularConnect(SybConnection.java:195)
at com.sybase.jdbc2.jdbc.SybConnection.<init>(SybConnection.java:174)
at com.sybase.jdbc2.jdbc.SybConnection.<init>(SybConnection.java:126)
at com.sybase.jdbc2.jdbc.SybDriver.connect(SybDriver.java:179)
I was wondering anyone seen this exception before and have any suggestions. It
looks like after while the driver is corrupted and cannot make outgoing
connections. We have sniffed the network and do not see any outgoing requests on
the wire from the application to the server.
Note that
1- we are not using weblogic connection pool, but directly using the driver to
create connections and close.
2- the same application is running fine on the other identical weblogic
configurations on the same and different servers.
Thanks in advance for any help.
Sazi
---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp
You could put in the IP address assuming it does not ever
change and you should be less likely to see this type of
failure.
The only other possible thing to check is how you are
passing the hostname to your application. Maybe this is
corrupt?
Thanks for the reply. We have checked the network connection there is no issue
that we can see. By the way there are other app servers running on the same
server without any problem.
Here is the interesting part... we can recreate this problem by adding 115
connections to Oracle (Yes Oracle), as soon as we have 115 connections to oracle
the sybase driver giving this error. We reproduce this several times..
Any more ideas? Do you think this may be related to OS kernel parameters? Thanks
again.
Sazi
On 6 Nov 2003 05:46:33 -0800,
in sybase.public.jconnect50
Sazi wrote:
>
> Thanks for the reply. We have checked the network connection there is no issue
> that we can see. By the way there are other app servers running on the same
> server without any problem.
>
> Here is the interesting part... we can recreate this problem by adding 115
> connections to Oracle (Yes Oracle), as soon as we have 115 connections to oracle
> the sybase driver giving this error. We reproduce this several times..
>
> Any more ideas? Do you think this may be related to OS kernel parameters? Thanks
> again.
Is this on Solaris? It sounds maybe like the OS process is running out of file
descriptors.
Joe Weinstein at BEA
Sazi
On 6 Nov 2003 10:09:07 -0800,
in sybase.public.jconnect50
Sazi wrote:
> Joe,
> It is on Solaris and the file descriptors are set to 8096. I did not see any
> other error messages other then Sybase exception.
Ok, show me your pool definition. Is this happening at startup, or is
the pool being required to make connections at runtime?
I do not have connection pool for Sybase, it is accessed via DriverManager in
the application code (there is some reason for this that I will not go into
now), but I have a Oracle Pool.
Here how it happens:
Configured 115 Oracle connections properly created when weblogic comes up. There
is no Sybase connection at this time. Then I run a client which tries to access
Sybase (using DriverManager to get connectione etc) and it fails with the
exception I have sent earlier. The I go and lower the number of Oracle
connections to 100, run the same client and it works fine.
I will send you both the relevant section of the code for Sybase and the pool
for Oracle, first thing in the morning - I do not have access them now. And
thanks for taking time to look into this.
Sazi
On 6 Nov 2003 11:30:55 -0800,
Sazi wrote:
> Joe,
>
> I do not have connection pool for Sybase, it is accessed via DriverManager in
> the application code (there is some reason for this that I will not go into
> now), but I have a Oracle Pool.
>
> Here how it happens:
> Configured 115 Oracle connections properly created when weblogic comes up. There
> is no Sybase connection at this time. Then I run a client which tries to access
> Sybase (using DriverManager to get connectione etc) and it fails with the
> exception I have sent earlier. The I go and lower the number of Oracle
> connections to 100, run the same client and it works fine.
>
> I will send you both the relevant section of the code for Sybase and the pool
> for Oracle, first thing in the morning - I do not have access them now. And
> thanks for taking time to look into this.
> Sazi
Well, sure. We want you successful. It's very clearly an OS/JVM issue, because
if you are using Sybase's driver directly to make your connection (successfully
or not), there is no weblogic code in between your DriverManager call and the
DBMS. I *have* regularly seen JVMs run out of file descriptors on Solaris, and
seen customers bumping the per-process limit to 8096 and higher. One test you
could do in your code is to instead of making a Sybase DBMS connection, just
try to open a few simple sockets to the machine running Sybase, to the port
on which sybase is listening for connections:
Socket socket1 = new Socket("DBMS_MACHINE", 5000 ); // if dbms is listening on port 5000
Socket socket2 = new Socket("DBMS_MACHINE", 5000 );
Socket socket3 = new Socket("DBMS_MACHINE", 5000 );
socket1.close(); socket2.close(); socket3.close();
Joe Weinstein at BEA
We have now a workaround, we created a weblogic startup class where we access
all the hosts once and make java.net.getHostnameXXX happy. After that all works
fine. Well we have not tested this solution yet, but tested out of weblogic;
hope that will work with weblogic too.
Thanks again, for your good suggestions.
Sazi
On 6 Nov 2003 16:31:35 -0800,
btw, I would move up to J2SE 1.4.2 much better and faster.
-lance
> rMessage >>>>>>>>.java:485)
> >>>>>>>> at
> >>>>>>>>com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3064)
> >>>>>>>> at
> com.sybase.jdbc2.tds.Tds.login(Tds.java:394) >>>>>>>>
> at
> >>>>>>>>com.sybase.jdbc2.jdbc.SybConnection.tryLogin(SybCo
> nnection >>>>>>>>.java:219)
> >>>>>>>> at
> >>>>>>>>com.sybase.jdbc2.jdbc.SybConnection.regularConnect
> (SybConn >>>>>>>>ection.java:195)
> >>>>>>>> at
> >>>>>>>>com.sybase.jdbc2.jdbc.SybConnection.<init>(SybConn
> ection.j >>>>>>>>ava:174)
Sazi wrote:
> Joe,
> The problem is resolved - and you are right, it is related to resources (file
> descriptors) but the interesting thing is that it is not because JVM does not
> have enough file descriptors allocated, it had 8096 file descriptors.. The
> problem is in java.net classes (jdk 131), and apperently a known bug (Bug Id
> 4417030). Under certain condition, apperently about 250 - 300 active file
> descriptors the java.net throws UnknownHost exception, if you try to connect to
> a new host/server.
>
> We have now a workaround, we created a weblogic startup class where we access
> all the hosts once and make java.net.getHostnameXXX happy. After that all works
> fine. Well we have not tested this solution yet, but tested out of weblogic;
> hope that will work with weblogic too.
>
> Thanks again, for your good suggestions.
Glad to help! We want you successful.