Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an Oracle Database at a remote server. I have created a SSH tunnel (using putty) to that remote database server and I am able to access that database server using 127.0.0.1:1521.

I am creating a web application and to test it I execute it at: localhost:8080/WebApplication.

However, every time, I create the putty session, I am unable to access my web application. My tomcat server comes up, but remains inaccessible using the browser.

The localhost automatically gets redirected to a different IP

share|improve this question
2  
What error it shows on the browser. What do you see in the log file. – Soham Chakraborty Jan 17 at 11:39
It keeps on waiting for some IP (which is not 127.0.0.1:8080). The logs also do not get updated. – prabodh prakash Jan 17 at 12:01
After long wait I get "Network Error (tcp_error) A communication error occurred: "Operation timed out" The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time. For assistance, contact your network support team." And the browser address changes from localhost to some different IP – prabodh prakash Jan 17 at 12:04
Can you paste tomcat error log in question after making ssh tunnel. – Suku Jan 17 at 12:38

closed as off topic by SvW, Khaled, Scott Pack, kce, pauska Jan 17 at 19:01

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

2 Answers

When you opened a tunnel, you have to tell your browser to use the putty tunnel as a socks proxy (localhost).

Second thought might be, port 8080 is already in Use by another application.

Maybe "netstat" will help you.

You could clarify the ips and Servernames you are connecting to, eg. ip of your terminal server, ip of your database serverm putty tunnel settings, ports...

Sorry, I cannot add a comment like Soham Chakraborty did.

share|improve this answer

If your web application has any kind of redirection in it, then it is possible that it is giving the redirection to the name of the server. For example, your server is host1, you have a putty session redirecting localhost:8080 to host1:80, you connect to localhost:8080 (which gets redirected), but the web page you get has a redirect or something links that point to host1, that isn't getting translated in the web page, because you aren't doing proxying or translation, just a specific port redirect. So you get a link to host1:80, that you can't reach.

That is a quick guess in the absence of any other information, but I've encountered it before. You may have to set up a proxy, or even a vnc session (or something similar) to get a local web browser to go to local host.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.