Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to change zookeeper parameter non-managed by ambari

avatar
Explorer

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

avatar

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.

View solution in original post

4 REPLIES 4

avatar

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.

avatar
Explorer

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.

avatar

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.

avatar
Explorer

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