• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic