ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Fernandez (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-21528) Zookeeper server has incorrect memory setting, missing m in Xmx value
Date Wed, 19 Jul 2017 23:00:00 GMT
Alejandro Fernandez created AMBARI-21528:
--------------------------------------------

             Summary: Zookeeper server has incorrect memory setting, missing m in Xmx value
                 Key: AMBARI-21528
                 URL: https://issues.apache.org/jira/browse/AMBARI-21528
             Project: Ambari
          Issue Type: Bug
          Components: stacks
    Affects Versions: 2.5.2
            Reporter: Alejandro Fernandez
            Assignee: Alejandro Fernandez
            Priority: Blocker
             Fix For: 2.5.2


Repro Steps:

* Installed BI 4.2.0 cluster on IBM Ambari 2.2.2 with Zookeeper
* Upgraded Ambari to 2.5.2.0-146
* Registered HDP 2.6.2.0 repo, installed packages
* Ran service checks
* Started Express Upgrade

Result: _Service Check ZooKeeper_ step failed with {{KeeperErrorCode = ConnectionLoss for
/zk_smoketest}}

This was caused by Zookeeper dying immediately during restart:
{noformat}
Error occurred during initialization of VM
Too small initial heap
{noformat}

{noformat:title=zookeeper-env.sh before upgrade}
export JAVA_HOME=/usr/jdk64/java-1.8.0-openjdk-1.8.0.77-0.b03.el7_2.x86_64
export ZOOKEEPER_HOME=/usr/iop/current/zookeeper-server
export ZOO_LOG_DIR=/var/log/zookeeper
export ZOOPIDFILE=/var/run/zookeeper/zookeeper_server.pid
export SERVER_JVMFLAGS=-Xmx1024m
export JAVA=$JAVA_HOME/bin/java
export CLASSPATH=$CLASSPATH:/usr/share/zookeeper/*
{noformat}

{noformat:title=zookeeper-env.sh after upgrade}
export JAVA_HOME=/usr/jdk64/java-1.8.0-openjdk-1.8.0.77-0.b03.el7_2.x86_64
export ZOOKEEPER_HOME=/usr/hdp/current/zookeeper-client
export ZOO_LOG_DIR=/var/log/zookeeper
export ZOOPIDFILE=/var/run/zookeeper/zookeeper_server.pid
export SERVER_JVMFLAGS=-Xmx1024
export JAVA=$JAVA_HOME/bin/java
export CLASSPATH=$CLASSPATH:/usr/share/zookeeper/*
{noformat}

Note missing "m" in memory setting.

zookeeper-env template contains,
{noformat}
export SERVER_JVMFLAGS={{zk_server_heapsize}}
{noformat}

In this cluster, zookeeper-env contains,
zk_server_heapsize: "1024"

While the params_linux.py file has some inconsistencies with appending the letter "m".
{noformat}
zk_server_heapsize_value = str(default('configurations/zookeeper-env/zk_server_heapsize',
"1024m"))
zk_server_heapsize = format("-Xmx{zk_server_heapsize_value}")
{noformat}

Instead, it should be,
{noformat}
zk_server_heapsize_value = str(default('configurations/zookeeper-env/zk_server_heapsize',
"1024"))
zk_server_heapsize_value = zk_server_heapsize_value.strip()
if len(zk_server_heapsize_value) > 0 and not zk_server_heapsize_value[-1].isdigit():
  zk_server_heapsize_value = zk_server_heapsize_value + "m"
zk_server_heapsize = format("-Xmx{zk_server_heapsize_value}")
{noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message