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:
<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>
- Then edit tomcat/conf/Catalina/localhost/manager.xml and change like this:
<Context antiResourceLocking="false" privileged="true" useHttpOnly="true" override="true">
<Valve className="org.apache.catalina.authenticator.BasicAuthenticator" securePagesWithPragma="false" />
</Context>
<Valve className="org.apache.catalina.authenticator.BasicAuthenticator" securePagesWithPragma="false" />
</Context>
- 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
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.
Cheers,
Ujjwal Soni
No comments:
Post a Comment