Tomcat Manager Application and HTTP 404 Error
Posted
by
David
on Ask Ubuntu
See other posts from Ask Ubuntu
or by David
Published on 2012-02-24T19:40:09Z
Indexed on
2012/11/05
11:25 UTC
Read the original article
Hit count: 318
I am trying to set up the admin application for a Tomcat 6.0.24 instance. None of the searches I've done turn up anything I can use. I am using this configuration for Apache 2.2.14:
Alias /manager /usr/share/tomcat6-admin/manager
<Directory "/usr/share/tomcat6-admin/manager">
Options Indexes FollowSymLinks
AllowOverride None
allow from all
</Directory>
ProxyPass /manager ajp://localhost:8009/manager
In the tomcat-users.xml I have this:
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="admin"/>
<role rolename="operator"/>
<role rolename="manager"/>
<user username="admin" password="nopasswordforyou" roles="admin,tomcat,manager"/>
<user username="operator" password="nevermind" roles="operator"/>
</tomcat-users>
I found the docs that suggested I needed manager-gui
role installed and defined, but that appears to be Tomcat 7, not Tomcat 6.
The manager.xml is the default provided with Ubuntu Lucid Lynx 10.04:
<Context path="/manager"
docBase="/usr/share/tomcat6-admin/manager"
antiResourceLocking="false" privileged="true" />
If I access /manager
from a web browser, I get a 404 error from Tomcat: "requested resource not available." If I access /manager/images
I get the same thing. If I access /manager/401.jsp
I get the actual page.
In addition, the server.xml has not only the usual Realm (UserDatabaseRealm
) but also one for MySQL authentication (JDBCRealm
). Investigating this showed that the role of manager
was not present there for the user admin
; I fixed that by doing:
INSERT USER_ROLE_DB SET USER_NAME='admin', ROLE_NAME='manager';
I restarted Tomcat, although I suspect that was overkill. No change. I don't see any errors in catalina.out or in localhost.* log files.
What am I missing? What is the interaction between the different realms? How do I get the manager application working?
© Ask Ubuntu or respective owner