• 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 Configuration -Help pls

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.. I have installed Standalone tomcat 4.0.1 and jdk is 1.4. The server is getting started scuccesfully and when accessing localhost throws me page not found error.

I have modified the port and checked the proxy setting too..but in vain. It would be great if someone shed light.

Thanks
 
Manasi Cool
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In addition my environment variable are set properly. JAVA_HOME and CATALINA_HOME. Earlier I tried installing tomcat 5.0 it doesnt work so I installed version 4.0.1.
 
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
Are you getting any errors in your logs?
How are you starting it?
What OS are you using?
 
Manasi Cool
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1.Installed on Windows XP

2.From DOS Prompt I am starting the tomcat and also tried using the Start Tomcat available in Start --> Programs

catalina output :

Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Starting service Tomcat-Apache
Apache Tomcat/4.0.1

-----------------------------

3. The following are the logs

localhost log :

2005-02-11 07:47:29 StandardHost[localhost]: Installing web application at context path /webdav from URL file:C:\Program Files\Apache Tomcat 4.0\webapps\webdav
2005-02-11 07:47:29 WebappLoader[/webdav]: Deploying class repositories to work directory C:\Program Files\Apache Tomcat 4.0\work\localhost\webdav
2005-02-11 07:47:29 StandardManager[/webdav]: Seeding random number generator class java.security.SecureRandom
2005-02-11 07:47:29 StandardManager[/webdav]: Seeding of random number generator has been completed
2005-02-11 07:47:29 ContextConfig[/webdav]: Added certificates -> request attribute Valve
2005-02-11 07:47:29 StandardWrapper[/webdav efault]: Loading container servlet default
2005-02-11 07:47:29 default: init
2005-02-11 07:47:29 StandardWrapper[/webdav:invoker]: Loading container servlet invoker
2005-02-11 07:47:29 invoker: init
2005-02-11 07:47:29 jsp: init

Catalina log:
-------------

2005-02-11 07:47:27 HttpConnector Opening server socket on all host IP addresses
2005-02-11 07:47:29 HttpConnector[8080] Starting background thread
2005-02-11 07:47:30 HttpProcessor[8080][0] Starting background thread
2005-02-11 07:47:30 HttpProcessor[8080][1] Starting background thread
2005-02-11 07:47:30 HttpProcessor[8080][2] Starting background thread
2005-02-11 07:47:30 HttpProcessor[8080][3] Starting background thread
2005-02-11 07:47:30 HttpProcessor[8080][4] Starting background thread


I am unable to find out the error. pls help me out. thanks
 
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
What did you do to modify the port and what URL are you using to access it?
 
Manasi Cool
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried to access like http://localhost:8080/. It didnt work out.

So modified the Connector <Connector port="1977"> in server.xml present under conf directory.
 
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
And have you tried http://localhost:1977 ?
 
Manasi Cool
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes I tried too...
 
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
How about http://127.0.0.1:1977 ?
 
Manasi Cool
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the configuration present in hosts file for localhost. I tired this too...
 
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
When you start from the command line, what happens?
 
Manasi Cool
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When Starting from the command prompt. The environment variables are initiliazed as follows and the server is getting started in catalina window.

Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Starting service Tomcat-Apache
Apache Tomcat/4.0.1

-------------------------------------------------

C:\Program Files\Apache Tomcat 4.0\bin>startup
Using CATALINA_BASE: C:\Program Files\Apache Tomcat 4.0
Using CATALINA_HOME: C:\Program Files\Apache Tomcat 4.0
Using CLASSPATH: C:\Program Files\Apache Tomcat 4.0\bin\bootstrap.jar;C:\JBuilderX\jdk1.4\lib\tools.jar
Using JAVA_HOME: C:\JBuilderX\jdk1.4
C:\Program Files\Apache Tomcat 4.0\bin>
 
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
I know this is off topic but why such an old version of Tomcat?
 
Manasi Cool
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Initially started with latest version 5.5.7 but got lot of errors. So tried installing this old version.
 
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're using a very old version now. The problem with it is, you're going to have a hard time finding anyone else using it for support. It's been a long time since I've installed or debugged it.

What errors were you seeing with 5.5.7?
Were you using jdk1.5.0 with it?
 
Manasi Cool
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used jdk1.4. During the startup of the server , I got the following exception.

" java.net.BindException: Address already in use: JVM_Bind:8080"

I modified the port and tried starting the server.But of no use, got the same error for whatever port I used.
 
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
OK, 5.5.7 requires jdk1.5.0 (unless you've installed the compat packages.)

The Bind exception means that something else was already using port 8080.

My advice: Install jdk1.5.0, uninstall whatever versions of Tomcat you have installed right now, and install a nice clean version.
 
Manasi Cool
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ben, I installed the compat packages too as instructed in the Jakarta Tomcat 5_5 Configuration and Usage Tutorial.

OK. I will install fresh version of 5.5.7 and let you know for any further problems. Thanks.
 
Manasi Cool
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ben,

I have installed Tomcat 5.5.7 and jdk is 1.4 and Compat.zip also. Tomcat is listening to port 7777. When I am starting the tomcat using tomcat5w, I got the following errors in the logs.
Unable to access either http://localhost:7777/ or http://127.0.0.1:7777/
Getting page not found.


-------------------------------------------------------------

Created MBeanServer with ID: 12a54f9:1020227c33f:-8000:Jegatha:1
Feb 11, 2005 9:32:04 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-7777
Feb 11, 2005 9:32:04 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1781 ms
Feb 11, 2005 9:32:05 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Feb 11, 2005 9:32:05 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.7
Feb 11, 2005 9:32:05 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Feb 11, 2005 9:32:06 PM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
Feb 11, 2005 9:32:07 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Feb 11, 2005 9:32:07 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Feb 11, 2005 9:32:07 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Feb 11, 2005 9:32:07 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Feb 11, 2005 9:32:08 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-7777
Feb 11, 2005 9:32:08 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Feb 11, 2005 9:32:08 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/79 config=null
Feb 11, 2005 9:32:08 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Feb 11, 2005 9:32:08 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4031 ms

-------------------------------------------------------------------
 
Manasi Cool
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any thoughts or clues will help ..
 
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
Do you have a firewall running on that machine?
There are no errors.

Did you check the task manager to see if Tomcat is running?
It looks like it is.
 
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, are you configured to run behind a proxy?
 
Manasi Cool
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
tomcat is running in task manager. I dont have proxy setting.
 
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
I don't own an xp box but I know that service pack 2 comes with a pretty restrictive firewall. I'll be surprised if it blocks the loopback though.

See if you can find the config screen for the firewall and open that port.
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=4454e0e1-61fa-447a-bdcd-499f73a637d1

Be sure to report back if that fixes it.
[ February 11, 2005: Message edited by: Ben Souther ]
 
Manasi Cool
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I will check it and post my reply for sure.
 
Manasi Cool
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My windows firewall is set to off. I tried both ON and OFF setting. But it didnt help me.
 
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
Hmm...

I'm grabbing at straws now.
Have you tried a browser other than MSIE?

Honestly, I'm stumped.
I've been using Tomcat for over 3 years and have not seen this.
 
Manasi Cool
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ben,

The problem is RESOLVED now after a lot of struggle....The culprit here is Norton Personal Firewall 2005.

I am having Norton Personal Firewall installed in my XP m/c in which this personal firewall is enabled. I disabled this now and localhost is accessible.

But I am not clear on the following. If possible could you explain.

This option is to prevent remote computers to restrict access to our local computer right? If so then how come disabling personal firewall is helping us resolving our localhost problem.


In addition I got the following tips from the symantec help that might help us understand issue better:

Default Inbound Loopback and Default Outbound Loopback :
-------------------------------------------------------

Permits inbound and outbound loopback connections to the localhost address of 127.0.0.1. It is usually safe to permit loopback or local connections because the connection originator is typically a trusted program on your own computer. Even with this firewall rule enabled, remote computers are never allowed access to the localhost address by the underlying network.
 
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
I'm not going to pretend to understand how an why NAV does what it does.
I can't imagine why they disabled the loopback address by default.

I'm glad you've got it working.
 
Manasi Cool
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I might have faced the same kind of issue with tomcat 4.0 configuration. Anyway I got the latest version installed. Thanks Ben.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic