1. 程式人生 > >ELK學習13_logstash啟動報錯[logstash.outputs.elasticsearch] Unknown setting 'host' for elasticsearch

ELK學習13_logstash啟動報錯[logstash.outputs.elasticsearch] Unknown setting 'host' for elasticsearch

啟動elasticsearch後:

[[email protected] config]$ netstat -tnlp|grep java
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp6       0      0 127.0.0.1:9200          :::*                    LISTEN      22138/java          
tcp6       0
0 127.0.0.1:9300 :::* LISTEN 22138/java
  • 1
  • 2
  • 3
  • 4
  • 5

再啟動logstash出現報錯

[[email protected] config]# logstash -f logstash-elasticsearch.conf 
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
Sending Logstash's logs to /usr/local/logstash-5.4.0/logs which is now configured via log4j2.properties
[2017-05-25T08:05:03,717
][ERROR][logstash.outputs.elasticsearch] Unknown setting 'host' for elasticsearch [2017-05-25T08:05:03,767][ERROR][logstash.agent ] Cannot create pipeline {:reason=>"Something is wrong with your configuration."}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

其中logstash-elasticsearch.conf的配置如下:

input { stdin {} }
output {
        elasticsearch {
                host => '127.0.0.1'
}
stdout { codec => rubydebug } }
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

解決方法: 
將配置裡面的host改為hosts,好像是因為文件的一個bug。 
修改過後連線成功:

[2017-05-25T08:16:32,965][INFO ][logstash.pipeline        ] Pipeline main started
The stdin plugin is now waiting for input:
[2017-05-25T08:16:33,156][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600}
{
    "@timestamp" => 2017-05-25T12:16:32.992Z,
      "@version" => "1",
          "host" => "ELK",
       "message" => "test"
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

In the elasticsearch input, it’s hosts no matter which version. However, in the elasticsearch output, it was host before Logstash 2.0 and then the property name has been standardized to hosts. – Val Mar 10 ‘16 at 13:22 
參考自:https://stackoverflow.com/questions/32200868/logstash-input-from-elasticsearch-error

原文來自:http://blog.csdn.net/u010521366/article/details/72747458?utm_source=itdadao&utm_medium=referral

相關推薦

ELK學習13_logstash啟動[logstash.outputs.elasticsearch] Unknown setting 'host' for elasticsearch

啟動elasticsearch後: [[email protected] config]$ netstat -tnlp|grep java (Not all processes could be identified, non-owned process in

tomcat啟動:Could not publish server configuration for Tomcat v7.0 Server at localhost。

我用的是tomcat7.0.82. tomcat報錯,無法啟動。 **報錯資訊:**Could not publish server configuration for Tomcat v7.0 server at localhost. 和 Server Tomcat v7.0 Ser

mycat啟動:could not reserve enough space for 2097152KB object heap 解決辦法

mycat啟動報錯:解決辦法:1、修改wrapper.xml中記憶體引數wrapper.java.additional.10=-Xmx4G wrapper.java.additional.11=-Xms1G  根據實際情況設定例如修改成wrapper.java.addit

tomcat啟動:Unable to complete the scan for annotations for web application

tomcat啟動報錯,具體報錯資訊如下: Unable to complete the scan for annotations for web application [/Ftrans] due to a StackOverflowError. Possible root

信息是Error setting null for parameter #1 with JdbcType OTHER

mode term value 類型 需要 ati sca err image 報錯信息是:nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapp

【.netcore學習】.netcore添加到 supervisor 守護進程自啟動

comm 配置 err pos service program lba ubun figure 配置 supervisor [program:HelloWebApp] command=dotnet run directory=/home/python/dotnet/myw

ELK 啟動

如下是我自行搭建的一個elk群集,當我在啟動叢集的時候,一個節點啟動失敗,我對比了了叢集的其他機器配置,排除了配置問題,結合操作記錄,結合輸出資訊,我懷疑是某個檔案許可權問題,於是我檢查了相關許可權,系日誌檔案造成,我刪除執行命令的輸出日誌,重新以非root賬號啟動,elk成功啟動,如下為輸出程式碼,希望後面

LogStash 啟動

報錯資訊如下: {:exception=>LogStash::ConfigLoadingError, :message=>"The following config files contains non-ascii characters but are not

安裝mongodb後啟動libstdc++

nbsp 下載 安裝mongodb 文件 lib64 png str rep 啟動 安裝mongo後啟動報錯如下圖 顯然說是libstdc++.so文件版本的問題,這種一般都是gcc版本太低了 接著查詢gcc的版本 strings /usr/lib/libstd

linux下weblogic11g成功安裝後,啟動Getting boot identity from user

tro ace author reason tac ica ons pst pri <2015-7-1 下午05時46分33秒 CST> <Info> <Management> <BEA-141107> <Versi

spriing boot 啟動:Cannot determine embedded database driver class for database type NONE

.class sre 5.0 sin via cor pan cep can 最近在學習使用spring boot。使用maven創建好工程,只引用需要用到的spring boot相關的jar包,除此之外沒有任何的配置。 寫了一個最簡單的例子,如下所示: 1 pa

centos7 網卡啟動

mac解決辦法:網卡mac 寫入配置文件本文出自 “磚家博客” 博客,請務必保留此出處http://wsxxsl.blog.51cto.com/9085838/1929829centos7 網卡啟動報錯

kibana 啟動

kibana 啟動報錯kibana4.1 啟動報錯{"name":"Kibana","hostname":"linux-node1.example.com","pid":3941,"level":60,"err":{"message":"unknown error","name":"Error","stack

freeradius 啟動Refusing to start with libssl version OpenSSL 1.0.1

all bss sim span family sin pop div con 改動etc/raddb下的radiusd.conf文件 找到allow_vulnerable_openssl = no,改動成allow_vulnerable_openssl = ye

關於spring boot項目啟動問題

系列 cnblogs mage 函數 img boot 1.8 沒有 mod 這次用了spring boot,項目在啟動時報錯,由於我用的是jdk 1.7 ,該項目默認的是jdk 1.8,所以要把下面這一系列配置改好才行。廢話不多說,上圖: 一看發現,項

解決window7 x64位Anaconda啟動:AttributeError: '_NamespacePath' object has no attribute 'sort'

tools 詳細 官網 rec tro pytho context object led 最近論文需要用到python做數據分析,python語法簡單,但是Windows下安裝第三方包惡心的要命,statsmodels用pip死活安裝不上,網上查了說包相互依賴windows

msyql 啟動 找不到pid 文件

mysql 數據庫啟動 pid 文件安裝完mysql 啟動mysql 數據庫 報錯 Starting MySQL.The server quit without updating PID file (/app/mysql/mysql/data/mysqld.pid).[FAILED]Starting MyS

WAS Server 啟動無法找到秘鑰解決辦法

webshpere報錯日誌:[7/18/17 18:04:24:582 CST] 0000000a ORBRas E com.ibm.ws.orbimpl.transport.WSTransport createServerSocket P=254162:O=0:CT ORBX0390E: Ca

Myeclipse啟動:An error has occurred.See the log file

entry classpath ret 出現 restore div nap cati security 出現這個問題是因為斷電前myeclipse還在運行,日誌報錯如下: !ENTRY org.eclipse.osgi 4 0 2017-07-24 08:29:48.4

php-fpm啟動:libgearman.so.8: No such file or directory in Unknown on line 0

php 報錯 php-fpm 從一臺服務器上拷貝php-fpm程序到另一臺後啟動提示錯誤:/etc/init.d/php-fpm-5.4 start Starting php-fpm [27-Jul-2017 11:31:39] NOTICE: PHP message: PHP Warning: