Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-3651

Disable RBAC cache in AMQ7 Jolokia to reduce Heap Usage.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • AMQ 7.8.0.GA
    • AMQ 7.6.0.GA
    • console
    • None
    • Verified in a release
    • Hide

      RBAC isn't available on AMQ so you can disable the cache. To quickly disable it, open WEB-INF/web.xml in web/console.war with editor and comment out the following <init-param> as follows:

          <!--
          <init-param>
            <param-name>restrictorClass</param-name>
            <param-value>io.hawt.web.RBACRestrictor</param-value>
          </init-param>
          -->
      
      
      Show
      RBAC isn't available on AMQ so you can disable the cache. To quickly disable it, open WEB-INF/web.xml in web/console.war with editor and comment out the following <init-param> as follows: <!-- <init-param> <param-name>restrictorClass</param-name> <param-value>io.hawt.web.RBACRestrictor</param-value> </init-param> -->
    • Hide
      • Have a AMQ7.6 or AMQ 7.5 installation.
      • Create a shell script with following content, change USER, PASSWD, URL, BROKER(broker-name) as per AMQ 7.6
        #!/bin/bash
        USER=admin
        PASSWD=admin
        URL=http://localhost:8161
        BROKER=broker1
        while true
        do
                echo "Start Loop"
        curl -X GET --user ${USER}:${PASSWD} -H "Origin: http://localhost:8161" -H "Content-Type: application/json" --insecure $URL/console/jolokia/read/org.apache.activemq.artemis:broker=%22${BROKER}%22
           curl -X GET --user ${USER}:${PASSWD} -H "Origin: http://localhost:8161"  -H "Content-Type: application/json" --insecure $URL/console/jolokia/read/java.lang:type=Memory/HeapMemoryUsage
             curl -X GET --user ${USER}:${PASSWD} -H "Origin: http://localhost:8161"  -H "Content-Type: application/json" --insecure $URL/console/jolokia/read/org.apache.activemq.artemis:broker=%22${BROKER}%22,component=addresses,address=%22DLQ%22/NumberOfMessages
             curl -X GET --user ${USER}:${PASSWD} -H "Origin: http://localhost:8161"  -H "Content-Type: application/json" --insecure $URL/console/jolokia/read/org.apache.activemq.artemis:broker=%22${BROKER}%22,component=addresses,address=%22ExpiryQueue%22/NumberOfMessages
                echo "End Loop"
                sleep 1m
        done
        
      • Execute this script and monitor Heap Utilization. Heap Utilization goes to 50% and than minor GC event is able to reduce Heap Utilization. There is no load(no consumer and producers), only jolokia calls for monitoring.
      Show
      Have a AMQ7.6 or AMQ 7.5 installation. Create a shell script with following content, change USER, PASSWD, URL, BROKER(broker-name) as per AMQ 7.6 #!/bin/bash USER=admin PASSWD=admin URL=http: //localhost:8161 BROKER=broker1 while true do echo "Start Loop" curl -X GET --user ${USER}:${PASSWD} -H "Origin: http: //localhost:8161" -H "Content-Type: application/json" --insecure $URL/console/jolokia/read/org.apache.activemq.artemis:broker=%22${BROKER}%22 curl -X GET --user ${USER}:${PASSWD} -H "Origin: http: //localhost:8161" -H "Content-Type: application/json" --insecure $URL/console/jolokia/read/java.lang:type=Memory/HeapMemoryUsage curl -X GET --user ${USER}:${PASSWD} -H "Origin: http: //localhost:8161" -H "Content-Type: application/json" --insecure $URL/console/jolokia/read/org.apache.activemq.artemis:broker=%22${BROKER}%22,component=addresses,address=%22DLQ%22/NumberOfMessages curl -X GET --user ${USER}:${PASSWD} -H "Origin: http: //localhost:8161" -H "Content-Type: application/json" --insecure $URL/console/jolokia/read/org.apache.activemq.artemis:broker=%22${BROKER}%22,component=addresses,address=%22ExpiryQueue%22/NumberOfMessages echo "End Loop" sleep 1m done Execute this script and monitor Heap Utilization. Heap Utilization goes to 50% and than minor GC event is able to reduce Heap Utilization. There is no load(no consumer and producers), only jolokia calls for monitoring.

    Attachments

      Issue Links

        Activity

          People

            rhn-support-tasato Tadayoshi Sato
            rhn-support-cpandey Chandra Shekhar Pandey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: