Forums de discussion

Urgent Cant Access Tomcat Service on 8080 but can access IIS on port 80

Daniel M Scott, modifié il y a 14 années.

Urgent Cant Access Tomcat Service on 8080 but can access IIS on port 80

Junior Member Publications: 51 Date d'inscription: 07/07/09 Publications récentes
Hi Guys

Let me explain the situation, ive borrowed a dev server from someone in my company (server name madrid), there a dev team in building 5 (this will become important soon i promise) basically i must be in building 5 to remote desk top to the server, server is windows 2003. The server also runs IIS on port 80. We use asp.net apps normally but choose liferay as its pretty cool.

Ok heres the issue. I installed my tomcat service which was in my liferay bundle, on port 8080, on the c drive of the server, first time i did this everyone from outside building 5 could browse to the server even from other locations like glasgow by using the http://serverip:8080 and it worked fine. I had to uninstall and reinstall the service and restart the server. Now no one outside of building 5 can browse to my liferay on madrid:8080 or http://serverip:8080. If your in building 5 it works fine.

Ok, so your thinking firewall right, but no, because IIS works on Port 80 so the firewall must be open, and if i go to http://serverip/test.asp it loads up the test.asp page inside IIS from anywhere on the network, even in other locations like newcastle.

I have tried stopping the IIS default web, i have also tried stopping IIS completly but still no luck. I have also tried setting server.xml to 80, but this didnt work. I have checked the port using netstat -o to see what was process was using port 8080, its tomcat, and port is listening.

Can someone help, im really stuck and not sure what else to do.
thumbnail
Ziggy ., modifié il y a 14 années.

RE: Urgent Cant Access Tomcat Service on 8080 but can access IIS on port 8

Expert Publications: 293 Date d'inscription: 08/06/08 Publications récentes
You didnt actually say where the server was. You said that you have to "remote desktop" to it from building 5 which suggests the server is somewhere else. Dont forget that accessing it using remote desktop is the same as accessing it locally. Which could explain why you can remote desktop to it from building 5? Are people outside of building 5 also using remote desktop? Can you access it using http://serverip:8080 from within building 5 (Not remote desktop)? Can people outside building 5 remote desktop to it?

Are you sure it worked the first time? The reason i ask is that most firewalls would allow port 80 by default but not 8080.
If you are sure it did then it sounds like a caching problem. What happens if you try a different port number like 8087?

Port 80 is slightly specialised and you cant share it with IIS and Tomcat at the same time.

One quick way of testing whether you can access a server from somewhere using port 8080 is to telnet to it. I think the command is something like this (change the IP address to your ip address)


telnet 195.21.8.8 8080



Try it locally from building 5 and then try it externally outside of building 5. If it times out then it means you dont have access to it. Try with port 80 as well.
Daniel M Scott, modifié il y a 14 années.

RE: Urgent Cant Access Tomcat Service on 8080 but can access IIS on port 8

Junior Member Publications: 51 Date d'inscription: 07/07/09 Publications récentes
Hi Ziggy

Thanks for the reply, i have a bad feeling i know what the answer is.

First time round installed my lferay using tomcat 5.5 server which was already installed on the sever, it had been used for something else and i put my code in the root of the server.

Whilst it worked to an extent it wouldnt run the chat portlets and webforms from tomcat 5.5, and i wanted to run my ext enviroment as the service where i had fixed this all to work. I then put this on the sever and an now running this.

I think the reason it worked before is beacause you can infact use IIS with Tomcat and forward your java requests to tomcat, so tomcat would work on 8080, and IIS on port 80. I believe that the tomcat 5.5 was confugured to do this using a similar tutorial to this
IIS with tomcat

However when i installed my new service for tomcat 6 i had to delete the tomcat 5 in the service via regedit which this was in, but the tomcat 5.5 installation is still there and i can check the folders to see if the redirector files exist, if they do and if i can also see the virtual directory for Jakarta inS i know that this is probably how it worked first time round, and not now.

Thanks for the response, ill let you know how it goes.

Dan
thumbnail
Ziggy ., modifié il y a 14 années.

RE: Urgent Cant Access Tomcat Service on 8080 but can access IIS on port 8

Expert Publications: 293 Date d'inscription: 08/06/08 Publications récentes
Yes sounds like that is the problem. Sounds like its a tomcat JK2 connector setup. I didnt realise you could forward requests to Tomcat from IIS. I knew it was possible with Apache but didnt know it can be done with IIS as well.

Anyway have fun fixing it.. emoticon
thumbnail
Ziggy ., modifié il y a 14 années.

RE: Urgent Cant Access Tomcat Service on 8080 but can access IIS on port 8

Expert Publications: 293 Date d'inscription: 08/06/08 Publications récentes
I had a quick look and it looks like its the same as its done with Apache.

Basicly you just configure IIS to forward specific requests to Tomcat. IIS would know this because in the configuration you have to tell IIS which urls will be handled by Tomcat.

For IIS to talk to Tomcat there must be a Tomcat JK2 Connector installed on the server which IIS uses to talk to tomcat on port 8009.

Using this setup port 8080 is usually not used. Everything goes through port 80 and any tomcat requests are sent to tomcat through port 8009 locally (Using AJPv protocol).


Unfortunately i've not setup the tomcat JK2 connector with IIS before so i cant really be of much help.
This might help..
http://cephas.net/blog/2004/06/25/getting-iis-5x-tomcat-5x-to-play-nice/
thumbnail
Lisa Simpson, modifié il y a 14 années.

RE: Urgent Cant Access Tomcat Service on 8080 but can access IIS on port 8

Liferay Legend Publications: 2034 Date d'inscription: 05/03/09 Publications récentes
When I upgrade or change versions, I do it this way... Mind you this is on Ubuntu but you should be able to do much the same on windows.

All my start scripts, kill scripts, etc. point to /opt/liferay/tomcat/bin

Time for upgrade...

I move the current version to liferay-bundle-and-version-stuff-old
I put in the current version and create a symlink to it in /opt called "liferay"
Inside the bundle I create a symlink called "tomcat" to tomcat folder

That way I have my old one if I need to harvest stuff out of the config files, like connectors and other goodies.