# JNA not found & failed to install template

**URL:** <https://discuss.elastic.co/t/jna-not-found-failed-to-install-template/28176>\
**Category:** Logstash\
**Created:** [August 27, 2015, 12:17pm UTC](https://discuss.elastic.co/t/jna-not-found-failed-to-install-template/28176 "2015-08-27T12:17:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TramsWang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tramswang/32/4473_2.png) [@TramsWang](https://discuss.elastic.co/u/TramsWang)\
**Post date:** [August 27, 2015, 12:17pm UTC](https://discuss.elastic.co/t/jna-not-found-failed-to-install-template/28176/1 "2015-08-27T12:17:54Z")

</div>

## 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~

---

<div class="post-metadata">

**Author:** ![OrangeDog](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/orangedog/32/4630_2.png) [@OrangeDog](https://discuss.elastic.co/u/OrangeDog)\
**Post date:** [September 8, 2015, 9:37am UTC](https://discuss.elastic.co/t/jna-not-found-failed-to-install-template/28176/2 "2015-09-08T09:37:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Zhangyabing](https://avatars.discourse-cdn.com/v4/letter/z/48db29/32.png) [@Zhangyabing](https://discuss.elastic.co/u/Zhangyabing)\
**Post date:** [September 18, 2015, 2:10am UTC](https://discuss.elastic.co/t/jna-not-found-failed-to-install-template/28176/3 "2015-09-18T02:10:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Zhangyabing](https://avatars.discourse-cdn.com/v4/letter/z/48db29/32.png) [@Zhangyabing](https://discuss.elastic.co/u/Zhangyabing)\
**Post date:** [September 18, 2015, 2:16am UTC](https://discuss.elastic.co/t/jna-not-found-failed-to-install-template/28176/4 "2015-09-18T02:16:00Z")

</div>

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](http://localhost:9200/logstash-2015.06.21/testlog) -d '{  
"user" : "chenlin7",  
"mesg" : "first message into Elasticsearch"  
}'

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 5:28am UTC](https://discuss.elastic.co/t/jna-not-found-failed-to-install-template/28176/5 "2017-07-06T05:28:45Z")

</div>


