Ver código fonte

AMBARI-10310. 'Supervisor Process' alert after changing -Dcom.sun.management.jmxremote.port (aonishuk)

Andrew Onishuk 10 anos atrás
pai
commit
ce5cc87c51

+ 1 - 0
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java

@@ -329,5 +329,6 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog {
    */
    */
   @Override
   @Override
   protected void executeDMLUpdates() throws AmbariException, SQLException {
   protected void executeDMLUpdates() throws AmbariException, SQLException {
+    addNewConfigurationsFromXml();
   }
   }
 }
 }

+ 1 - 1
ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/alerts.json

@@ -169,7 +169,7 @@
         "enabled": true,
         "enabled": true,
         "source": {
         "source": {
           "type": "PORT",
           "type": "PORT",
-          "uri": "56431",
+          "uri": "{{storm-env/jmxremote_port}}",
           "default_port": 56431,
           "default_port": 56431,
           "reporting": {
           "reporting": {
             "ok": {
             "ok": {

+ 5 - 0
ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/configuration/storm-env.xml

@@ -37,6 +37,11 @@
     <value>/var/run/storm</value>
     <value>/var/run/storm</value>
     <description></description>
     <description></description>
   </property>
   </property>
+  <property>
+    <name>jmxremote_port</name>
+    <value>56431</value>
+    <description></description>
+  </property>
   
   
   <!-- storm-env.sh -->
   <!-- storm-env.sh -->
   <property>
   <property>

+ 1 - 1
ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/configuration/storm-site.xml

@@ -269,7 +269,7 @@
   </property>
   </property>
   <property>
   <property>
     <name>supervisor.childopts</name>
     <name>supervisor.childopts</name>
-    <value>-Xmx256m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=56431 -javaagent:/usr/lib/storm/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8650,wireformat31x=true,mode=multicast,config=/usr/lib/storm/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Supervisor_JVM</value>
+    <value>-Xmx256m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port={{jmxremote_port}} -javaagent:/usr/lib/storm/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8650,wireformat31x=true,mode=multicast,config=/usr/lib/storm/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Supervisor_JVM</value>
     <description>This parameter is used by the storm-deploy project to configure the jvm options for the supervisor daemon.</description>
     <description>This parameter is used by the storm-deploy project to configure the jvm options for the supervisor daemon.</description>
   </property>
   </property>
   <property>
   <property>

+ 1 - 0
ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params.py

@@ -81,6 +81,7 @@ rest_api_port = "8745"
 rest_api_admin_port = "8746"
 rest_api_admin_port = "8746"
 rest_api_conf_file = format("{conf_dir}/config.yaml")
 rest_api_conf_file = format("{conf_dir}/config.yaml")
 storm_env_sh_template = config['configurations']['storm-env']['content']
 storm_env_sh_template = config['configurations']['storm-env']['content']
+jmxremote_port = config['configurations']['storm-env']['jmxremote_port']
 
 
 if 'ganglia_server_host' in config['clusterHostInfo'] and \
 if 'ganglia_server_host' in config['clusterHostInfo'] and \
     len(config['clusterHostInfo']['ganglia_server_host'])>0:
     len(config['clusterHostInfo']['ganglia_server_host'])>0:

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-site.xml

@@ -73,7 +73,7 @@
 
 
   <property>
   <property>
     <name>supervisor.childopts</name>
     <name>supervisor.childopts</name>
-    <value>-Xmx256m _JAAS_PLACEHOLDER -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=56431 -javaagent:/usr/hdp/current/storm-supervisor/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8650,wireformat31x=true,mode=multicast,config=/usr/hdp/current/storm-supervisor/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Supervisor_JVM</value>
+    <value>-Xmx256m _JAAS_PLACEHOLDER -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port={{jmxremote_port}} -javaagent:/usr/hdp/current/storm-supervisor/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8650,wireformat31x=true,mode=multicast,config=/usr/hdp/current/storm-supervisor/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Supervisor_JVM</value>
     <description>This parameter is used by the storm-deploy project to configure the jvm options for the supervisor daemon.</description>
     <description>This parameter is used by the storm-deploy project to configure the jvm options for the supervisor daemon.</description>
   </property>
   </property>