This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Connection timed out: connect Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Bookmark "Connection timed out: connect" Watch "Connection timed out: connect" New topic
Author

Connection timed out: connect

Betsy Camel
Ranch Hand

Joined: Oct 02, 2003
Posts: 119
hi

i have got a servlet which calls the java class. the java class connects to a server. when i run the java class it gives me the output without problem but when i try to run the servlet it gives me the following error.
java.net.ConnectException: Connection timed out: connect
java.net.PlainSocketImpl.socketConnect(Native Method)
java.net.PlainSocketImpl.doConnect(Unknown Source)
java.net.PlainSocketImpl.connectToAddress(Unknown Source)
java.net.PlainSocketImpl.connect(Unknown Source)
java.net.SocksSocketImpl.connect(Unknown Source)
java.net.Socket.connect(Unknown Source)
java.net.Socket.connect(Unknown Source)
java.net.Socket.<init>(Unknown Source)
java.net.Socket.<init>(Unknown Source)
com.ftp.connect(ftp.java:97)
com.ftp.connect(ftp.java:86)
com.Display.getDetails(Display.java:46)
ControlAction.execute(ControlAction.java:50)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


Can anyone help me. i am behind a firewall but if that is the reason i am getting the error then even the standalone shouldnt have worked. Please help
Betsy Camel
Ranch Hand

Joined: Oct 02, 2003
Posts: 119
I am getting this error in tomcat5. Please help
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Are you running Tomcat under the same username from which you were running the standalone Java program?

If not, does the username under which Tomcat is running have sufficient privileges to see and connect to that server?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
GeeCON Prague 2014
 
subject: Connection timed out: connect