How to enable Tomcat Manager in an Alfresco installation

In order to address some maintenance tasks in Tomcat, may be useful to get access to the Tomcat Manager (http) interface, things like stop or start an application if you are doing some changes in Alfresco or Share, even a different way to access to its JMX interface using jmxproxy if you are working remotely.

This is a easy step by step guide about how you can enable the Tomcat Manager that comes with an Alfresco default (bundle) installation. Tested with Alfresco Enterprise 4.1.4, but should work with any other Alfresco 4 version.

  • Edit tomcat/conf/tomcat-users.xml and adapt it like below:

[xml]
<tomcat-users>

<role rolename="manager-gui"/>

<role rolename="manager-status"/>

<role rolename="manager-jmx"/>

<role rolename="manager-script"/>

<user username="CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB" roles="repoclient" password="null"/>

<user username="CN=Alfresco Repository, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB" roles="repository" password="null"/>

<user username="manager" roles="manager,manager-gui,manager-status" password="manager"/>

<user username="manager2" roles="manager-jmx,manager-script" password="manager"/>

</tomcat-users>
[/xml]

  • Then edit tomcat/conf/Catalina/localhost/manager.xml and change like this:

[xml]
<Context antiResourceLocking="false" privileged="true" useHttpOnly="true" override="true">

<Valve className="org.apache.catalina.authenticator.BasicAuthenticator" securePagesWithPragma="false" />

</Context>
[/xml]

  • Restart your Tomcat and thats all.

Once Alfresco is up agan, lets try to access to the manager with user “manager” and password “manager”, please avoid using this credentials in production environments.

To access html interface:

http://localhost:8080/manager/html

Screen Shot 2013-05-30 at 12.38.33 PM

To list all applications:

http://localhost:8080/manager/list

To list server information:

http://localhost:8080/manager/serverinfo

To see default session info (use / or /context):

http://localhost:8080/manager/sessions?path=/

To start, stop, and undeploy alfresco or share

http://localhost:8080/manager/start?path=/alfresco

http://localhost:8080/manager/stop?path=/alfresco

http://localhost:8080/manager/undeploy?path=/alfresco

http://localhost:8080/manager/start?path=/share

http://localhost:8080/manager/stop?path=/share

http://localhost:8080/manager/undeploy?path=/share

To see all MBeans (jmxproxy):

http://localhost:8080/manager/jmxproxy.

Screen Shot 2013-05-30 at 12.39.34 PM

Sources: http://forums.alfresco.com/forum/developer-discussions/other-apis/unable-access-tomcat-manager-03292012-1345

and http://www.ixxus.com/blog/2011/02/monitor-and-manage-alfresco-jmx

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.