You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Propes, Barry L " <ba...@citi.com> on 2010/08/13 22:07:38 UTC

DB configuration and socket error

Hi folks,

This may very well be a DB issue and not a Tomcat issue, and if so, sorry to bother you.

But I thought I'd quickly run it by the folks here for a second opinion.

Using Tomcat 6.0.26, on XP Pro, connecting to Oracle 10.
Now, I have one app that connects fine to an Oracle UNIX server in the northeast region of the country.
I'm trying to connect to a second one (different context info and credentials) in the midwest.

Regions aside, for simple connectivity testing purposes at the moment, I'm not worrying about the context.xml info - I'll address that later.
But for now I'm simply testing a query through the JSP.

Again, I'm assuming it's the Ora DB itself, even though I can successfully either TNSPING it or connect via an Access-ODBC connection to it, from the same machine.

I'm getting the following error in the logs:

ug 13, 2010 2:58:03 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=169870336)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
 at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
 at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
 at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
 at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3678)
 at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:352)
 at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:365)
 at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:547)
 at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:347)
 at java.sql.DriverManager.getConnection(Unknown Source)
 at java.sql.DriverManager.getConnection(Unknown Source)
 at org.apache.jsp.referral_005fsplit_jsp._jspService(referral_005fsplit_jsp.java:95)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
 at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
 at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)

Any help or feedback is appreciated!
Thanks,


Barry

RE: DB configuration and socket error

Posted by "Propes, Barry L " <ba...@citi.com>.
Yeah, sorry, Chris...it probably is moreso Oracle related in nature than Tomcat. I just thought I'd make sure about that before I addressed it with the one set of Oracle personnel in the midwest location.

I'm hardly an Oracle expert, but the only difference to my knowledge on these two different servers is that one is on an HP Solaris and the other running on an IBM AIX, I think it is.

They have different types of auditing software, but nothing that should specifically inhibit connectivity like this.

I'll try to address it on Oracle's forum and see if anyone can shed light on the 12505 error.

Thanks!



-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net]
Sent: Friday, August 13, 2010 4:28 PM
To: Tomcat Users List
Subject: Re: DB configuration and socket error

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Barry,

On 8/13/2010 4:07 PM, Propes, Barry L wrote:
> ug 13, 2010 2:58:03 PM org.apache.catalina.core.StandardWrapperValve
> invoke
> SEVERE: Servlet.service() for servlet jsp threw exception
> java.sql.SQLException: Io exception: Connection
> refused(DESCRIPTION=(TMP=)(VSNNUM=169870336)(ERR=12505)(ERROR_STACK=(E
> RROR=(CODE=12505)(EMFI=4))))

Does Oracle have any information on what error 12505 means?

If you're calling DriverManager.getConnection() and passing a URL plus username and password, then Tomcat has nothing at all to do with this, unless you're running under a SecurityManager, in which case you'd be getting SecurityExceptions also.

That doesn't necessarily mean we can't help. It just makes it off-topic ;)

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxluPkACgkQ9CaO5/Lv0PApbQCfUoCMQXlVedNxRBPPGA8pbADO
jgIAoJu3c/4nMjWFCgO8/rIXRaXQvZwt
=efLQ
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: DB configuration and socket error

Posted by "Propes, Barry L " <ba...@citi.com>.
BTW, Chris, I did happen to be calling DriverManager.getConnection() passing the user/pwd params -- in this instance.

And 12505, according to the Oracle forums, seems to be some kind of listener problem.

I had reckoned that the problem might be with their (the midwest center's) Oracle server's ports, and what its server would allow, or be listening to. Seemed to make sense to me since I could get an ODBC conn via MS Acces and that Ora driver, as well as TNSPING it from the machine in question making the call.

I'm likely going off topic greatly with this, so forgive me if that's the case, but if anyone can affirm this, that's also very helpful.

Thanks, folks!

Barry

-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net]
Sent: Friday, August 13, 2010 4:28 PM
To: Tomcat Users List
Subject: Re: DB configuration and socket error

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Barry,

On 8/13/2010 4:07 PM, Propes, Barry L wrote:
> ug 13, 2010 2:58:03 PM org.apache.catalina.core.StandardWrapperValve
> invoke
> SEVERE: Servlet.service() for servlet jsp threw exception
> java.sql.SQLException: Io exception: Connection
> refused(DESCRIPTION=(TMP=)(VSNNUM=169870336)(ERR=12505)(ERROR_STACK=(E
> RROR=(CODE=12505)(EMFI=4))))

Does Oracle have any information on what error 12505 means?

If you're calling DriverManager.getConnection() and passing a URL plus username and password, then Tomcat has nothing at all to do with this, unless you're running under a SecurityManager, in which case you'd be getting SecurityExceptions also.

That doesn't necessarily mean we can't help. It just makes it off-topic ;)

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxluPkACgkQ9CaO5/Lv0PApbQCfUoCMQXlVedNxRBPPGA8pbADO
jgIAoJu3c/4nMjWFCgO8/rIXRaXQvZwt
=efLQ
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: DB configuration and socket error

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Barry,

On 8/13/2010 4:07 PM, Propes, Barry L wrote:
> ug 13, 2010 2:58:03 PM org.apache.catalina.core.StandardWrapperValve invoke
> SEVERE: Servlet.service() for servlet jsp threw exception
> java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=169870336)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))

Does Oracle have any information on what error 12505 means?

If you're calling DriverManager.getConnection() and passing a URL plus
username and password, then Tomcat has nothing at all to do with this,
unless you're running under a SecurityManager, in which case you'd be
getting SecurityExceptions also.

That doesn't necessarily mean we can't help. It just makes it off-topic ;)

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxluPkACgkQ9CaO5/Lv0PApbQCfUoCMQXlVedNxRBPPGA8pbADO
jgIAoJu3c/4nMjWFCgO8/rIXRaXQvZwt
=efLQ
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: DB configuration and socket error

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Propes, Barry L [mailto:barry.l.propes@citi.com]
> Subject: RE: DB configuration and socket error
> 
> I also did a thread dump with some info -- should I include 
> that in a reply?

Probably not necessary.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: DB configuration and socket error

Posted by "Propes, Barry L " <ba...@citi.com>.
I also did a thread dump with some info -- should I include that in a reply?



-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com]
Sent: Friday, August 13, 2010 3:43 PM
To: Tomcat Users List
Subject: RE: DB configuration and socket error

> From: Propes, Barry L [mailto:barry.l.propes@citi.com]
> Subject: RE: DB configuration and socket error
>
> I will send that on shortly, but if I'm just trying to pass basic
> params (for the DB conn) through the JSP, wouldn't it be ignoring the
> context.xml info?

There's clearly an attempt to establish a connection to the DB; if the credentials or other attributes are incorrect, the attempt will fail - that's what we're seeing in the stack trace.  What's triggering the connection attempt is visible in the stack trace.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: DB configuration and socket error

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Propes, Barry L [mailto:barry.l.propes@citi.com]
> Subject: RE: DB configuration and socket error
> 
> I will send that on shortly, but if I'm just trying to pass basic
> params (for the DB conn) through the JSP, wouldn't it be ignoring the
> context.xml info?

There's clearly an attempt to establish a connection to the DB; if the credentials or other attributes are incorrect, the attempt will fail - that's what we're seeing in the stack trace.  What's triggering the connection attempt is visible in the stack trace.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: DB configuration and socket error

Posted by "Propes, Barry L " <ba...@citi.com>.
I will send that on shortly, but if I'm just trying to pass basic params (for the DB conn) through the JSP, wouldn't it be ignoring the context.xml info?
If I'm not referencing it? (I commented it out for the short term).

-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com]
Sent: Friday, August 13, 2010 3:14 PM
To: Tomcat Users List
Subject: RE: DB configuration and socket error

> From: Propes, Barry L [mailto:barry.l.propes@citi.com]
> Subject: DB configuration and socket error
>
> I'm trying to connect to a second one (different context info and
> credentials) in the midwest.
>
> Regions aside, for simple connectivity testing purposes at the moment,
> I'm not worrying about the context.xml info - I'll address that later.

What's in your webapp's <Context> element (or rather the nested <Resource> element therein) may well be the problem.  Post that, and we'll see if we can help.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: DB configuration and socket error

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Propes, Barry L [mailto:barry.l.propes@citi.com]
> Subject: DB configuration and socket error
> 
> I'm trying to connect to a second one (different context info and
> credentials) in the midwest.
> 
> Regions aside, for simple connectivity testing purposes at the moment,
> I'm not worrying about the context.xml info - I'll address that later.

What's in your webapp's <Context> element (or rather the nested <Resource> element therein) may well be the problem.  Post that, and we'll see if we can help.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org