This week's book giveaway is in the Beginning Java forum.
We're giving away four copies of Learn Java with Math: Using Fun Projects and Games and have Ron Dai on-line!
See this thread for details.
Win a copy of Learn Java with Math: Using Fun Projects and Games this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Connection Refused

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all. I trying to run a program on Mandrake 10 that uses tomcat. However when I run the program, which executes tomcat.sh, I get a �java.net.ConnectException: Connection refused� which keeps repeating (see last line). Can someone tell me what that is about and how to remedy it? The system printout is below. Thanks.

------------------------------------------------------------
Guessing TOMCAT_HOME from tomcat.sh to /opt/CVWdocserver/jakarta/tomcat/bin/..
Setting TOMCAT_HOME to /opt/CVWdocserver/jakarta/tomcat/bin/..
Using classpath: .:/opt/CVWdocserver/jakarta/tomcat/bin/../lib/ant.jar:/opt/CVWdocserver/jakarta/tomcat/bin/../lib/jasper.jar:/opt/CVWdocserver/jakarta/tomcat/bin/../lib/servlet.jar:/opt/CVWdocserver/jakarta/tomcat/bin/../lib/test:/opt/CVWdocserver/jakarta/tomcat/bin/../lib/webserver.jar:/opt/CVWdocserver/jakarta/tomcat/bin/../lib/xml.jar
[root@localhost CVWdocserver]# Context log: path="/examples" Adding context path="/examples" docBase="webapps/examples"
Context log: path="" Adding context path="" docBase="webapps/ROOT"
Context log: path="/test" Adding context path="/test" docBase="webapps/test"
Starting tomcat. Check logs/tomcat.log for error messages
Starting tomcat install="/opt/CVWdocserver/jakarta/tomcat/bin/.." home="/opt/CVWdocserver/jakarta/tomcat" classPath=".:/opt/CVWdocserver/jakarta/tomcat/bin/../lib/ant.jar:/opt/CVWdocserver/jakarta/tomcat/bin/../lib/jasper.jar:/opt/CVWdocserver/jakarta/tomcat/bin/../lib/servlet.jar:/opt/CVWdocserver/jakarta/tomcat/bin/../lib/test:/opt/CVWdocserver/jakarta/tomcat/bin/../lib/webserver.jar:/opt/CVWdocserver/jakarta/tomcat/bin/../lib/xml.jar"
Context log: path="/admin" Automatic context load docBase="/opt/CVWdocserver/jakarta/tomcat/webapps/admin"
Context log: path="/admin" Adding context path="/admin" docBase="/opt/CVWdocserver/jakarta/tomcat/webapps/admin"
Context log: path="/app" Automatic context load docBase="/opt/CVWdocserver/jakarta/tomcat/webapps/app"
Context log: path="/app" Adding context path="/app" docBase="/opt/CVWdocserver/jakarta/tomcat/webapps/app"
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at org.gjt.mm.mysql.MysqlIO.<init>(MysqlIO.java:114)
at org.gjt.mm.mysql.Connection.<init>(Connection.java:229)
at org.gjt.mm.mysql.Driver.connect(Driver.java:126)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.javaexchange.dbConnectionBroker.DbConnectionBroker.createConn(DbConnectionBroker.java:359)
at com.javaexchange.dbConnectionBroker.DbConnectionBroker.<init>(DbConnectionBroker.java:95)
at org.mitre.cvw.docservlet.DocServlet.init(DocServlet.java:58)
at org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java:315)
at org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:276)
at org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:132)
at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:227)
at org.apache.tomcat.core.ContextManager.init(ContextManager.java:201)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:156)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)
java.net.ConnectException: Connection refused
 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I think the problem is in creating database connection.

Check ur server.xml.Check the whether the database parameters you have given for the appplication "app" is correct or not.

Chandrasekhar
SCJP
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the JDBC forum...
 
Marshal
Posts: 67313
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The connection in question is not a database connection but rather a network connection, so this post was moved to JDBC in error.

I am moving it to the Tomcat forum.
 
Proudly marching to the beat of a different kettle of fish... while reading this tiny ad
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!