2017-07-27 171 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