tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neil M. Johnson" <njohn...@gds.CA>
Subject Odd Network error using DBCP - help please
Date Fri, 12 Sep 2003 18:29:09 GMT
Hi, I have set up a connection pool to mySQL and get an error when trying to
connect to it.  The error is
   org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Unable to
connect to any hosts due to exception:
   java.net.BindException: Address already in use: connect

The full message follows this text.

This seems a very strange error as it appears to be coming from within the
driver when it tries to make a connection.  I can connect to the database by
loading the driver and connecting directly and this works.  It is only when
I try it through Connection pooling that it fails.

This is a development system set up specifically for this project.  I have
installed MySQL and Tomcat 4.1.27.  I have stopped and restarted the server
several times.

I have also attached the section of XML from server.xml and my web.xml file
for this project (ignore the DBCP prefix).  Any help would be appreciated.

Thanks, Neil


HTTP Status 500 -
type Exception report

message

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

org.apache.jasper.JasperException: java.sql.SQLException: Unable to connect
to any hosts due to exception: java.net.BindException: Address already in
use: connect

at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
54)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)

at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)

at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)

at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)

at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)

at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:392)

at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)

at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)

at java.lang.Thread.run(Thread.java:536)



root cause

org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Unable to
connect to any hosts due to exception: java.net.BindException: Address
already in use: connect

at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:85)

at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect
ionFactory.java:184)

at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown
Source)

at
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool
.java:117)

at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:110)

at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:3
12)

at
org.apache.jsp.PRIPListProfiles_jsp._jspService(PRIPListProfiles_jsp.java:62
)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
10)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)

at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)

at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)

at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)

at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)

at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)

at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:392)

at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)

at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)

at java.lang.Thread.run(Thread.java:536)

Caused by: java.sql.SQLException: Unable to connect to any hosts due to
exception: java.net.BindException: Address already in use: connect

at com.mysql.jdbc.Connection.createNewIO(Connection.java:1622)

at com.mysql.jdbc.Connection.(Connection.java:491)

at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)

at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:83)

... 41 more





----------------------------------------------------------------------------
----

Apache Tomcat/4.1.27






----------------------------------------------------------------------------
----


Mime
View raw message