Thursday, January 3, 2013

Change default JMX passwords in Alfresco

How to change the default users’ passwords of JMX in Alfresco 4.0.x?

1) Stop Alfresco tomcat.
/var$ sudo /etc/init.d/tomcat6 stop

2) The default user access (For ReadOnly & ReadWrite) and password configurations are stored in
/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/alfresco-jmxrmi.access and
alfresco-/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/jmxrmi.password files.

Copy these files to tomcat/shared/classes/alfresco/extension directory.

/var$ sudo cp /var/lib/tomcat6/webapps/alfresco/WEBINF/
classes/alfresco/alfresco-jmxrmi.access /var/lib/tomcat6/shared/classes/alfresco/extension/alfresco-jmxrmi.access

/var$ sudo cp /var/lib/tomcat6/webapps/alfresco/WEBINF/
classes/alfresco/jmxrmi.password /var/lib/tomcat6/shared/classes/alfresco/extension/jmxrmi.password

Change the password for monitorRole & controlRole in
/var/lib/tomcat6/shared/classes/alfresco/extension/jmxrmi.password file.

monitorRole guestpwd123
controlRole adminpwd123

3) Add “alfresco.jmx.dir” property in /var/lib /tomcat6/shared/classes/alfresco-global.properties
file - pointing to a directory where you have copied alfresco-jmxrmi.access and
jmxrmi.password files.

### JMX Directory ###
alfresco.jmx.dir=/var/lib/tomcat6/shared/classes/alfresco/extension

4) Start Alfresco tomcat.
/var$ sudo /etc/init.d/tomcat6 start

Now, you can configure Alfresco using JMX Client (JConsole) by providing the above passwords.
Refer http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/tasks/jmx-access.html
for accessing remote Alfresco via JMX.

Make sure you have set correct port while connecting to Alfresco. The property
alfresco.rmi.services.port” defines the JMX port in alfresco-global.properties file.

### RMI service ports ###
alfresco.rmi.services.port=60601

So the JMX URL will be:
service:jmx:rmi:///jndi/rmi://<hostname>:60601/alfresco/jmxrmi

Where is the name of your host or IP address.

JMX Username: controlRole
JMX Password: adminpwd123

For more info, refer following links:
1) http://wiki.alfresco.com/wiki/JMX
2) http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/concepts/jmx-introconfig.html
3) http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/concepts/jmxenhance.html



In Association with Amazon.in

No comments:

Post a Comment