Enable real time JMX monitoring in Cognos

In Cognos BI its possible to enable JMX to be able to monitor the java engine. What IBM provides is not really what I was looking for. I wanted to be able to use for example VisualVM to see what happens in real time. This is how to enable the regular JMX monitoring in Cognos which comes out of the box with Tomcat.
  1. Open the bootstrap file which is located in the following path:
    %installpath%\Bin64\bootstrap_winx64.xml
     
  2. Add the following lines directly after <!-- end debug params -->
    <!-- JMX config start -->
    <param>-Dcom.sun.management.jmxremote</param>
    <param>-Dcom.sun.management.jmxremote.port=29001</param>
    <param>-Dcom.sun.management.jmxremote.ssl=false</param>
    <param>-Dcom.sun.management.jmxremote.authenticate=true</param>
    <!-- JMX config end -->
     
     
  3. Save the file.
     
  4. Open the password file located here:
    %Install Path%\bin\jre64\6.0\lib\management\jmxremote.password
    Uncomment the last two lines and set the passwords for each role.

      
  5. Set the permissions on the passwords file: 
    • Change the owner to the local Administrators group.
    • Disable "include inheritable permissions" and remove all permission entries for all users except for the local Administrators group.
      Note: After this has been done you might not be able to open the file normally. If you want to edit or look at the file you need to first start Notepad "as Administrator" and then open the file from there.
       
  6. Restart Cognos.
     
  7. Test the JMX connection using VisualVM (called jvisualvm.exe in the Java JDK):



     

1 comment

  1. Hi John Roos,

    Nice article, But unfortunately i am facing the error while launching JMX connection from the VisualVM

    Error:: "cannot connect to controlRole@Server_Name:29001 using service:JMX:rmi"

    Please help me to resolve this.

    Thanks in advance.

    ReplyDelete