• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Apache Tomcat 6.0 for Windows error

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've installed Apache Tomcat 6.0 for Windows as a service.

However, when I go to http://localhost:8080/ to view the default page I get this cryptic error:

The device does not recognize the command.

I haven't been able to find anything about this problem.

Anyone here have any ideas?
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If it were me, I'd uninstall Tomcat as a service. It'll be a lot easier to deal with as a standalone installation.

I'd unzip the Tomcat installation somewhere convenient and start it up using the bin/startup.bat script.

This should give you a console window where you will be able to see log messages that may give you a clue as to what is going awry.

Where is the cryptic message appearing? In the browser window when you hit localhost? Any other details?
[ November 10, 2007: Message edited by: Bear Bibeault ]
 
Donnie Walker
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I uninstalled it, downloaded the zip version from the Apache site. Unzipped it to c:\tomcat, changed my enviromental variables, ran c:\tomcat]\bin\startup.bat from the command line and Tomcat said it loaded.

I went to http://localhost:8080 in my browser and got the same error. Is there something else I can look at?
 
Donnie Walker
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, I am installing Tomcat so I can have an environment to learn JSP on.

And I have IIS web server installed on my Windows XP Pro machine (where I am trying to get Tomcat to work) if that makes a difference.
 
Bear Bibeault
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's odd. I've never heard of any such issues with a fresh unzip of Tomcat. But then, I haven't done Windows in a long long time.

Nothing suspicous in the logs emitted to the console, I take it?

Grasping at straws, but I guess you could try it with IIS shut down? I don't think that should be an issue since they listen on different ports, but...
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you checked to make sure that your windows firewall isn't blocking port 8080?

What browser are you using?
If it's MSIE, try with Firefox.
If you get the same error message, then you know it's not coming from the browser.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should also go through the logs in TOMCAT_INSTALL/logs to see if there were any startup errors noted.
 
Donnie Walker
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tried it with both IE and Firefox.
Turned off the firewall.
Turned off IIS.

There is nothing in c:\tomcat\logs (the folder is empty)

http://localhost:8080/ is just trying to load an HTML page right? Is there some sort of connector that needs to be configured for it to recognize .htm?
[ November 11, 2007: Message edited by: Donnie Walker ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The welcome page in the default app is a JSP.
There is nothing in any of the logs?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, try http://127.0.0.1:8080
just in case 'localhost' isn't configured in your hosts file.
 
Donnie Walker
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There was nothing in the c:\tomcat v5.5 logs folder. No files at all.

http://127.0.0.1:8080 gave me the same error.

So, I deleted c:\tomcat and reinstalled Tomcat 6 for Windows as a service since I am getting the same error regardless. And changed the enviromental variables back again.

When I checked C:\Program Files\Apache Software Foundation\Tomcat 6.0\logs I found the log files below. I bolded an entry in Catalina which may be my problem...but I have no idea how to repair it.

localhost.2007-11-11.log
===========================================================
Nov 11, 2007 9:41:13 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Nov 11, 2007 9:41:13 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()

jakarta_service_20071111.log
===========================================================
[2007-11-11 09:39:07] [info] Procrun (2.0.3.0) started
[2007-11-11 09:39:07] [info] Service Tomcat6 name Apache Tomcat
[2007-11-11 09:39:08] [info] Service Tomcat6 installed
[2007-11-11 09:39:08] [info] Procrun finished.
[2007-11-11 09:39:19] [info] Procrun (2.0.3.0) started
[2007-11-11 09:39:19] [info] Updating service...
[2007-11-11 09:39:21] [info] Service Tomcat6 updated
[2007-11-11 09:39:21] [info] Update service finished.
[2007-11-11 09:39:21] [info] Procrun finished.
[2007-11-11 09:39:21] [info] Procrun (2.0.3.0) started
[2007-11-11 09:39:21] [info] Updating service...
[2007-11-11 09:39:21] [info] Service Tomcat6 updated
[2007-11-11 09:39:21] [info] Update service finished.
[2007-11-11 09:39:21] [info] Procrun finished.
[2007-11-11 09:41:06] [info] Procrun (2.0.3.0) started
[2007-11-11 09:41:06] [info] Running Service...
[2007-11-11 09:41:06] [info] Starting service...
[2007-11-11 09:41:09] [info] Service started in 3359 ms.

catalina.2007-11-11.log
===========================================================
Nov 11, 2007 9:41:10 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\Java\jre1.6.0_03\bin
Nov 11, 2007 9:41:10 AM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)

at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:177)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1059)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792)
at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
Nov 11, 2007 9:41:10 AM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.catalina.connector.Connector.initialize(Connector.java:1061)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792)
at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
Nov 11, 2007 9:41:10 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1444 ms
Nov 11, 2007 9:41:10 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Nov 11, 2007 9:41:10 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
Nov 11, 2007 9:41:13 AM org.apache.coyote.http11.Http11Protocol start
SEVERE: Error starting endpoint
java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)
at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:515)
at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:204)
at org.apache.catalina.connector.Connector.start(Connector.java:1132)
at org.apache.catalina.core.StandardService.start(StandardService.java:531)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Nov 11, 2007 9:41:13 AM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.catalina.connector.Connector.start(Connector.java:1139)
at org.apache.catalina.core.StandardService.start(StandardService.java:531)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Nov 11, 2007 9:41:13 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2585 ms
 
Bear Bibeault
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Aha! That means that something on your system is already using port 8080 and Tomcat cannot grab it.

I have no idea what that could be (and having been away from Windows for so long, wouldn't know how to find out).

But at least we know what the issue is now. I was scratching my head quite a bit -- usually a basic Tomcat install can be done blindfolded and sleepwalking.

You could either try to find out what's hogging 8080, or set up Tomcat to use a different set of ports.
 
Donnie Walker
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for pointing me in the right direction. I have no idea what was using port 8080 but I changed the conf file 8081 and it worked.

I was able to run some JSP examples as wel.

Thanks again for all your help. Now all I have to do is learn JSF and JSP and this forum looks like a great resource!

Thanks
 
Bear Bibeault
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Donnie Walker:
Thanks for pointing me in the right direction. I have no idea what was using port 8080 but I changed the conf file 8081 and it worked.


There may be other ports you might need to change as well if there turn out to be contentions,

Thanks again for all your help. Now all I have to do is learn JSF and JSP


I'd recommend concentrating on really getting JSP and Servlets under your belt before deciding when and if to jump off into JSF.

and this forum looks like a great resource!


Welcome to the Ranch!

There are a few articles that I've written for the JavaRanch Journal that might help you on your path:

The Secret Life of JavaServer Pages

The Front Man
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If, from the command prompt (dos window), you type
you can see what application is already bound to port 8080.

It's easy to change the port on which Tomcat runs.
in Tomcat_install/conf/server.xml, look for the <Connector ../> entry that has 8080 as the value for its 'port' attribute and change it to something else (8081 for instance).
Restart Tomcat.
Then, use that new port in your URL:
http://localhost:8081
 
The airline is called "Virgin"? Don't you want a plane to go all the way? This tiny ad will go all the way:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic