-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

All,

This is my first time trying to configure the manager webapp.

Tomcat 6.0.29 on Linux
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Server VM (build 17.1-b03, mixed mode)

I'm using CATALINA_BASE to run Tomcat from a different base path.
CATALINA_HOME is /usr/local/apache-tomcat-6.0.29 and CATALINA_BASE is
something under /home/chris. My <Host> has the standard "webapps"
appBase and has autoDeploy="true".

I have done the following to add the manager webapp to my own server
instance:

$ cp -r ${CATALINA_HOME}/webapps/manager ${CATALINA_BASE}/webapps
$ cp ${CATALINA_HOME}/conf/tomcat-users.xml ${CATALINA_BASE}/conf/
$ vi ${CATALINA_BASE}/conf/tomcat-users.xml (...)
$ cat ${CATALINA_BASE}/conf/tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?>

<tomcat-users>
  <role rolename="manager"/>
  <user username="chris" password="chris" roles="manager"/>
</tomcat-users>

I have this in my ${CATALINA_BASE}/conf/server.xml:

  <GlobalNamingResources>
    <!-- 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"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>

When I start Tomcat, I can see that the manager app is being deployed
without error:

INFO: Starting service Catalina
Jan 6, 2011 3:43:59 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
Jan 6, 2011 3:43:59 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory manager
Jan 6, 2011 3:43:59 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory (my-webapp)

...(startup messages from my webapp)...

Jan 6, 2011 3:44:06 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8215
Jan 6, 2011 3:44:06 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/64  config=null
Jan 6, 2011 3:44:06 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 7270 ms

When I attempt to navigate my web browser to myhost/manager/html, I get
a 401 response and my browser asks for my username and password. I enter
"chris" and "chris" and the server emits an error message to stdout:

SEVERE: Cannot find message associated with key jaasRealm.unexpectedError
java.lang.SecurityException: Unable to locate a login configuration
        at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:93)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at
javax.security.auth.login.Configuration$3.run(Configuration.java:247)
        at java.security.AccessController.doPrivileged(Native Method)
        at
javax.security.auth.login.Configuration.getConfiguration(Configuration.java:242)
        at
javax.security.auth.login.LoginContext$1.run(LoginContext.java:237)
        at java.security.AccessController.doPrivileged(Native Method)
        at
javax.security.auth.login.LoginContext.init(LoginContext.java:234)
        at
javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
        at
org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:394)
        at
org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:335)
        at
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)
...

I have tried fully-qualifying the name of tomcat-users.xml but that
doesn't seem to help.

What am I missing, here?

I have not modified the META-INF/context.xml or WEB-INF/web.xml files
within the manager webapp.

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0mK0sACgkQ9CaO5/Lv0PB/PQCfUXE7wKjVUXdjsq6mQLfOlCZS
WTsAn2lRX0gX5oBq0tBCb5mW86J9RBel
=pqRl
-----END PGP SIGNATURE-----

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

Reply via email to