完整报错如下:
2018-03-21T20:02:29.180+0800 ERROR [publisher_pipeline_output] pipeline/output.go:154 Failed to connect to backoff(elasticsearch(http://xx.xx.xx.xx:9200)): Connection marked as failed because the onConnect callback failed: cannot retrieve the elasticsearch license from the /_license endpoint, Metricbeat requires the default distribution of Elasticsearch. Please make the endpoint accessible to Metricbeat so it can verify the license.: could not extract license information from the server response: unknown state, received: 'invalid'
解决方法:通过日志可以发现服务器时间不对,修改服务器时间并重启es即可,下图为正常的情况:

注:重启es需使用su es命令切换至es账户,然后执行命令nohup /xxx/elasticsearch/bin/elasticsearch & > nohup.out
这篇博客主要讲述了在遇到Metricbeat无法连接到Elasticsearch,并报错'不能从/_license endpoint获取Elasticsearch许可证'的问题时,如何通过检查服务器时间并进行调整来解决问题。错误的根本原因是服务器时间不准确导致连接失败。解决方案是同步服务器时间,然后重启Elasticsearch服务。
1557

被折叠的 条评论
为什么被折叠?



