# Failed to install template: waited for \[30s\]

**URL:** <https://discuss.elastic.co/t/failed-to-install-template-waited-for-30s/38024>\
**Category:** Logstash\
**Created:** [December 28, 2015, 7:19am UTC](https://discuss.elastic.co/t/failed-to-install-template-waited-for-30s/38024 "2015-12-28T07:19:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Zheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jason_zheng/32/4041_2.png) [@Jason\_Zheng](https://discuss.elastic.co/u/Jason_Zheng)\
**Post date:** [December 28, 2015, 7:19am UTC](https://discuss.elastic.co/t/failed-to-install-template-waited-for-30s/38024/1 "2015-12-28T07:19:39Z")

</div>

Hi All,

My ES (1.7.4) is running well, but when I start logstash (1.5.2), something wrong with my logstash conf?

ES Status  
`$curl localhost:9200/_nodes/process?pretty`

> ```
> {
> "cluster_name" : "es_course_master",
> "nodes" : {
> "iAqkfDv5Ql2UPoykTjwcTg" : {
> "name" : "Sharon Friedlander",
> "transport_address" : "inet[/140.92.25.241:9300]",
> "host" : "es_course",
> "ip" : "140.92.25.241",
> "version" : "1.7.4",
> "build" : "0d3159b",
> "http_address" : "inet[/140.92.25.241:9200]",
> "process" : {
> "refresh_interval_in_millis" : 1000,
> "id" : 26714,
> "max_file_descriptors" : 65535,
> "mlockall" : false
> }
> }
> }
> }
> 
> ```

/etc/hosts  
`140.92.25.241 es_course`

```
/etc/logstash/conf.d/logstash.conf
    input {
      file {
        path => "/var/log/test.log"
      }
    }

output {
  elasticsearch {
    host => "140.92.25.241"
    codec => "json"
    index => "logstash-%{+YYYY.MM.dd}"
  }
  stdout { codec => rubydebug }
}

```

Run following command will be occurs some errors  
`$/opt/logstash/bin/logstash --config /etc/logstash/conf.d/logstash.conf`

> Dec 28, 2015 3:05:31 PM org.elasticsearch.node.internal.InternalNode   
> INFO: [logstash-es\_course-27073-13456] version[1.5.1], pid[27073], build[5e38401/2015-04-09T13:41:35Z]  
> Dec 28, 2015 3:05:31 PM org.elasticsearch.node.internal.InternalNode   
> INFO: [logstash-es\_course-27073-13456] initializing ...  
> Dec 28, 2015 3:05:31 PM org.elasticsearch.plugins.PluginsService   
> INFO: [logstash-es\_course-27073-13456] loaded , sites   
> Dec 28, 2015 3:05:33 PM org.elasticsearch.node.internal.InternalNode   
> INFO: [logstash-es\_course-27073-13456] initialized  
> Dec 28, 2015 3:05:33 PM org.elasticsearch.node.internal.InternalNode start  
> INFO: [logstash-es\_course-27073-13456] starting ...  
> Dec 28, 2015 3:05:33 PM org.elasticsearch.transport.TransportService doStart  
> INFO: [logstash-es\_course-27073-13456] bound\_address {inet[/0:0:0:0:0:0:0:0:9301]}, publish\_address {inet[/140.92.25.241:9301]}  
> Dec 28, 2015 3:05:33 PM org.elasticsearch.discovery.DiscoveryService doStart  
> INFO: [logstash-es\_course-27073-13456] elasticsearch/Ifid6K90RYWPQzNCLCgVqg  
> Dec 28, 2015 3:06:03 PM org.elasticsearch.discovery.DiscoveryService waitForInitialState  
> WARNING: [logstash-es\_course-27073-13456] waited for 30s and no initial state was set by the discovery  
> Dec 28, 2015 3:06:03 PM org.elasticsearch.node.internal.InternalNode start  
> INFO: [logstash-es\_course-27073-13456] started  
> Failed to install template: waited for [30s] {:level=\>:error}  
> Logstash startup completed

Any one can help?

Jason

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 28, 2015, 9:47pm UTC](https://discuss.elastic.co/t/failed-to-install-template-waited-for-30s/38024/2 "2015-12-28T21:47:06Z")

</div>

It looks like LS just can't reach ES. Try using the HTTP protocol and making sure you can reach ES from the LS box.

---

<div class="post-metadata">

**Author:** ![Jason\_Zheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jason_zheng/32/4041_2.png) [@Jason\_Zheng](https://discuss.elastic.co/u/Jason_Zheng)\
**Post date:** [December 29, 2015, 3:20am UTC](https://discuss.elastic.co/t/failed-to-install-template-waited-for-30s/38024/3 "2015-12-29T03:20:38Z")

</div>

Hi Mark,

Its resolved by adding 'protocol =\> http', why must added this property to elasticsearch of output of logstash configure file? (the ELK stack is installed on all in 1)

another problem is occurs on start logstash, the error log is

> Sending logstash logs to /var/log/logstash/logstash.log.  
> The error reported is:  
> the scheme http does not accept registry part: es\_course:9200 (or bad hostname?)

Its happened if I change from `host => "140.92.25.241"` to `host => "es_course"` of logstash config file

/etc/hosts configure as following

> 140.92.25.241 es\_course

I don't know whyit never happened before elasticsearch cluster

Thanks.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 29, 2015, 3:40am UTC](https://discuss.elastic.co/t/failed-to-install-template-waited-for-30s/38024/4 "2015-12-29T03:40:21Z")

</div>

Because if you use the default protocol (node), you also need the cluster name.  
But 2.X has moved to HTTP by default, so you might as well jump on the bandwagon now!

---

<div class="post-metadata">

**Author:** ![Jason\_Zheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jason_zheng/32/4041_2.png) [@Jason\_Zheng](https://discuss.elastic.co/u/Jason_Zheng)\
**Post date:** [December 29, 2015, 3:46am UTC](https://discuss.elastic.co/t/failed-to-install-template-waited-for-30s/38024/5 "2015-12-29T03:46:15Z")

</div>

Hi Mark,

Thanks, 2.x seems to be better

I have another question as previous said as following

another problem is occurs on start logstash, the error log is

> Sending logstash logs to /var/log/logstash/logstash.log.  
> The error reported is:  
> the scheme http does not accept registry part: es\_course:9200 (or bad hostname?)

Its happened if I change from` host => "140.92.25.241"` to `host => "es_course"` of logstash config file

/etc/hosts configure as following

> 140.92.25.241 es\_course

I don't know whyit never happened before elasticsearch cluster

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 29, 2015, 3:47am UTC](https://discuss.elastic.co/t/failed-to-install-template-waited-for-30s/38024/6 "2015-12-29T03:47:08Z")

</div>

Check [https://www.elastic.co/guide/en/logstash/2.1/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-hosts](https://www.elastic.co/guide/en/logstash/2.1/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-hosts)

---

<div class="post-metadata">

**Author:** ![Jason\_Zheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jason_zheng/32/4041_2.png) [@Jason\_Zheng](https://discuss.elastic.co/u/Jason_Zheng)\
**Post date:** [December 29, 2015, 5:49am UTC](https://discuss.elastic.co/t/failed-to-install-template-waited-for-30s/38024/7 "2015-12-29T05:49:58Z")

</div>

Hi Mark,

As the document said, if protocol used default, it should tell port 9300 to logstash (host specified in 'es\_course')

Case by if the logstash has installed in different with elasticsearch, following setting works fine

> ```
> elasticsearch {
> host => "es_course"
> codec => "json"
> protocol => "http"
> index => "logstash-%{+YYYY.MM.dd}"
> }
> 
> ```

else if logstash and elasticsearch are installed on the same host, it is not work fine with the following configuration

> output {  
> elasticsearch {  
> host =\> "es\_course"  
> port =\> 9300  
> codec =\> "json"  
> #protocol =\> "http"  
> index =\> "logstash-%{+YYYY.MM.dd}"  
> }  
> stdout { codec =\> rubydebug }  
> }

---

<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:17am UTC](https://discuss.elastic.co/t/failed-to-install-template-waited-for-30s/38024/8 "2017-07-06T05:17:15Z")

</div>


