监控docker容器agent日志出现错误:GetDockerApiContainerList err: Error response from daemon: client version 1.41 is too new. Maximum supported API version is 1.40

原因描述:docker api现在最多只能支持到1.40,但是client是1.41版本的
解决方法如下:

[root@vultr bin]# vim /etc/profile
#在文件最后加上
export DOCKER_API_VERSION=1.40
	
再刷新一下生效

[root@vultr bin]# source /etc/profile
	
如果异常提示Maximum supported API version is 1.39,那么在上面文件改为export DOCKER_API_VERSION=1.39
如果异常提示Maximum supported API version is 1.38,那么在上面文件改为export DOCKER_API_VERSION=1.38
最后重启下agent,稍等5分钟,再看是否正常