瀏覽代碼

AMBARI-3216. 500 Status error with HBase service deployed. (Dilli Arumugam via swagle)

Siddharth Wagle 11 年之前
父節點
當前提交
43cbbdeb80

+ 12 - 4
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java

@@ -743,13 +743,21 @@ public abstract class AbstractProviderModule implements ProviderModule, Resource
       }
       }
 
 
     } catch (Exception e) {
     } catch (Exception e) {
-      LOG.error("Exception while detecting JMX protocol for component: " +
-          componentName, e);
-      LOG.error("Defaulting to HTTP protocol for component: " +
+      LOG.error("Exception while detecting JMX protocol for clusterName = " + clusterName +
+          ", componentName = " + componentName,  e);
+      LOG.error("Defaulting JMX to HTTP protocol for  for clusterName = " + clusterName +
+          ", componentName = " + componentName +
+          componentName);
+      jmxProtocolString = "http";
+    }
+    if (jmxProtocolString == null) {
+      LOG.error("Detected JMX protocol is null for clusterName = " + clusterName +
+          ", componentName = " + componentName);
+      LOG.error("Defaulting JMX to HTTP protocol for  for clusterName = " + clusterName +
+          ", componentName = " + componentName +
           componentName);
           componentName);
       jmxProtocolString = "http";
       jmxProtocolString = "http";
     }
     }
-
     if (LOG.isDebugEnabled()) {
     if (LOG.isDebugEnabled()) {
       LOG.debug("JMXProtocol = " + jmxProtocolString + ", for clusterName=" + clusterName +
       LOG.debug("JMXProtocol = " + jmxProtocolString + ", for clusterName=" + clusterName +
           ", componentName = " + componentName);
           ", componentName = " + componentName);

+ 0 - 5
ambari-server/src/main/java/org/apache/ambari/server/controller/jmx/JMXPropertyProvider.java

@@ -314,11 +314,6 @@ public class JMXPropertyProvider extends AbstractPropertyProvider {
     }
     }
     
     
     String protocol = getJMXProtocol(clusterName, componentName);
     String protocol = getJMXProtocol(clusterName, componentName);
-    if (protocol == null) {
-      throw new SystemException(
-          "Unable to get JMX metrics.  No protocol name for " + componentName, null);
-    }
-
     try {
     try {
       InputStream in = streamProvider.readFrom(getSpec(protocol, hostName, port));
       InputStream in = streamProvider.readFrom(getSpec(protocol, hostName, port));