2017-07-27 97 views
0

我在Kubernetes集群上部署了Graylog并且一切正常,直到我决定添加环境变量并更新graylog部署。Graylog无法连接到Kubernetes集群中的Elasticsearch

现在,有些东西停止工作。我可以看到,所有的投入都在运行,他们正在接受邮件:

enter image description here

但是,如果我尝试看看收到的消息,则返回500错误以下消息:

a

The docs说,Graylog容器需要调用的服务elasticsearch

docker run --link some-mongo:mongo --link some-elasticsearch:elasticsearch -p 9000:9000 -e GRAYLOG_WEB_ENDPOINT_URI="http://127.0.0.1:9000/api" -d graylog2/server 

如果我连接到graylog吊舱和卷曲elasticsearch:9200,我看到一个成功的结果:

{ 
    "name" : "Vixen", 
    "cluster_name" : "graylog", 
    "cluster_uuid" : "TkZtckzGTnSu3JjERQNf4g", 
    "version" : { 
    "number" : "2.4.4", 
    "build_hash" : "fcbb46dfd45562a9cf00c604b30849a6dec6b017", 
    "build_timestamp" : "2017-01-03T11:33:16Z", 
    "build_snapshot" : false, 
    "lucene_version" : "5.5.2" 
    }, 
    "tagline" : "You Know, for Search" 
} 

但如果graylog日志说,它正试图连接到本地主机:

enter image description here

再次,一切都在努力,直到今天。为什么它试图连接到本地主机,而不是弹性搜索服务?

回答

1

看起来像是一个版本问题。我将graylog容器降级到之前的稳定版本:2.2.3-1,并且它再次开始工作。

我的猜测是,当我今天更新的图像,其中拉破坏一些事情

0

你可能想尝试添加elastichost到graylog.conf

https://github.com/Graylog2/graylog2-server/blob/master/misc/graylog.conf

在管线172

# List of Elasticsearch hosts Graylog should connect to. 
# Need to be specified as a comma-separated list of valid URIs for the http ports of your elasticsearch nodes. 
# If one or more of your elasticsearch hosts require authentication, include the credentials in each node URI that 
# requires authentication. 
# 
# Default: http://127.0.0.1:9200 
#elasticsearch_hosts = http://node1:9200,http://user:[email protected]:19200 

,你可以使自己的graylog.conf,并添加到您的dockerfile再建用它。

0

事实上,Graylog已经转移到HTTP API中Graylog 2.3的最新版本。因此,连接到Elasticsearch集群的方法已更改。您现在可以仅提供ES节点的IP地址而不是zen_ping_unicast_hosts。这是更改此设置的提交 - https://github.com/Graylog2/graylog2-server/commit/4213a2257429b6a0803ab1b52c39a6a35fbde889

这也使我们能够连接AWS ES服务,这在以前是不可能的。请参阅此讨论主题以获取更多见解 - https://github.com/Graylog2/graylog2-server/issues/1473

相关问题