dc-agent.log 报 The event in requested index is outdated and cleared

问题现象

查看 /var/log/dc-agent.log 发现有如下报错:

The event in requested index is outdated and cleared : the requested history has been cleared [16951/1501]
The event in requested index is outdated and cleared : the requested history has been cleared [16955/1501]
The event in requested index is outdated and cleared : the requested history has been cleared [16957/1501]
The event in requested index is outdated and cleared : the requested history has been cleared [16959/1501]
The event in requested index is outdated and cleared : the requested history has been cleared [16961/1501]
The event in requested index is outdated and cleared : the requested history has been cleared [16964/1501]
The event in requested index is outdated and cleared : the requested history has been cleared [16968/1501]
The event in requested index is outdated and cleared : the requested history has been cleared [16970/1501]
The event in requested index is outdated and cleared : the requested history has been cleared [16972/1501]

产生原因

dc-agent 程序会会监听etcd中某些key的value值变化,当长时间没有事件时就会报这个错误。

处理方式

重启dc-agent程序即可:

# 先停止dc-agent
pkill -9 dc-agent  && ps -ef | grep dc-agent

# 重新打开
dc-agent -d -s http://manage01:4001