logstash/kibana 无法连接到实例

logstash/kibana 无法连接到实例

我不记得在我的 logstash 服务器上做过任何更改。截至昨天,它运行良好!我用它来运行一些查询。

然而..今天当我进入我的 logstash 页面时,我只看到出现一条消息:

Connection Failed

Possibility #1: Your elasticsearch server is down or unreachable

This can be caused by a network outage, or a failure of the Elasticsearch process. If you have     recently run a query that required a terms facet to be executed it is possible the process has run out     of memory and stopped. Be sure to check your Elasticsearch logs for any sign of memory pressure.

Possibility #2: You are running Elasticsearch 1.4 or higher

Elasticsearch 1.4 ships with a security setting that prevents Kibana from connecting. You will need     to set http.cors.allow-origin in your elasticsearch.yml to the correct protocol, hostname, and port (if     not 80) that your access Kibana from. Note that if you are running Kibana in a sub-url, you should     exclude the sub-url path and only include the protocol, hostname and port. For example,     http://mycompany.com:8080, not http://mycompany.com:8080/kibana.

Click back, or the home button, when you have resolved the connection issue

我可以轻松看出 elasticsearch 1.1.1 正在该主机上运行:

[root@logs:~] #ps -ef | grep elasticsearch | grep -i -v -e grep -e screen

root     16666  9640  6 09:00 pts/1    00:05:49 /etc/alternatives/javahome/bin/java -Xms256m -Xmx1g     -Xss256k -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -    XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError     -Delasticsearch -Des.foreground=yes -Des.path.home=/usr/local/elasticsearch-1.1.1 -cp     :/usr/local/elasticsearch-1.1.1/lib/elasticsearch-1.1.1.jar:/usr/local/elasticsearch-    1.1.1/lib/*:/usr/local/elasticsearch-1.1.1/lib/sigar/* org.elasticsearch.bootstrap.Elasticsearch

我可以看到,事实上,弹性搜索正在监听正确的端口:

[root@logs:~] #netstat -tulpn | grep -i listen | grep java

tcp        0      0 :::2541                     :::*                        LISTEN      16722/java

tcp        0      0 :::9200                     :::*                        LISTEN      16666/java    

tcp        0      0 :::9300                     :::*                        LISTEN      16666/java

tcp        0      0 :::9301                     :::*                        LISTEN      16722/java

以上所有端口均用于 elasticsearch。我为 logstash 使用端口 2541。这样也可以。

logstash 也在发挥作用。我通常会在屏幕会话中隐藏 logstash 的详细运行。当我进入该屏幕会话时,我可以看到所有日志信息飞过。

我尝试停止并启动 elasticsearch 和 logstash。但我仍然看到相同的消息。

有人能告诉我发生了什么吗?我该如何纠正这个问题?

谢谢

相关内容