Re: Tomcat on a machine with multiple ip addresses

2010-05-13 Thread John Moore

Dave Filchak wrote:
Due to a hard drive failure, I am needing to move some websites to a 
machine that has Tomcat already running on it with Apache as the front 
end. I was unable to get the sites working using the Apache instance 
that was already there so, 
I do this a lot lately, it seems.. (not willingly) but it can be 
tricky..  Basically these are the areas that need to be configured:


1) Add each IP address to your /etc/hosts file

2) In the httpd.conf,  add a Listen for each IP address (you can add the 
port 80 but  that is not necessary.. or so it seems..)


3) If you have virtual hosts defined make sure there is a 
NameVirtualHost setting for each IP address you use or resolve to.. 
(otherwise Apache will complain and not start)


I have never found that I needed to do anything on the Tomcat end.. as 
long as Apache is configured right. 


That is the basics..  If you still have problems let me know..

Hope this helps...

John..

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: looking for a web usesage / analytics package

2009-04-29 Thread John Moore
Webalizer.   It's not java based but simple to use.   It works with tomcat
as well as apache and IIS should you ever have to go down one of those
roads.

-Original Message-
From: Andrew Davidson [mailto:a...@santacruzintegration.com] 
Sent: Wednesday, April 29, 2009 3:00 PM
To: users@tomcat.apache.org
Subject: looking for a web usesage / analytics package

Hi 

 

Does anyone know of a good web site analytics / usage reporting package? I
do not need anything real fancy, just basic info about # unique visitors,
page views, .

 

Ideally this would be implemented as a war file I can just drop on my server

 

Sorry If this has been asked a million times. I scoured the tomcat website,
but could not find anything. 

 

Maybe I am asking the question the wrong way?

 

Thanks

 

Andy

 

 

  _  

Music Trainer  makes it easy  to learn new songs by slowing down or speeding
up play back without changing the pitch! 

 

Learn more at www.SantaCruzIntegration.com 

 



smime.p7s
Description: S/MIME cryptographic signature


Re: Configuration Quandary - Servicing static page from app root

2008-11-29 Thread John Moore

Sure would appreciate some feedback or ideas on this...

Please..!!

John..

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Configuration Quandary - Servicing static page from app root

2008-11-29 Thread John Moore

Kees Jan Koster wrote:



Have you looked at Apache's mod_rewrite at all? I sounds like that 
module might help.
Yes, I was going there next, but I was hoping there was a Jk/virtual 
host configuration I was missing.. I don't like configurations scattered 
all over the place.. makes management harder..


Hence this message...

Thanks though for replying...appreciated...

John..



--
Kees Jan

http://java-monitor.com/forum/
[EMAIL PROTECTED]
06-51838192

The secret of success lies in the stability of the goal. -- Benjamin 
Disraeli



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Configuration Quandary - Servicing static page from app root

2008-11-26 Thread John Moore

OS - CentOS 4.7
Tomcat - apache-tomcat-5.5.23.tar.gz
Apache - httpd-2.0.59.tar.gz (compiled on that machine)
Connector - tomcat-connectors-1.2.21-src.tar.gz (compiled on that machine)


I'm trying to serve a static page (which will redirect elsewhere but 
that is not the issue) that will be found when the user uses the raw 
domain name URL.  i.e.


http://www.somedomain.com

Currently this particular webapp requires the fairly usual:

http://www.somedomain.com/appname/servlet_controller

with the directory structure:

/webapps/somedomain/appname

and works just fine.. (Note: I have a LOT of web apps on this machine 
with various domains, hence the directory structure)


In the base configuration file that is included in httpd.conf  that is 
working for the URL


http://www.somedomain.com/appname/servlet_controller

I have..

==
VirtualHost www.somedomain.com
   ServerName www.somedomain.com

Alias /appname /usr/local/tomcat/webapps/somedomain/appname

   Directory /usr/local/tomcat/webapps/somedomain/appname
   Options Indexes FollowSymLinks
   DirectoryIndex index.html index.htm index.jsp
   /Directory 


   DocumentRoot /usr/local/tomcat/webapps/somedomain/

JkMount /appname/servlet_controller  ajp13
   JkMount /appname/*.jsp  ajp13
/VirtualHost
=

What I would like to do is place an index.html in, for example, the 
directory


/webapps/somedomain/index.html

..and have the URL

http://www.somedomain.com

...load that index.html  (the above path location can be different I'm 
just assuming that would be a good place)


So far I have had no luck.. (I seem to remember doing this back in 
Tomcat3 but either my brain has deteriorated severely or something has 
changed and I don't get it yet..)


I have tried ADDING variations on the following several settings with no 
luck...:



Alias / usr/local/tomcat/webapps/somedomain

Directory /usr/local/tomcat/webapps/somedomain
   Options Indexes FollowSymLinks
   DirectoryIndex index.html index.htm index.jsp
/Directory

JkMount  / ajp13
===

...and reread all of the docs

Except for when I added the JkMount / ajp13 I got a 404 returned.. 
When I added the JkMount then I got a blank page (no error), but the 
index.html page did not load...


I would appreciate a kick up the side of the head to get me going here.. 
I'm feeling rather clueless at the moment...


Thank you..

John


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat to Apache connection dies

2008-03-29 Thread John Moore

Rainer,

Thanks for taking the time to outline the differences.. hmmm.. maybe 
that needs to be somewhere in the docs page..G


Anyway, I have upgraded to the latest and made the suggested changes so 
I will monitor the situation for now and hope that I'm now moving down 
the right path..


Thanks again..

John..

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat to Apache connection dies

2008-03-20 Thread John Moore

Caldarale, Charles R wrote:
From: John Moore [mailto:[EMAIL PROTECTED] 
Subject: Re: Tomcat to Apache connection dies


Ok, I assume you mean the APR connector is the mod_jk.so 
which is on the Apache side only.. ?



No - the APR connector is a replacement for the pure Java HTTP/AJP ones
on the Tomcat side.
  

Ok, now I'm confused...

Please be patient, but in all the years past I would compile a connector 
for mod_jk.so that is placed in the ../apache/modules directory then I 
would add the following to the server.xml,


Server container

Listener className=org.apache.jk.config.ApacheConfig
   modJk=/usr/local/apache/modules/mod_jk.so /


Host container

Listener className=org.apache.jk.config.ApacheConfig
   append=true
   forwardAll=false
   modJk=/usr/local/apache/modules/mod_jk.so /

... and I would be up and running.. (and would touch nothing else..)

So.. given that, what connector am I using ??

Thank you for your patience..

John..


Re: Tomcat to Apache connection dies

2008-03-18 Thread John Moore

Rainer Jung wrote:
The question was aimed at the Tomcat side. There are connectors on the 
Tomcat side, responsible for handling the incoming traffic. If you are 
using the Linux default, pure Java, then it is the Coyote connector 
and you will get an info message during startup, that Tomcat cannot 
find the native APR connector.
Ok, I assume you mean the APR connector is the mod_jk.so which is on the 
Apache side only.. ?




If you compile tcnative and add the resulting shared object file to Tomcat

This I did NOT do.. so I'm assuming the Coyote connector..

I guess my problem is that you used terminology that I had not heard or 
read about before.. My apologies for my ignorance..


John

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat to Apache connection dies

2008-03-17 Thread John Moore
Problem:  The communication via mod_jk between Apache and Tomcat appears 
to suddenly become exhausted and cease to be available.


Versions:

apache-tomcat-5.5.23.tar.gz
httpd-2.0.59.tar.gz
tomcat-connectors-1.2.21-src.tar.gz
managerx-5.5-1.7.2
CentOS 4.6 (final)

Symptom:

Apache suddenly reports that the service is unavailable when trying to 
serve a context from Tomcat.


Frequency:

Generally about once a month.  It also can happen quicker if  ManagerX 
is used with any frequency.  I have about 10 different webapps running. 
Restarting Tomcat does nothing, Restarting both Apache and Tomcat does 
nothing.. ONLY rebooting the machine will get everything back working.


Possibly related information:

netstat -np --tcp reports dozens of dead connections to port 8009, 
like the following samples: (count in parens to save space here):


tcp0  0 127.0.0.1:8009  
127.0.0.1:48461 SYN_RECV- (13)
tcp0  6 127.0.0.1:48459 
127.0.0.1:8009  FIN_WAIT1   -  (3) 
tcp6  0 :::127.0.0.1:8009   
:::127.0.0.1:48191  CLOSE_WAIT  -  (50)


and NO established connections even when attempting to access a service 
on Tomcat


I attempted to work on various settings in the worker.properties file 
under the assumption that this is the key area to try and solve the 
problem based on a number of messages here and at other venues. 

I'm assuming I still do not have it right, but have exhausted my 
understanding of the causes..


worker.properties:

worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.cachesize=30
worker.ajp13.socket_timeout=120
worker.ajp13.connection_pool_timeout=600
worker.ajp13.connect_timeout=7000
worker.ajp13.prepost_timeout=7000
worker.ajp13.reply_timeout=6
worker.ajp13.recycle_timeout=120
worker.ajp13.retries=3

Anyone have some suggestions as to how to solve this problem.. It is 
rendering my production machines nearly useless..


Thank You!

John..


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat to Apache connection dies

2008-03-17 Thread John Moore

Rainer Jung wrote:


Please have a look at your mod_jk log file and look for '[error]' 
messages. Around the error messages there should also be additional 
info messages giving some mor einfo about the root cause.

mod_jk.log is empty.


OK, you could switch to mod_jk 1.2.26 so we don't have to check 
against any old bugs. 1.2.26 is now 3 months old and no major new bugs 
are known.

OK, I'll do that this weekend..


That sounds really weird. If you stop and start Apache httpd and 
Tomcat (i.e. all processes completely stopped, wait a few seconds and 
then started freshly), those processes should not have any more 
knowledge of previous problems.
That is what I would have thought.. no joy...I attached the netstat 
output so you can see all of the lines for yourself.. Hope that helps..



Possibly related information:

netstat -np --tcp reports dozens of dead connections to port 8009, 
like the following samples: (count in parens to save space here):


tcp0  0 127.0.0.1:8009  
127.0.0.1:48461 SYN_RECV- (13)
tcp0  6 127.0.0.1:48459 
127.0.0.1:8009  FIN_WAIT1   -  (3) tcp6  
0 :::127.0.0.1:8009   :::127.0.0.1:48191  CLOSE_WAIT  
-  (50)


The CLOSE_WAIT most likely come from the fact, that you use a 
connect_timeout (that's fine) for mod_jk, but have no 
connectionTimeout on teh Toncat side. Set connectionTimeout in the 
Tomcat sidfe in the AJP connector to 60 (milliseconds).

Actually I do.. Here is that setting from my server.xml

!-- Define an AJP 1.3 Connector on port 8009 --
   Connector port=8009
  enableLookups=false
  redirectPort=8443
  protocol=AJP/1.3
  connectionTimeout=6
  maxThreads=750
  debug=0 /

Is there anything else here that needs changing..?


The SYN_RECV seem to indicate, that your Tomcat is not able to accept 
any more connections. Two possible reasons:


- all threads in the thread pool of your AJP connector (Tomcat side) 
are already connected with httpd and no more threads are left. E.g. in 
your case it could be, that 50 threads are connected and maybe the 
size of your thread pool is 50?


- you got an exception during creation of a new thread for the pool, 
and as a consequence your Tomcat is not listening any more. Can you 
see the LISTEN for 8009 in netstat? If no, the most likely cause is, 
that your JVM exceeded the number of threads that it can create (most 
32 Bit JVMs: something between 400 and 500).
This is a 64 bit system and using 64 bit JVM...  I was seeing this 
problem also on a 32 bit system and had hoped that the 64 bit JVM would 
give me more margin of error, apparently not.  (See attached netstat 
output)




If the problem happens again: check to see, if you can telnet to the 
TC port (telnet localhost 8009). If no, then mod_jk also has no chance 
of connecting to the Tomcat and we must find out, why Tomcat doesn't 
accept any more connections. In that case a thread dump of the Tomcat 
java process is helpful (kill -QUIT, result goes to catalin.out).

Good suggestion, I'll give that a try..

Thanks for all of the other suggestions, I made those changes 
immediately, and I'll upgrade the connector this weekend. If you are 
anyone else have some ideas for me to try, I would REALLY appreciate it..


Thanks again..

John..
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address   Foreign Address 
State   PID/Program name   
tcp0  0 127.0.0.1:8009  127.0.0.1:48461 
SYN_RECV-   
tcp0  0 127.0.0.1:8009  127.0.0.1:48457 
SYN_RECV-   
tcp0  0 127.0.0.1:8009  127.0.0.1:48455 
SYN_RECV-   
tcp0  0 127.0.0.1:8009  127.0.0.1:48449 
SYN_RECV-   
tcp0  0 127.0.0.1:8009  127.0.0.1:48459 
SYN_RECV-   
tcp0  0 127.0.0.1:8009  127.0.0.1:48460 
SYN_RECV-   
tcp0  0 127.0.0.1:8009  127.0.0.1:48456 
SYN_RECV-   
tcp0  0 127.0.0.1:8009  127.0.0.1:48450 
SYN_RECV-   
tcp0  0 127.0.0.1:8009  127.0.0.1:48448 
SYN_RECV-   
tcp0  0 127.0.0.1:8009  127.0.0.1:48452 
SYN_RECV-   
tcp0  0 127.0.0.1:8009  127.0.0.1:48454 
SYN_RECV-   
tcp0  0 127.0.0.1:8009  127.0.0.1:48451 
SYN_RECV-   
tcp0  0 127.0.0.1:8009  127.0.0.1:48458 
SYN_RECV- 

Re: Tomcat to Apache connection dies

2008-03-17 Thread John Moore

Rainer Jung wrote:


Which connector do you use? The usual Coyote (Jav) connector, or the 
native APR connector (also called tcnative)?
Hmm.. good question.. I follow the directions, compile and it (make 
install) puts the mod_jk.so in the ../apache/modules directory.  I would 
guess it is the native since I compile the code in the ../native 
directory.  Guess I did not pickup that there was a difference..


What should I be doing..?




Actually I do.. Here is that setting from my server.xml

!-- Define an AJP 1.3 Connector on port 8009 --
   Connector port=8009
  enableLookups=false
  redirectPort=8443
  protocol=AJP/1.3
  connectionTimeout=6
  maxThreads=750
  debug=0 /

Is there anything else here that needs changing..?


Hmmm, maybe set connectionTimeout to 60 instead of 6. 
Otherwise TC and mod_jk don't use the same timeout (I think you had 10 
minutes ofr mod_jk). This will not be the reason for your strange 
observation, but it should reduce the CLOSE_WAIT connections during 
normal operations.

Just to be clear..

The Tomcat Connector setting for port 8009 of connectionTimeout should 
equal the worker.properties setting of:


connection_pool_timeout

or

connect_timeout

?



I would run a cron job, that writes out the netstat statistics for 
8009 (how many connections in which state, including LISTEN etc.) once 
a minute to get an idea, if you run into something extreme immediately 
before the LISTEN dies.

Ok.. I work on setting that trap up...


The previous hint about taking thread dumps once the problem is there 
is still valid. That way we can check from the inside of the JVM, if 
the accept thread is gone. But we still won't know why.


Any interesting log items on the TC side? OutOfMemory errors?


No, not generally.. I have had one OutOfMemory error several weeks ago 
that I never could explain, but that is the first that did not showed 
up in the catalina.out logs AS a problem..


Those port 3050 connections are DB connections or something similar I 
suppose?

Correct.. Firebird.

Thanks, I really appreciate the suggestions..  I'll post back to this 
thread once I get some results based on your suggestions..


John..

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat to Apache connection dies

2008-03-17 Thread John Moore

Martin Gainty wrote:

pls post the mod_jk.log
  

Thank you for taking an interest..

Unfortunately the log is empty.. Rainer suggested that I needed to set 
the log level or that something was wrong in that area as well.


John..


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Best Linux distribution

2007-11-14 Thread John Moore
Sure to be a dicey question to raise in a public forum.  Mostly, I find,
it comes to personal preference of what and how you like to manage your
servers and apps.   We use RHEL for servers running applications covered
by service contracts.   For everything else (web, applications,
development, db, cvs servers) we use CentOS since it's RHEL based and
the environment remains consistent.  This simplifies ongoing
maintenance.   We started back with RH 6 and evolved from there.  We
install bare minimum set of packages, turn off all of the junk you don't
need, then install java, build apache, install tomcat, build modules and
our apps from there.   

We have staff that loves Debian; they say it's the only real
distribution.   We tested our webapps on it and didn't see a difference
in performance.  We even have one guy who insists on building his own
kernels to strip out all of the parts he doesn't need.  I don't get it,
but it floats his boat.

Figure out what features of a distribution are important to you, find
ones that best meet your criteria and see how they work for you;
everything else is meaningless.  If you just want to drop your war into
an environment, maybe one of the appliance distributions fits your
needs.   

John

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 14, 2007 1:19 PM
To: Tomcat Users List
Subject: RE: Best Linux distribution

 From: Stanczak Group [mailto:[EMAIL PROTECTED] 
 Subject: Re: Best Linux distribution
 
 Hands down this is the best. :)
 http://www.rpath.org/rbuilder/project/ta/

Yup, just what everyone needs - another out-of-date, repackaged version
of Tomcat...

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Apache/Tomcat/mod_jk over WAN

2007-11-12 Thread John Moore

Thanks for the input on the timeouts, having run lb connectors in LAN
environment for years now, I never really ran into this issue or
stumbled across this document.  

What I meant by the stop comment is really in reference to
fault-tolerance.  

[For reference, the current environment has a mesh of 4 machines that
have redundant hardware load balancers in front of them.   To support
the dynamic content this is needed, but unnecessary and expensive to
replicate in remote locations that only serve static content.]

If an apache server can't support serving dynamic content, I need to
re-direct users (as transparently as possible) to a server that can.
Thinking out loud, I could continue to have dynamic content from
www.mysite.com and static from static.mysite.com and simply embed the
full static-site url in the page.  Alternatively, as you indicated, if I
direct them to an error page, I can redirect them to an apache instance
that's fully functional.  Will take a bit more coordinate between apache
server's maybe using something from the Linux LVS or Linux-HA project.

Thanks again.
John  


-Original Message-
From: Rainer Jung [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 12, 2007 4:32 PM
To: Tomcat Users List
Subject: Re: Apache/Tomcat/mod_jk over WAN

Hi John,

John Moore schrieb:
 
 I have a cluster of Tomcat 5.5 servers that are running Apache 2.2 to
 serve static content; mod_jk 1.2.25 connector is used. I am
considering
 adding apache servers in separate corners of the country to serve the
 static content closer to the user. I can not copy Tomcat to each of
 these locations. I was thinking of routing the ajp traffic through an
 OpenVPN SSL tunnel to the existing tomcat servers. We did some tests
and
 were surprised that there seemed to be a decent performance increase.
 
 Has anyone had any successes, failures, or gotcha's doing this?

No real experience. I heard from a couple of people, who had problems
with the stability of the tunnel. So using Cping/Cpong etc. could be
important here. Read the Timeouts docs page

http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html

especially the parts related to firewalls (a dropped VPN tunnel might
behave similarly to an idle connection drop by a firewall).

 Would mod_jk solution use less bandwidth than something like mod_proxy
 to redirect the tomcat-destined http/s requests?

I would not expect, that AJP13 gives a big bandwidth benefit. Since you
are talking about dynamic content only, usually we are in the region of
about 5-20KB per request, and the savings from the binary encoded HTTP
headers should be well below 1KB. On the other hand AJP13 response
packets have a little overhead, so I would expect well below 10%
reduction in needed bandwidth.
 
 Any suggestions on stopping user access to a Apache if AJP link to
 Tomcat drops?

What do you mean by stop? Presenting well-defined error pages? In case
mod_jk can not reach Tomcat it should return a 503, sometimes a 504. You
can define a customized ErrorDocument in httpd for this case.

I would always include an lb worker between Apache and even a single
Tomcat, because this enables you to get better state information via a
status worker.

 Thanks,
 John

Regards,

Rainer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat6 Manager App HOW-TO

2007-07-16 Thread John Moore

Caldarale, Charles R wrote:
From: John Moore [mailto:[EMAIL PROTECTED] 
Subject: Re: Tomcat6 Manager App HOW-TO


I also gather that you should copy the manager directory into each 
webapp..???



Not required, but it's an alternative to creating manager.xml files
under each conf/Catalina/[host] directory that all have a docBase
attribute pointing to the single copy of the webapp.

  


Ah yes, thanks, that makes sense now...

I think for production I'm going to need to fall back to 5.5.23 for now, 
too many issues to resolve and test. I'll setup a test machine for 
Tomcat6 and keep working on it..


I appreciate your assistance..

John..


Re: Tomcat6 Manager App HOW-TO

2007-07-15 Thread John Moore

Caldarale, Charles R wrote:
From: John Moore [mailto:[EMAIL PROTECTED] 
Subject: Tomcat6 Manager App HOW-TO


It appears that the instruction to add (paths corrected)
Context path=/manager privileged=true
docBase=/usr/local/tomcat/webapps/manager
/Context
is wrong (based on message from Charles Caldarale on 5/16/2007)



The path attribute is only valid when the Context element is in
server.xml, which is strongly discouraged.  For other Context uses,
the path is derived from the name of war file (or directory) or the name
of the .xml file in conf/Catalina/[host].
  

i.e. Don't follow the directions..G

  
So.. in reading the rest of the instructions I'm finding 
things are not quite working as documented.



Please point out where in the Tomcat 6 doc you're finding discrepancies.
  
Everything I'm asking here comes from the Tomcat6 Manager HOW-TO.. 
(newly printed from the site)


You are basically saying, as I understand it,  that it is either wrong 
or incomplete. 

(It may, of course, just be that my ignorance is so bad that I can make 
sense of it all..G)



  

1) Is the instruction that you add a manager.xml to each
$CATALINA_HOME/conf/[enginename]/[hostname]
..folder required?



Not for Tomcat 6, since the directory structure has changed.  In TC 5.5
and older, the various management applications were located outside of
the normal Host appBase (in server/webapps), and therefore required
[appname].xml files in conf/Catalina/[host].  For TC 6, the management
applications are located under the configured appBase directory, so
their Context elements can be found in their respective META-INF
directories.

If you configure multiple Host elements with differing appBase
attributes, you have two choices.  Either copy the management
applications to each appBase, or keep them in one spot and create
[appname].xml files with appropriate docBase attributes in each
conf/[engine]/[host], similar to TC 5.5.
  
Great thanks..  That is the missing piece(s) in the docs...  Ditto for 
your following advice..
  

   but can not access the host-manager at:
http://localhost:8080/host-manager/html
   ..I get a 403  (I did try adding a host-manager role to the 
tomcat-user.xml , but no joy)



Look in the WEB-INF/web.xml file for host-manager; you'll see that the
required role name is admin, not manager or host-manager.

  

3) I can not access a virtual host Manager at
   http://www.domainhere.com:8080/manager/html



What appBase did you configure for the www.domainhere.com Host?  If
you don't have a manager webapp deployed there, you'll need to create a
conf/Catalina/www.domainhere.com/manager.xml file that contains a
Context element with a docBase attribute that points to the location
of the manager webapp.

 




Re: Tomcat6 Manager App HOW-TO

2007-07-15 Thread John Moore

Caldarale, Charles R wrote:


The only part that I find somewhat misleading is the following:

There are two ways to configure the Manager web application Context:
* Install the manager.xml context configuration file in the
  $CATALINA_HOME/conf/[enginename]/[hostname] folder.
* Configure the Manager Context within the Host configuration
  in your Tomcat server.xml configuration. Here is an example:
  Context path=/manager privileged=true

docBase=/usr/local/kinetic/tomcat6/server/webapps/manager
  /Context

The first bullet is really only needed when additional Host elements
have been configured, and you want a manager webapp for each.  It fails
to mention that the manager webapp is automatically set up for the
default Host in the standard Tomcat 6 download.

The second bullet should probably be eliminated, since it's no longer in
keeping with the philosophy of avoiding placing webapp configurations
inside the server.xml file.  It may be there simply for completeness,
but ideally it should at least include a caveat.
  
I guess I understood from an earlier post from you that it was a rather 
strong no-no..  Which made it's presence in the HOW-TO rather odd..


I also gather that you should copy the manager directory into each 
webapp..???


Thank you for clarifying these issues..

John..


 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  




Tomcat6 Manager App HOW-TO

2007-07-14 Thread John Moore

I would appreciate some clarifications/advice on this How-To..

It appears that the instruction to add (paths corrected)

Context path=/manager privileged=true
   docBase=/usr/local/tomcat/webapps/manager
/Context

is wrong (based on message from Charles Caldarale on 5/16/2007)

So.. in reading the rest of the instructions I'm finding things are not 
quite working as documented.


Searched this list and google and so far have not come up with any answers:

Specifically..

1) Is the instruction that you add a manager.xml to each

   $CATALINA_HOME/conf/[enginename]/[hostname]

..folder required?  (I assume the path should be corrected since there 
is no longer any server directory structure.)


.. at this point it does not seem to matter.. but I would like access to 
virtual hosts..


2) So I can access the localhost manager at:

http://localhost:8080/manager/html

  but can not access the host-manager at:

   http://localhost:8080/host-manager/html

  ..I get a 403  (I did try adding a host-manager role to the 
tomcat-user.xml , but no joy)


  Is there something that has not been documented as yet to configure 
this..???


3) I can not access a virtual host Manager at

  http://www.domainhere.com:8080/manager/html


Thank you for any hints or advice..

John..

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Useless use of AllowOverride.. Mod_jk.conf

2007-05-05 Thread John Moore
In my latest install of  Tomcat with Apache I'm getting this warning 
(decided to download all of the latest and greatest for this new 
machine.. )


[warn] - Useless use of AllowOverride in line...

About 6-7 times..

..and points to line numbers in the mod.jk.conf file that is 
auto-generated by Tomcat on startup where the line reads


Location...
 ...
 AllowOverride None
/Location

Searched the archives on this list and Google but could not find any 
hints that made sense to me..


Versions

OS  CentOS 4.4 x86_64
Apache 2.2.4
Tomcat 6.0.10
Latest download of connectors
Apache and connectors compiled on this machine.. (no problems that I 
know of..)

=

Anyone have a clue what has happen..??  (Or do I need to post this 
somewhere else..??)


Thank you for any ideas..

John..


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How does one configure Plain host domain url to run web app?

2007-04-07 Thread John Moore

Folks,

I found the solution and it was embarrassingly simple.. (an often 
occurrence..)


All I had to do was set the DocumentRoot to where I wanted the 
index.html to be run from.


(I found it when I was deleting all of the various test settings, 
Directory tags, Aliaes, redirects and left the DocumentRoot setting just 
for grins.  I then tested the site to see if the webapps were still 
working but quickly tried the domain root.. what the heck.. it worked..!!!)


So.. there you go..

John...



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How does one configure Plain host domain url to run web app?

2007-03-16 Thread John Moore

Rashmi Rubdi wrote:

You are right, the set-up I've mentioned only works for one application.

Perhaps you want to configure multiple virtual hosts. 
  


I already use virtual hosts..

There's an example on that here: 
http://confluence.atlassian.com/display/DOC/Guide+to+using+Apache+Tomcat's+Virtual+Hosts
  

Interesting but.. I already do that, as best as I can tell..


You won't need Apache HTTP connector, just Tomcat is fine I think (not sure).
  
My understanding is that Tomcat by itself is not nearly as a robust and 
HTTP service.. At least that is what I used to hear, both here and in 
many other postings and books..





because the above configuration uses name-based virtual hosting, you need to have entries in your 
DNS server for app1 and app2 that point to the application server

  

.. yes I also do that already..

The problem I'm having is that a java web app is generally called via a 
context   Since there are MANY webapps in the system I can place a 
single webapp in the root..


therefore how do I map a single host.domain to a virtual host..

Currently I have

http://www.mydomain.com/mysite/thecontext

..where mysite is a sub-directory under webapps and thecontext is 
the context of that web application using JkMount


I would like to configure it so that..

http://www.mydomain.com

..also brings up that same webapp..

Make sense..???

I can currently do this by mapping

http://www.mydomain.com  to an Apache Htdocs virtual host service with a 
redirect to..


http://otherhost.mydomain.com/mysite/thecontext

..where otherhost is a DNS entry for that domain of which there is 
also a virtual host in Tomcat.


I was hopping I did not have to do this convolluted system, as it is 
easy to forget what is happening and someone (employee) could easily 
mess it up..


Is that clearer now..??

Thanks for any ideas or suggestions..

John..

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How does one configure Plain host domain url to run web app?

2007-03-13 Thread John Moore

Rashmi Rubdi wrote:

I think an application runs on the root context / by default, if it's 
configured this way in server.xml :

Engine name=Catalina defaultHost=localhost
   Host name=localhost appBase=webapps/projectname
Context path= docBase=C:\dev\projects\projectname reloadable=true 
/
Logger className=org.apache.catalina.logger.FileLogger/
   /Host
/Engine
  

Thanks for replying..

I have that already and it does not help..

Other suggestions..??

John..



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How does one configure Plain host domain url to run web app?

2007-03-13 Thread John Moore

[EMAIL PROTECTED] wrote:

Hi John,

Ok, I'm going to try show you how I think about this stuff... and I'm 
often wrong ;)


Dont use a redirect... it goes back to the browser and its not cool.

Firstly make a servlet and have a look at the CONTEXT.XML file under 
META-INF


Thank you for taking the time to explain your idea..   I actually often 
do it another way.. I create another host for the webapp and then 
place the plain domain www.mydomain.com as an Apache HTdocs and then 
redirect to the webapp host..


Problem with this an your solution is that is it messy.. We serve a LOT 
of webapps and need to keep it as simple as possible..  I will study 
your idea and see if it can help me on finding a cleaner solution..


John..

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How does one configure Plain host domain url to run web app?

2007-03-13 Thread John Moore

Caldarale, Charles R wrote:
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Subject: Re: How does one configure Plain host domain url to 
run web app?


Dont use a redirect... it goes back to the browser and its not cool.



Nothing wrong with redirects.  They're quite appropriate to allow the
browser to properly evaluate relative links in pages without the need
for the extra gyrations you're suggesting.

  

 I agree...

Do you have any thoughts on a solution...

John..


Re: How does one configure Plain host domain url to run web app?

2007-03-13 Thread John Moore

Hassan Schroeder wrote:

On 3/13/07, John Moore [EMAIL PROTECTED] wrote:


Problem with this an your solution is that is it messy..


Front-ending Tomcat with Apache is messy :-)


Really..   Why.. ??


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How does one configure Plain host domain url to run web app?

2007-03-13 Thread John Moore

Thank you for replying..

This is one webapp among many on this server..  


So if I understand you correctly this will not be possible..

If I have miss understood.. could you clarify..??

John..

Rashmi Rubdi wrote:
If you place your application as ROOT.war , directly under Tomcat's webapps folder then Tomcat should load it on the root context / 


But if it's named anything else then it will be at the /ProjectName/ context.

I have mine set-up like this on a clean install of Tomcat 5.5 (with no 
additional configuration) and the web application loads on the root context.

If you place an index.jsp directly in the root folder of your project then, 
that takes care of hiding the directory listing and rendering the home page of 
your app.

Also configure welcome-file in your project's web.xml to index.jsp
  


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How does one configure Plain host domain url to run web app?

2007-03-12 Thread John Moore

(Tomcat 4.x)

I have the following url that runs an application (pseudo url for 
discussion only)



http://www.mydomain.com/mysite/thecontext

works fine..

I would like to configure it so that..

http://www.mydomain.com

gets me to the same place..

I can place a redirect html page at

http://www.mydomain.com/mysite/index.html

which redirects to

http://www.mydomain.com/mysite/thecontext

but have yet to get a plain

http://www.mydomain.com

to work.. I keep getting either the No Context configured. error 
or the dreaded index of the directory..


I've tried Aliaes, Document root, Directory, and various JkMount 
settings in the Virtual host conf file that seemed like it might work, 
but so far, no joy..  (Tried Googling it, but have not come up with the 
right key words..)


Some of the things I have tried  in the conf file..

==
Alias /mysite usr/tomcat/webapps/mysite
Alias / usr/tomcat/webapps/mysite

DocumentRoot /usr/local/tomcat/webapps/mysite/

Directory /usr/local/tomcat/webapps/mysite
   Options Indexes FollowSymLinks
   DirectoryIndex index.html index.htm index.jsp
 /Directory

   JkMount /mysite/thecontext  ajp13
   JkMount /mysite/*.jsp  ajp13

..variations of..
   JkMount /*.jsp  ajp13  -- gives me a dreaded index of the correct 
directory

  JkMount /*.html  ajp13  -- same as above
  JkMount /*.  ajp13  -- blank document (strange)
  JkMount /*  ajp13  -- context error
=

Suggestions appreciated..

(all of my other machines are running Tomcat 5.. I will be moving this 
app next month.. so a Tomcat 5 suggestion would be welcome as well)


John..



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Session not sticky in 5.5 with load balancer

2005-11-17 Thread John Moore

Nick, 

I think you want to use balanced_workers not balance_workers.

Here's a snippit from our workers.properties.

worker.list=lbcon

# ww1
worker.ww1.port=8009
worker.ww1.host=192.168.X.Y
worker.ww1.type=ajp13
worker.ww1.lbfactor=1
worker.ww1.cachesize=20
worker.ww1.local_worker=0
# ww2
worker.ww2.port=8009
worker.ww2.host=192.168.X.Z
worker.ww2.type=ajp13
worker.ww2.lbfactor=1
worker.ww2.cachesize=20
worker.ww2.local_worker=1

worker.lbcon.type=lb
worker.lbcon.sticky_session=1
worker.lbcon.balanced_workers=ww1,ww2
worker.lbcon.local_worker_only=0

John

-Original Message-
From: Duan, Nick [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 17, 2005 11:02 AM
To: tomcat-user@jakarta.apache.org
Subject: Session not sticky in 5.5 with load balancer

I am running an Apache httpd server as the load balancer with two tomcat
instances.  All servers are on the same windows XP machine.  The load
balancing works fine, but I am not able to make user sessions sticky
with either one of the tomcat instances.  The test was done using is the
session example application bundled with the tomcat distribution.

Configuration:

Windows XP Professional Edition
Apache httpd 2.0.55
Mod_jk 1.2.15
Tomcat version 5.5

workers.properties file:

# Define some properties
#workers.apache_log=C:\ApacheHttpd\Apache2\logs\workers
#workers.tomcat_home=C:\devel\tomcat-5.5.12
#workers.java_home=C:\jdk1.5.0_03
ps=/

# Define 4 workers, 3 real workers using ajp12, ajp13, jni, the last one
being a loadbalancing worker 
worker.list=loadbalancer 

# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8010
worker.worker1.lbfactor=1
#worker.worker2.cachesize=10
#worker.worker2.cache_timeout=600
#worker.worker2.socket_keepalive=1
#worker.worker2.socket_timeout=60

# Set properties for worker2 (ajp13)
worker.worker2.type=ajp13
worker.worker2.host=localhost
worker.worker2.port=8009
worker.worker2.lbfactor=1


# Set properties for lb which use worker1 and worker2
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=worker1,worker2
worker.loadbalancer.sticky_session=1


Any comment/info/suggestion will be greatly appreciated!

ND

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: barring :8080 to the outside world

2005-10-28 Thread John Moore

Chris,

In the past we have setup multiple hosts.   You'll have your
administrative site on localhost or some other internally known name and
your application on www.xyz.org.   You'll have to add entries to your
server.xml and contexts get placed into their respective
conf/Catalina/localhost and conf/Catalina/www.xyz.org.   

John Moore


-Original Message-
From: Christoph P. Kukulies [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 28, 2005 8:35 AM
To: tomcat-user@jakarta.apache.org
Subject: barring :8080 to the outside world

I'm a bit concerned that I find the customers' site I'm currently
working
on being open with port 8080 to the outside world.

What is the standard way to make tomcat safe in that it doesn't present
the jakarta interface and everything on port 8080 to the outside?

(internally it should work though - localhost).

--
Chris Christoph P. U. Kukulies kuku_at_kukulies.org

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]