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.

How to change zookeeper parameter non-managed by ambari

Solved Go to solution

How to change zookeeper parameter non-managed by ambari

New Contributor

In order to add zookeeper observer in my Zookeeper observer, I need to make append the line "server.4=hostname:2888:3888" by ":observer" in configuration file zoo.cfg . However, this parameter is not managed by ambari. I tried to use the ambari script but not display all parameter

/var/lib/ambari-server/resources/scripts/configs.py --user=admin --password=admin--port=8080 --action=get --host=hostnamexx--cluster=CLUSTPOC--config-type=zoo.cfg --file=/tmp/zooConf.json 

How to change this line

server.4=hostname:2888:3888 

to

server.4=hostname:2888:3888:observer
1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to change zookeeper parameter non-managed by ambari

Hi @lam rab,

Unfortunately ambari doesnt allow you add observers in the zoo.cfg.

You can refer to : https://issues.apache.org/jira/browse/AMBARI-24748

here user is facing the same issue that you are facing.

See if you can manually start zookeeper after changing the zoo.cfg which might help you.

Please accept this answer if this helped you.

4 REPLIES 4

Re: How to change zookeeper parameter non-managed by ambari

Hi @lam rab ,

If ambari is not managing zoo.cfg you cannot change it via configs.py also as configs.py do the same thing ambari does in web UI .why dont you mannually ssh to zeppelin host and

[root@asnaik4 conf]# cd /usr/hdp/current/zookeeper-server/conf
[root@asnaik4 conf]#vi zoo.cfg

If ambari is not managing a config file , the script also cannot help

Please accept this answer if it helps you.

Re: How to change zookeeper parameter non-managed by ambari

New Contributor

Hi @Akhil S Naik

Thank you for you reply, but when I modify via vim zoo.cfg, the config removed when I restart the Zookeeper service.

configs.py or APIs cannot help as you see, they get only the parameters managed by Ambari.

Re: How to change zookeeper parameter non-managed by ambari

Hi @lam rab,

Unfortunately ambari doesnt allow you add observers in the zoo.cfg.

You can refer to : https://issues.apache.org/jira/browse/AMBARI-24748

here user is facing the same issue that you are facing.

See if you can manually start zookeeper after changing the zoo.cfg which might help you.

Please accept this answer if this helped you.

Highlighted

Re: How to change zookeeper parameter non-managed by ambari

New Contributor

The change with vim zoo.cfg and restart zookeeper manually doesn't help as long as we restart zookeeper from ambari