您的位置:首页 > 运维架构

每天一点hadoop 第十一篇 (时间同步)

2015-05-07 11:17 204 查看
在centos集群中进行spark部署时,无法启动从节点主要就是时间超时

对时间进行同步:

1. 安装 ntp :yum intall ntp

2. 修改配置文件:vi /etc/ntp.conf

server127.127.1.0 minpoll 4 maxpoll 5

fudge 127.127.1.0 stratum 2

3. 重启服务:service ntpd restart

再运行

root@monitor:/etc#ntpdate -q 127.0.0.1

得到

server127.0.0.1, stratum 3, offset -0.000003, delay 0.02565

23 Sep 17:12:00ntpdate[11502]: adjust time server 127.0.0.1 offset -0.000003 s

4.将其他节点的时间与 hadoopmaster同步

配置从节点:

driftfile/var/lib/ntp/drift

restrict127.0.0.1

restrict -6 ::1

restrictdefault kod nomodify notrap nopeer noquery

restrict -6default kod nomodify notrap nopeer noquery #这里是主节点的主机名或者ip server n1 includefile /etc/ntp/crypto/pw

keys/etc/ntp/keys

在其他每一个节点运行命令

ntpdate –u hadoopmaster

启动服务:serviece ntpd start

参考:/content/5975183.html
http://jerrylead.iteye.com/blog/1179492 http://www.aboutyun.com/thread-11395-1-1.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: