错误提示:
ERROR dns.PrivilegedRegistryDNSStarter (PrivilegedRegistryDNSStarter.java:init(61)) - Error initializing Registry DNS
java.net.BindException:
Problem binding to [xxx:53] java.net.BindException: Address already in
use; For more details see: http://wiki.apache.org/hadoop/BindException
或
resource_management.core.exceptions.ExecutionFailed: Execution of 'ambari-sudo.sh -H -E /usr/hdp/xxx/hadoop-yarn/bin/yarn --config /usr/hdp/xxx/hadoop/conf --daemon start registrydns' returned 1. ERROR: Cannot set priority of registrydns process xxx
原因:YARN Registry DNS的默认端口53本其它进程占用了。
方案一:
1.查询占用53端口的进程/服务
lsof -i:53
查询到PID和User,这里的User一般是systemd-resolved
2.停止占用53端口的进程/服务
systemctl stop systemd-resolved
3.在Ambari界面启动YARN Registry DNS,成功。
方案二:
直接在Ambari界面,YARN -> configs -> advanced -> RegistryDNS Bind Port,修改端口后保存。