1. hosts文件:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
172.xx.xx.xx master01
2. hostname
[hadoop@cdh ~]$ hostname
master01
3. /etc/cloudera-scm-agent/config.ini配置
# Hostname of the CM server.
server_host=172.xx.xx.xx
# Port that the CM server is listening on.
server_port=7182
上面是我开始的配置,因为公司内网只能使用域名访问,所以申请了cdh.xxx.cn二级域名,接下来我修改成如下:
1. hosts文件:
172.xx.xx.xx cdh.xxx.cn
2.hostname
cdh.xxx.cn
3. 修改postgresql数据库中host的数据,将下面name的master01改为cdh.xxx.cn
scm=> select host_id, host_identifier, name, ip_address from hosts;
host_id | host_identifier | name | ip_address
---------+--------------------------------------+----------+--------------
1 | 572e6ee2-df4d-4001-9082-7115a2007bc2 | master01 | 172.xx.xx.xx
(1 行记录)
重启 cloudera-scm-agent 和 cloudera-scm-server
命令如下:
service cloudera-scm-agent restart
service cloudera-scm-server restart
|