通过Ambari增加新的host时候,总是不能自动增加service账号,如hdfs, hive等。
解决办法:修改HDP参数 ignore_groupsusers_create
# python configs.py --help
1.查看参数文件中ignore_groupsusers_create的值:
# cd var/lib/ambari-server/resources/scripts
# python configs.py -u admin -p admin -n $cluster_name -l $ambari_server -t 8080 -a get -c cluster-env |grep -i ignore_groupsusers_create
"ignore_groupsusers_create": "false",
2.修改ignore_groupsusers_create的值:
# python configs.py -u admin -p admin -n $cluster_name -l $ambari_server -t 8080 -a set -c cluster-env -k ignore_groupsusers_create -v ture
把ignore_groupsusers_create从false改成ture,重新add host,问题解决
3.查看配置文件路径
[root@xxxxxxxxx ~]# find -name *cluster-env*
/var/lib/ambari-server/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
/var/lib/ambari-server/resources/stacks/HDP/2.2/configuration/cluster-env.xml
/var/lib/ambari-server/resources/stacks/HDP/2.3.GlusterFS/configuration/cluster-env.xml
/var/lib/ambari-server/resources/stacks/HDP/2.3.GlusterFS/configuration/cluster-env.xml.noversion
/var/lib/ambari-server/resources/stacks/HDP/2.3.GlusterFS/configuration/cluster-env.xml.version
/var/lib/ambari-server/resources/stacks/HDP/3.0/configuration/cluster-env.xml
/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/configuration/cluster-env.xml
/var/lib/ambari-agent/cache/stacks/HDP/2.2/configuration/cluster-env.xml
/var/lib/ambari-agent/cache/stacks/HDP/2.3.GlusterFS/configuration/cluster-env.xml
/var/lib/ambari-agent/cache/stacks/HDP/2.3.GlusterFS/configuration/cluster-env.xml.noversion
/var/lib/ambari-agent/cache/stacks/HDP/2.3.GlusterFS/configuration/cluster-env.xml.version
/var/lib/ambari-agent/cache/stacks/HDP/3.0/configuration/cluster-env.xml
/usr/share/doc/kexec-tools-2.0.15/kdump-in-cluster-environment.txt