Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-4485

console shows broker-attributes instead of the requested address-attributes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Feedback Received
    • 2.31.2
    • None
    • Web Console
    • None

    Description

      When using the "attributes"-button at the end of a table-row in the Addresses page/table, sometimes the broker-attributes are shown instead of the expected address-attributes.

      Unfortunately, this is not 100% reproducible, but I've seen it several times now and not doubting my actions.

      this time I was able to capture the brower console log:

      [artemis-plugin] current nid=root-org.apache.activemq.artemis-XYZ-addresses-FULL/ADDRESS/NAME/HERE app-efb360a568.js:1:9987
      [artemis-plugin] targetNID=root-org.apache.activemq.artemis-XYZ-addresses-FULL/ADDRESS/NAME/HERE app-efb360a568.js:1:9987
      [hawtio-core-tasks] Executing tasks: LocationChangeStartTasks app-efb360a568.js:1:9987
      [hawtio-core-tasks] Executing task: ConParam with parameters: 
      Array(3) [ {…}, "http://artemis-apps-0:58161/console/artemis/attributes?tab=artemis&nid=root-org.apache.activemq.artemis-XYZ-addresses-FULL%2FADDRESS%2FNAME%2FHERE", "http://artemis-apps-0:58161/console/artemis/artemisAddresses?tab=artemis&nid=root-org.apache.activemq.artemis-XYZ-addresses-FULL%2FADDRESS%2FNAME%2FHERE" ]
      app-efb360a568.js:1:9987
      [hawtio-core-tasks] Executing task: RefreshUserSession with parameters: 
      Array(3) [ {…}, "http://artemis-apps-0:58161/console/artemis/attributes?tab=artemis&nid=root-org.apache.activemq.artemis-XYZ-addresses-FULL%2FADDRESS%2FNAME%2FHERE", "http://artemis-apps-0:58161/console/artemis/artemisAddresses?tab=artemis&nid=root-org.apache.activemq.artemis-XYZ-addresses-FULL%2FADDRESS%2FNAME%2FHERE" ]
      app-efb360a568.js:1:9987
      [hawtio-core-template-cache] request for template at: plugins/jmx/html/attributes/attributes.html app-efb360a568.js:1:9987
      [hawtio-core-template-cache] Getting template: plugins/jmx/html/attributes/attributes.html app-efb360a568.js:1:9987
      [hawtio-core-template-cache] Found template for URL: plugins/jmx/html/attributes/attributes.html app-efb360a568.js:1:9987
      [hawtio-core-template-cache] Adding template: attributeModal.html app-efb360a568.js:1:9987
      [hawtio-jmx] attribute - nid:  root-org.apache.activemq.artemis-XYZ-addresses-FULL/ADDRESS/NAME/HERE app-efb360a568.js:1:9987
      [hawtio-console-assembly] Updated session. Response: 
      Object { data: "ok", status: 200, headers: Wn(t)
      , config: {…}, statusText: "OK", xhrStatus: "complete" }
      app-efb360a568.js:1:9987
      [hawtio-jmx] Updated attributes info cache for mbean org.apache.activemq.artemis:broker="XYZ-ABC-123" 
      Object { op: {…}, attr: {…}, class: "org.apache.activemq.artemis.core.management.impl.ActiveMQServerControlImpl", desc: "Information on the management interface of the MBean" }
      attr: Object { AddressMemoryUsage: {…}, ManagementAddress: {…}, ConnectorServices: {…}, … }
      class: "org.apache.activemq.artemis.core.management.impl.ActiveMQServerControlImpl"
      desc: "Information on the management interface of the MBean"
      op: Object { removeAddressSettings: {…}, listSessions: (2) […], scaleDown: {…}, … }
      <prototype>: Object { … }
      

      my observation is that the "targetNID" is incorrect.
      the brokername that appears in it is truncated on the first "-" character.
      in the redacted output, this is visible as "XYZ"(truncated) vs "XYZ-ABC-123"(correct).
      when I manually fix the redirect URL to include the full brokerName, then the requested information is shown, confirming this a bit more.

      after shallow investigation:
      I think it is likely a defect in (or misuse of) function getRootNid in file addresses.js.
      It seems that getRootNid assumes that the broker-name does not contain a - itself.
      Therefore it accidentally shortens the broker-name, leading to the above problem.

      Attachments

        Activity

          People

            Unassigned Unassigned
            erwindon Erwin Dondorp
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: