tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Gray" <anthonyjg...@hotmail.com>
Subject configure tomcat manager with connector mod_jk2
Date Fri, 02 Jan 2004 10:26:41 GMT
Hi All,

I have multiple Virtual Hosts running from the same tomcat JVM (Tomcat 4, 
Apache 2 using the apache connector mod_jk2).  I am trying to enable the 
tomcat manager so that I can restart a single Vhost without having to 
restart the whole tomcat, however so far when I call the manager I just get 
a tomcat status 404 page saying that /manager/list is not available.  I call 
the manager using http://foo.bar/manager/list.

Can anyone help to provide me with an example of what should be put into the 
httpd.conf, workers2.properties and server.xml to get the manager to work ?

When I restart tomcat, I see the following in the tomcat logs :
**************************
2004-01-02 20:05:56 HostConfig[test1.foo.bar]: HostConfig: Processing START
2004-01-02 20:05:56 HostConfig[test1.foo.bar]: Deploying discovered web 
applications
2004-01-02 20:05:56 HostConfig[test1.foo.bar]: Deploying web application 
directory manager
2004-01-02 20:05:56 StandardHost[test1.foo.bar]: Installing web application 
at context path /manager from URL file:/home/test/www/manager
2004-01-02 20:05:56 WebappLoader[/manager]: Deploying class repositories to 
work directory 
/usr/local/bin/jakarta-tomcat-4.1.24-LE-jdk14/work/Apache/test1.foo.bar/manager
2004-01-02 20:05:56 ContextConfig[/manager]: No Realm has been configured to 
authenticate against
2004-01-02 20:05:56 ContextConfig[/manager]: Marking this application 
unavailable due to previous error(s).
.....
2004-01-02 20:05:56 StandardContext[/manager]: Context startup failed due to 
previous errors
**************************
When tomcat is running and I try the manager, I don't see anything noticible 
in the apache or tomcat logs.

This is an exampe of what I have done so far :

- I copied the <tomcat>/server/webapps/manager/ -> /home/test/www/manager
- Modified the below files :
**************************
httpd.conf :
<VirtualHost 10.0.0.1:80>
        DocumentRoot /home/test/www
        ServerName test1.foo.bar
        CustomLog logs/test1_access_log combined
        ErrorLog logs/test1_error_log
        <Location "/manager">
                JkUriSet worker ajp13:localhost:8009
        </Location>
        <Location "/*.jsp">
                JkUriSet worker ajp13:localhost:8009
        </Location>
</VirtualHost>
**************************
workers2.properties :
[uri:test1.foo.bar/*.jsp]
worker=ajp13:localhost:8009

[uri:test1.foo.bar/manager]
worker=ajp13:localhost:8009
**************************
server.xml :

<Server port="8005" shutdown="SHUTDOWN" debug="0">
  <!-- Define an Apache-Connector Service -->

<!-- Global JNDI resources -->
  <GlobalNamingResources>

    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>

    <!-- Editable user database that can also be used by
        UserDatabaseRealm to authenticate users -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
       description="User database that can be updated and saved">
    </Resource>
    <ResourceParams name="UserDatabase">
      <parameter>
        <name>factory</name>
        <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
      </parameter>
<parameter>
        <name>pathname</name>
        <value>conf/tomcat-users.xml</value>
      </parameter>
    </ResourceParams>

  </GlobalNamingResources>

<Service name="Tomcat-Apache">

   <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               port="8009" minProcessors="5" maxProcessors="75"
               enableLookups="true" redirectPort="8443"
               acceptCount="10" debug="0" connectionTimeout="20000"
               useURIValidationHack="false"
               
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>

        <Engine name="Apache" defaultHost="test1.foo.bar" debug="0">

      <Logger className="org.apache.catalina.logger.FileLogger"
              prefix="apache_log." suffix=".txt"
              timestamp="true"/>
<!-- Access log processes all requests for this virtual host. -->
      <Valve className="org.apache.catalina.valves.AccessLogValve"
                 directory="logs"  prefix="localhost_access_log." 
suffix=".txt"
                 pattern="common" resolveHosts="false"/>

        <Host name="test1.foo.bar" debug="1"
appBase="/home/test/www"
       unpackWARs="true" autoDeploy="true">
                <Alias>localhost</Alias>
                <Alias>www</Alias>
                <Alias>10.0.0.1</Alias>


                <Context path="/manager/" docBase="/home/test/www/manager/" 
debu
g="1"/>

                <Valve className="org.apache.catalina.valves.AccessLogValve"
                 directory="logs"  prefix="test1_access_log." suffix=".txt"
                 pattern="common" resolveHosts="false"/>
        </Host>
</Engine>

  </Service>

</Server>
**************************
tomcat-users.xml :

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <role rolename="manager"/>
  <user username="admin" password="secret" roles="manager"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>

**************************

If you can't see anything wrong with my config, an example of what you have 
done will help to put me on the right track.

Note : My current Vhosts seem to be serving .jsp requests without a problem.

Thanks for your time,

Regards
Anthony

_________________________________________________________________
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message