最近在执行hive的时候,发现涉及到shuffle的操作全都执行失败;
如下图:
查询yarn日志报错如下:
查询资料得知是没有同步集群时间导致,如下两种解决方案:
1.所有节点同步网络时间:ntpdate -u ntp.aliyun.com、
2.自己搭建一个时间服务器,让集群中的所有机器都同步局域网内的时间服务器。
# 1 选择集群中的某一台机器作为时间服务器,例如master
# 2 保证这台服务器安装了ntp.x86_64。
# 3 保证ntpd 服务运行......
[root@master~]# sudo service ntpd start
# 开机自启动:
[root@master~]# chkconfig ntpd on
# 4 配置相应文件:
[root@master ~]# vi /etc/ntp.conf
# Hosts on local network are less restricted.
# restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
# 添加集群中的网络段位
restrict 192.168.10.0 mask 255.255.255.0 nomodify notrap
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
# server 0.centos.pool.ntp.org iburst # 注释掉
# server 1.centos.pool.ntp.org iburst # 注释掉
# server 2.centos.pool.ntp.org iburst # 注释掉
# server 3.centos.pool.ntp.org iburst # 注释掉
server 127.127.1.0 # -master作为服务器
# 5 其他机器要保证安装ntpdate.x86_64
crontab -e
# 6 其他机器要使用root定义定时器
*/1 * * * * /usr/sbin/ntpdate -u master