Logstash + elasticsearch中的UnresolvedAddressException

时间:2015-06-09 10:04:26

标签: elasticsearch logstash

Logstash在我的系统中无效(Windows 7)。我正在使用我的系统中安装的Logstash-1.4.0,kibana-3.0.0,Elasticsearch-1.3.0版本。 我在logstash-1.4.0(Logstash-1.4.0 / logstash.conf)中创建了logstash.conf文件。

input {
  file {
    path => “C:/apache-tomcat-7.0.62/logs/*access*”
  }
}
filter {
  date {
    match => [ “timestamp” , “dd/MMM/yyyy:HH:mm:ss Z” ]
  }
}

output {
  elasticsearch { host => “localhost:9205″}
}

我运行logstash

c:\logstash-1.4.0\bin>logstash agent -f ../logstash.conf

获得以下例外

log4j, [2015-06-09T15:24:45.342] WARN: org.elasticsearch.transport.netty: [logstash-IT-BHARADWAJ-512441] exception caught on transport layer [[id: 0x0ee1f960]], closing connection
java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Net.java:123)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:621)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:108)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:70)
etc……..

如何解决这个问题

1 个答案:

答案 0 :(得分:0)

您无法连接到套接字,默认情况下,elasticsearch位于9200端口上,http为9300,tcp为9300。首先尝试将其更改为9200,默认情况下。