JNA not found & failed to install template

Hello everyone, I'm new to logstash and I'm learning to write configuration files.
As the example goes:

input { stdin { } }
filter {
grok {
match => { "message" => "%{COMBINEDAPACHELOG}" }
}
date {
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
}
}
output {
elasticsearch { host => localhost }
stdout { codec => rubydebug }
}

I alwasy get a warning "JNA not found. native methods will be disabled" even after I installed 'libjna-java' on my ubuntu.
Logstash prints like this:

Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
[2015-08-27 20:13:24.549] WARN -- Concurrent: [DEPRECATED] Java 7 is deprecated, please use Java 8.
Java 7 support is only best effort, it may not work. It will be removed in next release (1.0).
Aug 27, 2015 8:13:24 PM org.elasticsearch.node.internal.InternalNode
INFO: [logstash-BabyLenovo-10844-11626] version[1.7.0], pid[10844], build[929b973/2015-07-16T14:31:07Z]
Aug 27, 2015 8:13:24 PM org.elasticsearch.node.internal.InternalNode
INFO: [logstash-BabyLenovo-10844-11626] initializing ...
Aug 27, 2015 8:13:24 PM org.elasticsearch.plugins.PluginsService
INFO: [logstash-BabyLenovo-10844-11626] loaded [], sites []
Aug 27, 2015 8:13:25 PM org.elasticsearch.bootstrap.Natives
WARNING: JNA not found. native methods will be disabled.
Aug 27, 2015 8:13:26 PM org.elasticsearch.node.internal.InternalNode
INFO: [logstash-BabyLenovo-10844-11626] initialized
Aug 27, 2015 8:13:26 PM org.elasticsearch.node.internal.InternalNode start
INFO: [logstash-BabyLenovo-10844-11626] starting ...
Aug 27, 2015 8:13:26 PM org.elasticsearch.transport.TransportService doStart
INFO: [logstash-BabyLenovo-10844-11626] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/192.168.168.29:9300]}
Aug 27, 2015 8:13:26 PM org.elasticsearch.discovery.DiscoveryService doStart
INFO: [logstash-BabyLenovo-10844-11626] elasticsearch/YijNCyeCTIe6aSHlXetu5g
Aug 27, 2015 8:13:56 PM org.elasticsearch.discovery.DiscoveryService waitForInitialState
WARNING: [logstash-BabyLenovo-10844-11626] waited for 30s and no initial state was set by the discovery
Aug 27, 2015 8:13:56 PM org.elasticsearch.node.internal.InternalNode start
INFO: [logstash-BabyLenovo-10844-11626] started
Failed to install template: waited for [30s] {:level=>:error}
Logstash startup completed
Logstash shutdown completed

But when I remove the line "elasticsearch..." in the output block, everything goes fine.
Why does it happen and how to solve this problem?
Also, as you can see, it reports a problem "Failed to install template" as well. How can I deal with that?
Thanks a lot~

Either elasticsearch is not running, or is not running on localhost on the default port.

Hi, I met the same trouble. Can you tell me how to deal with it finally?

I am sure Elasticsearch running on port 9200.
And I can post date using the following shell command
curl -XPOST http://localhost:9200/logstash-2015.06.21/testlog -d '{
"user" : "chenlin7",
"mesg" : "first message into Elasticsearch"
}'