wood burning stoves 2.0*
The moose likes Tomcat and the fly likes tomcat not contact another server ip address Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "tomcat not contact another server ip address" Watch "tomcat not contact another server ip address" New topic
Author

tomcat not contact another server ip address

Priya Sri
Ranch Hand

Joined: Mar 30, 2004
Posts: 84
Hi all,

i have deployed a war file in tomcat. The war file is supposed to contact a password vault server and give the password for my application.
But it is hanging at the place of connecting to the server ip address.
When we run the same with Run as Java application using main() from RAD/WSAD, it works perfectly and giving the password to us.
we used ipaddress 10.x.x.x in the place of testpvault.abc.com. No Working anyways.
Just hangs at the line in RED below. Not coming exception block also.



We are running tomcat on 8080 port. Do I need to do any configuration/setting in tomcat server.xml for connecting to another IP address or server ?? Please guide me.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

I'd check my firewall settings first.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Priya Sri
Ranch Hand

Joined: Mar 30, 2004
Posts: 84
Can you explain in detail what are the settings that i missed ?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

I don't think that it's Tomcat or the JVM that's causing the connection problems, but the firewall on either one (or both) of the machines, or something in between.

From the machine on which Tomcat is running, can you ping the other machine? Can you connect to it using Telnet? Open a command prompt and try the following two commands (assuming the other machine is running on port 80; otherwise replace the 80 with the right port):

Also, are you aware that you can't access the WEB-INF folder or any file inside it through a web browser?
Priya Sri
Ranch Hand

Joined: Mar 30, 2004
Posts: 84
Tried with ping testpvault.abc.om - Result is ==> Request Timed out.

With telnet testpvault.abc.om 80 - Result is ==> Could not open connection to the host, on port 80: Connect failed

The same code works through RAD - using main() method.
If Firewall exists for that server testpvault.abc.om, it should not be working through RAD also right ??

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

Are you sure that RAD is running on that same machine? Because the ping result verifies that there is a network issue between the two. Now all you need to do is figure out what causes this issue. I would contact my network administrator about that.
Priya Sri
Ranch Hand

Joined: Mar 30, 2004
Posts: 84
Both RAD and Tomcat on same machine.

ping testpvault.abc.om - Result is ==> Request Timed out.
telnet testpvault.abc.om 80 - Result is ==> Could not open connection to the host, on port 80: Connect failed

With RAD, it works. Tomcat - Does not work !!


Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

I repeat myself:
Rob Spoor wrote:I would contact my network administrator about that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tomcat not contact another server ip address
 
Similar Threads
Some errors
Problem with URLConnection class
java.net Socket port number question
JBOSS 4.3.0 EAP Clustering with Apache HTTP Server 2.2.11
web application authentication issue