Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Couldn't start host monitor

Couldn't start host monitor

New Contributor

I used CM5beta1, cm crashed when I try to add one machine to the hosts. After I restart the cloudera-scm-server, I can't start host monitor. I got the exception from the cm when start the host monitor:(Exception in the last two lines).

Seems like it is try to get number of hosts from the configuration, but it failed. I can't figure out which config it is loading.

Thanks in advance. Anyone have any idea?

+ date
+ date
Mon Jul 14 07:54:49 UTC 2014
+ umask 027
+ BASE_JAVA_OPTS='-server -XX:+UseConcMarkSweepGC -XX:-CMSConcurrentMTEnabled -XX:+UseParNewGC'
+ MGMT_JAVA_OPTS='-server -XX:+UseConcMarkSweepGC -XX:-CMSConcurrentMTEnabled -XX:+UseParNewGC '
+ MGMT_JAVA_OPTS='-server -XX:+UseConcMarkSweepGC -XX:-CMSConcurrentMTEnabled -XX:+UseParNewGC  -Dmgmt.log.file=mgmt-cmf-mgmt-HOSTMONITOR-elsaudcm001.server.hulu.com.log.out'
+ MGMT_JAVA_OPTS='-server -XX:+UseConcMarkSweepGC -XX:-CMSConcurrentMTEnabled -XX:+UseParNewGC  -Dmgmt.log.file=mgmt-cmf-mgmt-HOSTMONITOR-elsaudcm001.server.hulu.com.log.out -Djava.awt.headless=true'
+ MGMT_JAVA_OPTS='-server -XX:+UseConcMarkSweepGC -XX:-CMSConcurrentMTEnabled -XX:+UseParNewGC  -Dmgmt.log.file=mgmt-cmf-mgmt-HOSTMONITOR-elsaudcm001.server.hulu.com.log.out -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true'
+ MGMT_HOME_ARG_NAME=--mgmt-home
++ dirname /usr/lib/cmf/service/mgmt/mgmt.sh
+ cloudera_config=/usr/lib/cmf/service/mgmt
++ cd /usr/lib/cmf/service/mgmt/../common
++ pwd
+ cloudera_config=/usr/lib/cmf/service/common
+ . /usr/lib/cmf/service/common/cloudera-config.sh
++ set -x
+ locate_java_home
+ '[' -z '' ']'
+ for candidate in '/usr/lib/jvm/java-7-oracle*' '/usr/java/jdk1.7*' '/usr/java/jre1.7*' '/usr/lib/jvm/java-1.7.0-oracle-1.7.0.*' '/usr/lib/jvm/java-1.7.0-oracle-1.7.0.*/jre/' /usr/lib/jvm/j2sdk1.7-oracle /usr/lib/jvm/j2sdk1.7-oracle/jre /usr/lib/j2sdk1.6-sun /usr/lib/jvm/java-6-sun '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*' '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre/' /usr/lib/jvm/j2sdk1.6-oracle /usr/lib/jvm/j2sdk1.6-oracle/jre '/usr/java/jdk1.6*' '/usr/java/jre1.6*' /Library/Java/Home /usr/java/default /usr/lib/jvm/default-java /usr/lib/jvm/java-openjdk /usr/lib/jvm/jre-openjdk /usr/lib/jvm/java '/usr/lib/jvm/java-1.7.0-openjdk*' '/usr/lib/jvm/java-7-openjdk*' /usr/lib/jvm/java-1.6.0-openjdk '/usr/lib/jvm/java-1.6.0-openjdk-*' '/usr/lib/jvm/jre-1.6.0-openjdk*'
+ '[' -e /usr/lib/jvm/java-7-oracle-cloudera/bin/java ']'
+ export JAVA_HOME=/usr/lib/jvm/java-7-oracle-cloudera
+ JAVA_HOME=/usr/lib/jvm/java-7-oracle-cloudera
+ break
+ verify_java_home
+ '[' -z /usr/lib/jvm/java-7-oracle-cloudera ']'
+ echo JAVA_HOME=/usr/lib/jvm/java-7-oracle-cloudera
+ source_parcel_environment
+ '[' '!' -z '' ']'
+ '[' /usr/lib/jvm/java-7-oracle-cloudera '!=' '' ']'
+ JAVA=/usr/lib/jvm/java-7-oracle-cloudera/bin/java
+ [[ -n /usr/share/cmf ]]
+ MGMT_CLASSPATH='/usr/share/cmf/lib/*'
+ [[ -z /usr/share/cmf/lib/* ]]
+ JDBC_JARS=/usr/share/java/mysql-connector-java.jar:/usr/share/cmf/lib/postgresql-9.0-801.jdbc4.jar:/usr/share/java/oracle-connector-java.jar
+ MGMT_CLASSPATH='/usr/share/java/mysql-connector-java.jar:/usr/share/cmf/lib/postgresql-9.0-801.jdbc4.jar:/usr/share/java/oracle-connector-java.jar:/usr/share/cmf/lib/*'
+ DDL_DIR=/usr/share/cmf/schema
+ [[ firehose == \f\i\r\e\h\o\s\e ]]
+ shift
+ MGMT_JAVA_OPTS='-server -XX:+UseConcMarkSweepGC -XX:-CMSConcurrentMTEnabled -XX:+UseParNewGC  -Dmgmt.log.file=mgmt-cmf-mgmt-HOSTMONITOR-elsaudcm001.server.hulu.com.log.out -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Dfirehose.schema.dir=/usr/share/cmf/schema'
+ [[ --pipeline-type HOST_MONITORING =~ SERVICE_MONITORING ]]
++ pwd
+ MGMT_CLASSPATH='/run/cloudera-scm-agent/process/3383-cloudera-mgmt-HOSTMONITOR:/usr/share/java/mysql-connector-java.jar:/usr/share/cmf/lib/postgresql-9.0-801.jdbc4.jar:/usr/share/java/oracle-connector-java.jar:/usr/share/cmf/lib/*'
+ echo Executing: /usr/lib/jvm/java-7-oracle-cloudera/bin/java -server -XX:+UseConcMarkSweepGC -XX:-CMSConcurrentMTEnabled -XX:+UseParNewGC -Dmgmt.log.file=mgmt-cmf-mgmt-HOSTMONITOR-elsaudcm001.server.hulu.com.log.out -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Dfirehose.schema.dir=/usr/share/cmf/schema -Xms239075328 -Xmx239075328 '-XX:OnOutOfMemoryError={{AGENT_COMMON_DIR}}/killparent.sh' -cp '/run/cloudera-scm-agent/process/3383-cloudera-mgmt-HOSTMONITOR:/usr/share/java/mysql-connector-java.jar:/usr/share/cmf/lib/postgresql-9.0-801.jdbc4.jar:/usr/share/java/oracle-connector-java.jar:/usr/share/cmf/lib/*' com.cloudera.cmon.firehose.Main --pipeline-type HOST_MONITORING --mgmt-home /usr/share/cmf
+ exec /usr/lib/jvm/java-7-oracle-cloudera/bin/java -server -XX:+UseConcMarkSweepGC -XX:-CMSConcurrentMTEnabled -XX:+UseParNewGC -Dmgmt.log.file=mgmt-cmf-mgmt-HOSTMONITOR-elsaudcm001.server.hulu.com.log.out -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Dfirehose.schema.dir=/usr/share/cmf/schema -Xms239075328 -Xmx239075328 '-XX:OnOutOfMemoryError={{AGENT_COMMON_DIR}}/killparent.sh' -cp '/run/cloudera-scm-agent/process/3383-cloudera-mgmt-HOSTMONITOR:/usr/share/java/mysql-connector-java.jar:/usr/share/cmf/lib/postgresql-9.0-801.jdbc4.jar:/usr/share/java/oracle-connector-java.jar:/usr/share/cmf/lib/*' com.cloudera.cmon.firehose.Main --pipeline-type HOST_MONITORING --mgmt-home /usr/share/cmf
Exception in thread "main" java.util.NoSuchElementException: 'scm.num.hosts' doesn't map to an existing object
	at org.apache.commons.configuration.AbstractConfiguration.getInt(AbstractConfiguration.java:813)
	at com.cloudera.cmon.firehose.Main.main(Main.java:362)
1 REPLY 1

Re: Couldn't start host monitor

New Contributor

I checked the config for this start:

  • /run/cloudera-scm-agent/process/3339-cloudera-mgmt-HOSTMONITOR/cmon.conf

It doesn't contains key scm.num.hosts. Should I added this key in somewhere. I guess this config is generated dynamicly for each start of host monitor.