aspose file tools*
The moose likes Tomcat and the fly likes Tomcat Configuration -Help pls Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat Configuration -Help pls" Watch "Tomcat Configuration -Help pls" New topic
Author

Tomcat Configuration -Help pls

Manasi Cool
Greenhorn

Joined: Feb 10, 2005
Posts: 17
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

Joined: Feb 10, 2005
Posts: 17
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.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Are you getting any errors in your logs?
How are you starting it?
What OS are you using?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Manasi Cool
Greenhorn

Joined: Feb 10, 2005
Posts: 17
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

Joined: Dec 11, 2004
Posts: 13410

What did you do to modify the port and what URL are you using to access it?
Manasi Cool
Greenhorn

Joined: Feb 10, 2005
Posts: 17
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

Joined: Dec 11, 2004
Posts: 13410

And have you tried http://localhost:1977 ?
Manasi Cool
Greenhorn

Joined: Feb 10, 2005
Posts: 17
Yes I tried too...
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

How about http://127.0.0.1:1977 ?
Manasi Cool
Greenhorn

Joined: Feb 10, 2005
Posts: 17
This is the configuration present in hosts file for localhost. I tired this too...
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

When you start from the command line, what happens?
Manasi Cool
Greenhorn

Joined: Feb 10, 2005
Posts: 17
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

Joined: Dec 11, 2004
Posts: 13410

I know this is off topic but why such an old version of Tomcat?
Manasi Cool
Greenhorn

Joined: Feb 10, 2005
Posts: 17
Initially started with latest version 5.5.7 but got lot of errors. So tried installing this old version.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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

Joined: Feb 10, 2005
Posts: 17
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

Joined: Dec 11, 2004
Posts: 13410

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

Joined: Feb 10, 2005
Posts: 17
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

Joined: Feb 10, 2005
Posts: 17
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

Joined: Feb 10, 2005
Posts: 17
Any thoughts or clues will help ..
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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

Joined: Dec 11, 2004
Posts: 13410

Also, are you configured to run behind a proxy?
Manasi Cool
Greenhorn

Joined: Feb 10, 2005
Posts: 17
tomcat is running in task manager. I dont have proxy setting.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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

Joined: Feb 10, 2005
Posts: 17
I will check it and post my reply for sure.
Manasi Cool
Greenhorn

Joined: Feb 10, 2005
Posts: 17
My windows firewall is set to off. I tried both ON and OFF setting. But it didnt help me.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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

Joined: Feb 10, 2005
Posts: 17
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

Joined: Dec 11, 2004
Posts: 13410

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

Joined: Feb 10, 2005
Posts: 17
I might have faced the same kind of issue with tomcat 4.0 configuration. Anyway I got the latest version installed. Thanks Ben.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat Configuration -Help pls
 
Similar Threads
Accessing a zip file through a JSP page.
about welcome-file-list in jsf
welcome file list
Latest Tomcat version - 5.5.35 or 7?
Problem with connection pooling