Browse Source

AMBARI-5776. ambari-server log has lots of ERROR jmx (ncole)

Nate Cole 11 years ago
parent
commit
787e7eb4c1

+ 5 - 1
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java

@@ -243,7 +243,11 @@ public abstract class AbstractProviderModule implements ProviderModule, Resource
             serviceDesiredProperties.get(service));
           
           for (String compName : portMap.keySet()) {
-            clusterJmxPorts.put(compName, getPortString(portMap.get(compName)));
+            // portString will be null if the property defined for the component doesn't exist
+            // this will trigger using the default port for the component
+            String portString = getPortString(portMap.get(compName));
+            if (null != portString)
+              clusterJmxPorts.put(compName, portString);
           }
         }
       } catch (Exception e) {