aspose file tools*
The moose likes Tomcat and the fly likes Tomcat service on Windows 7 - Cannot access web app from remote computer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat service on Windows 7 - Cannot access web app from remote computer" Watch "Tomcat service on Windows 7 - Cannot access web app from remote computer" New topic
Author

Tomcat service on Windows 7 - Cannot access web app from remote computer

John Halupka
Greenhorn

Joined: Nov 05, 2010
Posts: 4
I have Windows 7 Professional on Dell Vostro 230.

I installed 64-bit Java JDK (jdk-6u22-windows-x64.exe). JAVA_HOME points to 64-bit JDK.

I unzipped Tomcat (apache-tomcat-6.0.29-windows-x64.zip) into Tomcat directory. I did not use installer version.

I installed MySql (mysql-5.1.52-winx64.msi) into MySQL directory. Configured MySQL and imported my app's database.

After some startup.bat changes I got Tomcat to start and to deploy my web app. The web app connects to MySql.

Task manager indicates that both Tomcat6.exe and mysqld.exe are running in 64-bit mode.

I can access the app from a remote computer. All worked as expected.

I shutdown Tomcat.

I then installed Tomcat as a service (ran 'service install' from command prompt run as administrator) and started service.

I can access the app from localhost but not from a remote computer.

Tried telnet [tomcatHost] 8080 - connect failed.

Spent a day looking for answers but no luck.

Anyone have any ideas?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18992
    
    8

Then you don't have network connectivity from that remote computer to your Windows 7 server. The first thing to check is the Windows firewall, to ensure that it's allowing Tomcat to listen on that port and that it allows connections to it from the outside.
John Halupka
Greenhorn

Joined: Nov 05, 2010
Posts: 4
Ah, but I do. That's what's so frustrating about this.

When I run Tomcat using the startup script, I can remotely connect to my web app (http://[tomcatHost]:8080/[myApp]).

But when I run Tomcat as a service, I can't remotely connect.

So there's something about running Tomcat as a service in Windows 7 that's causing this problem.

I even installed the Tomcat service from a command prompt run as administrator.

BTW, I have the same problem with the MySQL service in Windows 7.
John Halupka
Greenhorn

Joined: Nov 05, 2010
Posts: 4
It turned out to be my antivirus/firewall.

The computer came preinstalled with TrendMicro Antivirus.

I checked the firewall settings but couldn't find anything.

So I uninstalled TrendMicro and installed the 64-bit client installer for Symantec Endpoint Protection, everything cleared up.

Thank you for your help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat service on Windows 7 - Cannot access web app from remote computer