我不记得我的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
而且我可以看到,实际上,弹性search正在监听正确的端口:
[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。 我使用端口2541 logstash。 那也没关系
而logstash也是这样做的。 我通常把logstash放在一个屏幕会话中。 当我进入屏幕会话时,我可以看到飞行的所有日志信息。
我试过停止并开始elasticsearch以及logstash。 但我仍然看到相同的信息。
有人可以让我知道发生了什么事吗? 我该如何纠正?
谢谢