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.

Can not Initialize Zookeeper Service

Can not Initialize Zookeeper Service

New Contributor

I've just set up a cluster and in the step of first run, zookeeper service throws error.

[05/Jan/2020 15:24:23 +0000] 16517 MainThread redactor     INFO     Started launcher: /opt/cloudera/cm-agent/service/zookeeper/zk.sh init --myid=1 ignoreExists
[05/Jan/2020 15:24:23 +0000] 16517 MainThread redactor     INFO     Re-exec watcher: /opt/cloudera/cm-agent/bin/cm proc_watcher 16525
[05/Jan/2020 15:24:23 +0000] 16527 MainThread redactor     INFO     Re-exec redactor: /opt/cloudera/cm-agent/bin/cm redactor --fds 3 5
[05/Jan/2020 15:24:23 +0000] 16527 MainThread redactor     INFO     Started redactor
Sun Jan  5 15:24:23 UTC 2020
+ source_parcel_environment
+ '[' '!' -z '' ']'
+ locate_cdh_java_home
+ '[' -z '' ']'
+ '[' -z /usr/libexec/bigtop-utils ']'
+ local BIGTOP_DETECT_JAVAHOME=
+ for candidate in "${JSVC_HOME}" "${JSVC_HOME}/.." "/usr/lib/bigtop-utils" "/usr/libexec"
+ '[' -e /usr/libexec/bigtop-utils/bigtop-detect-javahome ']'
+ for candidate in "${JSVC_HOME}" "${JSVC_HOME}/.." "/usr/lib/bigtop-utils" "/usr/libexec"
+ '[' -e /usr/libexec/bigtop-utils/../bigtop-detect-javahome ']'
+ for candidate in "${JSVC_HOME}" "${JSVC_HOME}/.." "/usr/lib/bigtop-utils" "/usr/libexec"
+ '[' -e /usr/lib/bigtop-utils/bigtop-detect-javahome ']'
+ BIGTOP_DETECT_JAVAHOME=/usr/lib/bigtop-utils/bigtop-detect-javahome
+ break
+ '[' -z /usr/lib/bigtop-utils/bigtop-detect-javahome ']'
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
++ BIGTOP_DEFAULTS_DIR=/etc/default
++ '[' -n /etc/default -a -r /etc/default/bigtop-utils ']'
++ . /etc/default/bigtop-utils
++ JAVA11_HOME_CANDIDATES=('/usr/java/jdk-11' '/usr/lib/jvm/jdk-11' '/usr/lib/jvm/java-11-oracle')
++ OPENJAVA11_HOME_CANDIDATES=('/usr/lib/jvm/jdk-11' '/usr/lib64/jvm/jdk-11')
++ JAVA8_HOME_CANDIDATES=('/usr/java/jdk1.8' '/usr/java/jre1.8' '/usr/lib/jvm/j2sdk1.8-oracle' '/usr/lib/jvm/j2sdk1.8-oracle/jre' '/usr/lib/jvm/java-8-oracle')
++ OPENJAVA8_HOME_CANDIDATES=('/usr/lib/jvm/java-1.8.0-openjdk' '/usr/lib/jvm/java-8-openjdk' '/usr/lib64/jvm/java-1.8.0-openjdk' '/usr/lib64/jvm/java-8-openjdk')
++ MISCJAVA_HOME_CANDIDATES=('/Library/Java/Home' '/usr/java/default' '/usr/lib/jvm/default-java' '/usr/lib/jvm/java-openjdk' '/usr/lib/jvm/jre-openjdk')
++ case ${BIGTOP_JAVA_MAJOR} in
++ JAVA_HOME_CANDIDATES=(${JAVA8_HOME_CANDIDATES[@]} ${MISCJAVA_HOME_CANDIDATES[@]} ${OPENJAVA8_HOME_CANDIDATES[@]} ${JAVA11_HOME_CANDIDATES[@]} ${OPENJAVA11_HOME_CANDIDATES[@]})
++ '[' -z '' ']'
++ for candidate_regex in ${JAVA_HOME_CANDIDATES[@]}
+++ ls -rvd '/usr/java/jdk1.8*'
++ for candidate_regex in ${JAVA_HOME_CANDIDATES[@]}
+++ ls -rvd '/usr/java/jre1.8*'
++ for candidate_regex in ${JAVA_HOME_CANDIDATES[@]}
+++ ls -rvd '/usr/lib/jvm/j2sdk1.8-oracle*'
++ for candidate_regex in ${JAVA_HOME_CANDIDATES[@]}
+++ ls -rvd '/usr/lib/jvm/j2sdk1.8-oracle/jre*'
++ for candidate_regex in ${JAVA_HOME_CANDIDATES[@]}
+++ ls -rvd /usr/lib/jvm/java-8-oracle-cloudera
++ for candidate in `ls -rvd ${candidate_regex}* 2>/dev/null`
++ '[' -e /usr/lib/jvm/java-8-oracle-cloudera/bin/java ']'
++ export JAVA_HOME=/usr/lib/jvm/java-8-oracle-cloudera
++ JAVA_HOME=/usr/lib/jvm/java-8-oracle-cloudera
++ break 2
+ get_java_major_version JAVA_MAJOR
+ '[' -z /usr/lib/jvm/java-8-oracle-cloudera/bin/java ']'
++ /usr/lib/jvm/java-8-oracle-cloudera/bin/java -version
+ local 'VERSION_STRING=java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)'
+ local 'RE_JAVA=[java|openjdk][[:space:]]version[[:space:]]\"1\.([0-9][0-9]*)\.?+'
+ [[ java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode) =~ [java|openjdk][[:space:]]version[[:space:]]\"1\.([0-9][0-9]*)\.?+ ]]
+ eval JAVA_MAJOR=8
++ JAVA_MAJOR=8
+ '[' 8 -lt 8 ']'
+ verify_java_home
+ '[' -z /usr/lib/jvm/java-8-oracle-cloudera ']'
+ echo JAVA_HOME=/usr/lib/jvm/java-8-oracle-cloudera
+ echo 'using /usr/lib/jvm/java-8-oracle-cloudera as JAVA_HOME'
+ echo 'using 6 as CDH_VERSION'
+ echo 'using /usr/lib/zookeeper as CDH_ZOOKEEPER_HOME'
+ echo 'using /var/run/cloudera-scm-agent/process/79-zookeeper-init as CONF_DIR'
+ set_zookeeper_classpath
+ set_classpath_in_var ZOOKEEPER_CLASSPATH
+ '[' -z ZOOKEEPER_CLASSPATH ']'
+ [[ -n /opt/cloudera/cm ]]
++ find /opt/cloudera/cm/lib/plugins -maxdepth 1 -name '*.jar'
++ tr '\n' :
+ ADD_TO_CP=/opt/cloudera/cm/lib/plugins/event-publish-6.3.1-shaded.jar:/opt/cloudera/cm/lib/plugins/tt-instrumentation-6.3.1.jar:
+ [[ -n '' ]]
+ eval 'OLD_VALUE=$ZOOKEEPER_CLASSPATH'
++ OLD_VALUE=
+ NEW_VALUE=/opt/cloudera/cm/lib/plugins/event-publish-6.3.1-shaded.jar:/opt/cloudera/cm/lib/plugins/tt-instrumentation-6.3.1.jar:
+ export ZOOKEEPER_CLASSPATH=/opt/cloudera/cm/lib/plugins/event-publish-6.3.1-shaded.jar:/opt/cloudera/cm/lib/plugins/tt-instrumentation-6.3.1.jar
+ ZOOKEEPER_CLASSPATH=/opt/cloudera/cm/lib/plugins/event-publish-6.3.1-shaded.jar:/opt/cloudera/cm/lib/plugins/tt-instrumentation-6.3.1.jar
+ echo 'using /opt/cloudera/cm/lib/plugins/event-publish-6.3.1-shaded.jar:/opt/cloudera/cm/lib/plugins/tt-instrumentation-6.3.1.jar as ZOOKEEPER_CLASSPATH'
+ export ZOOKEEPER_HOME=/usr/lib/zookeeper
+ ZOOKEEPER_HOME=/usr/lib/zookeeper
+ export ZOOKEEPER_CONF=/var/run/cloudera-scm-agent/process/79-zookeeper-init
+ ZOOKEEPER_CONF=/var/run/cloudera-scm-agent/process/79-zookeeper-init
+ echo 'ZOOKEEPER_HOME is /usr/lib/zookeeper'
+ echo 'configuration directory is /var/run/cloudera-scm-agent/process/79-zookeeper-init'
+ export 'CLASSPATH=:/var/run/cloudera-scm-agent/process/79-zookeeper-init:/usr/lib/zookeeper/*:/usr/lib/zookeeper/lib/*:/opt/cloudera/cm/lib/plugins/event-publish-6.3.1-shaded.jar:/opt/cloudera/cm/lib/plugins/tt-instrumentation-6.3.1.jar'
+ CLASSPATH=':/var/run/cloudera-scm-agent/process/79-zookeeper-init:/usr/lib/zookeeper/*:/usr/lib/zookeeper/lib/*:/opt/cloudera/cm/lib/plugins/event-publish-6.3.1-shaded.jar:/opt/cloudera/cm/lib/plugins/tt-instrumentation-6.3.1.jar'
+ export 'JAVA_OPTS=-Djava.net.preferIPv4Stack=true '
+ JAVA_OPTS='-Djava.net.preferIPv4Stack=true '
+ '[' init = init ']'
+ IGNORE=ignoreExists
+ export ZOOPIDFILE=/var/run/zookeeper/zookeeper-server.pid
+ ZOOPIDFILE=/var/run/zookeeper/zookeeper-server.pid
+ export ZOOCFGDIR=/var/run/cloudera-scm-agent/process/79-zookeeper-init
+ ZOOCFGDIR=/var/run/cloudera-scm-agent/process/79-zookeeper-init
++ replace_pid -Dzookeeper.log.file=zookeeper-cmf-zookeeper-SERVER-cdh-01.log -Dzookeeper.log.dir=/var/log/zookeeper -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.rmi.port=9010 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djute.maxbuffer=4194304 -Dzookeeper.datadir.autocreate=false -Xms463470592 -Xmx463470592 -XX:+HeapDumpOnOutOfMemoryError '-XX:HeapDumpPath=/tmp/zookeeper_zookeeper-SERVER-acab79d0bfdc2559ab3a87c176d1ea04_pid{{PID}}.hprof' -XX:OnOutOfMemoryError=/opt/cloudera/cm-agent/service/common/killparent.sh
++ sed 's#{{PID}}#16525#g'
++ echo -Dzookeeper.log.file=zookeeper-cmf-zookeeper-SERVER-cdh-01.log -Dzookeeper.log.dir=/var/log/zookeeper -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.rmi.port=9010 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djute.maxbuffer=4194304 -Dzookeeper.datadir.autocreate=false -Xms463470592 -Xmx463470592 -XX:+HeapDumpOnOutOfMemoryError '-XX:HeapDumpPath=/tmp/zookeeper_zookeeper-SERVER-acab79d0bfdc2559ab3a87c176d1ea04_pid{{PID}}.hprof' -XX:OnOutOfMemoryError=/opt/cloudera/cm-agent/service/common/killparent.sh
+ ZOOKEEPER_SERVER_OPTS='-Dzookeeper.log.file=zookeeper-cmf-zookeeper-SERVER-cdh-01.log -Dzookeeper.log.dir=/var/log/zookeeper -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.rmi.port=9010 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djute.maxbuffer=4194304 -Dzookeeper.datadir.autocreate=false -Xms463470592 -Xmx463470592 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/zookeeper_zookeeper-SERVER-acab79d0bfdc2559ab3a87c176d1ea04_pid16525.hprof -XX:OnOutOfMemoryError=/opt/cloudera/cm-agent/service/common/killparent.sh'
+ export 'JVMFLAGS= -Dzookeeper.log.file=zookeeper-cmf-zookeeper-SERVER-cdh-01.log -Dzookeeper.log.dir=/var/log/zookeeper -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.rmi.port=9010 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djute.maxbuffer=4194304 -Dzookeeper.datadir.autocreate=false -Xms463470592 -Xmx463470592 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/zookeeper_zookeeper-SERVER-acab79d0bfdc2559ab3a87c176d1ea04_pid16525.hprof -XX:OnOutOfMemoryError=/opt/cloudera/cm-agent/service/common/killparent.sh'
+ JVMFLAGS=' -Dzookeeper.log.file=zookeeper-cmf-zookeeper-SERVER-cdh-01.log -Dzookeeper.log.dir=/var/log/zookeeper -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.rmi.port=9010 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djute.maxbuffer=4194304 -Dzookeeper.datadir.autocreate=false -Xms463470592 -Xmx463470592 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/zookeeper_zookeeper-SERVER-acab79d0bfdc2559ab3a87c176d1ea04_pid16525.hprof -XX:OnOutOfMemoryError=/opt/cloudera/cm-agent/service/common/killparent.sh'
+ export ZOO_DATADIR_AUTOCREATE_DISABLE=true
+ ZOO_DATADIR_AUTOCREATE_DISABLE=true
+ '[' ignoreExists '!=' ignoreExists ']'
++ /usr/lib/zookeeper/bin/zkServer-initialize.sh --myid=1
/opt/cloudera/cm-agent/service/zookeeper/zk.sh: line 52: /usr/lib/zookeeper/bin/zkServer-initialize.sh: No such file or directory
+ INIT_OUT=
+ RET=127
+ '[' 127 -eq 0 ']'
+ echo
+ grep -q 'already exists'
+ '[' 1 -eq 0 ']'
+ exit 127

 Other services look fine. Thanks in advance.

Don't have an account?
Coming from Hortonworks? Activate your account here