# ERROR\]\[logstash.outputs.elasticsearch\] Failed to install template. {:message=\>"Unexpected character ('\<' (code 60))

**URL:** https://discuss.elastic.co/t/error-logstash-outputs-elasticsearch-failed-to-install-template-message-unexpected-character-code-60/82049
**Category:** Logstash
**Created:** [April 11, 2017, 8:45pm UTC](https://discuss.elastic.co/t/error-logstash-outputs-elasticsearch-failed-to-install-template-message-unexpected-character-code-60/82049 "2017-04-11T20:45:59Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![yoshua](https://avatars.discourse-cdn.com/v4/letter/y/ba9def/32.png) [@yoshua](https://discuss.elastic.co/u/yoshua)
#### Post date: [April 11, 2017, 8:45pm UTC](https://discuss.elastic.co/t/error-logstash-outputs-elasticsearch-failed-to-install-template-message-unexpected-character-code-60/82049/1 "2017-04-11T20:45:59Z")

</div>

Hi,

In elastic 5.2.2 and localhost the attach .conf and .json srcipts tun ok But in elastic cloud trial 5.3 Don't work  
Any suggestion

Thanks  
Luis

# Logstash

output {  
elasticsearch {  
user =\> "elastic"  
password =\> "iqY4P"  
action =\> "index"  
hosts =\> "cloudelastic"  
index =\> "biotagro"  
workers =\> 1  
template =\> "/home/luis/ELKtesting/geo\_es\_template1.json"  
document\_type =\> "ubicacion"  
}  
stdout {}  
}

# geo\_es\_template1.json

{  
"template": "biot\*",  
"order": 1,  
"settings": {  
"number\_of\_shards": 1  
},  
"mappings": {  
"ubicacion" : {  
"properties" : {  
"location" : {"type": "geo\_point"}  
}  
}  
}  
}

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [April 11, 2017, 9:28pm UTC](https://discuss.elastic.co/t/error-logstash-outputs-elasticsearch-failed-to-install-template-message-unexpected-character-code-60/82049/2 "2017-04-11T21:28:59Z")

</div>

Please encapsulate your code pastes between triple back ticks, like this:

````
```
CODE or MONOSPACE CONFIG ITEMS HERE
```

````

We can't properly read what's going on if it isn't formatted with all of the indentations.

That said, I can't see your whole template here, so I can't say what's going on with `'<' (code 60)`, or anything else. Please paste the entire error (which should include line numbers), and fix the code pastes as described.

---

<div class="post-metadata">

### Author: ![yoshua](https://avatars.discourse-cdn.com/v4/letter/y/ba9def/32.png) [@yoshua](https://discuss.elastic.co/u/yoshua)
#### Post date: [April 11, 2017, 10:07pm UTC](https://discuss.elastic.co/t/error-logstash-outputs-elasticsearch-failed-to-install-template-message-unexpected-character-code-60/82049/3 "2017-04-11T22:07:56Z")

</div>

Hi Aaron,  
Thanks for your kind answer.

I am using the same scripts for both versions without changes, until yesterday run fine over version 5.3 cloud but today not, is only to create a geo\_point field named location.

Could be a security restriction on the cloud server ?

That is a full response :

ending Logstash's logs to /home/luis/Descargas/logstash-5.2.2/logs which is now configured via log4j2.properties  
[2017-04-11T14:41:17,048][INFO][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=\>{:removed=\>[], :added=\>[[http://elastic:xxxxxx@b1bae1c770ab4772a7e77e4e5079905d.us-east-1.aws.found.io:9200/](http://elastic:xxxxxx@b1bae1c770ab4772a7e77e4e5079905d.us-east-1.aws.found.io:9200/)]}}  
[2017-04-11T14:41:17,052][INFO][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck\_url=\>[http://elastic:xxxxxx@b1bae1c770ab4772a7e77e4e5079905d.us-east-1.aws.found.io:9200/](http://elastic:xxxxxx@b1bae1c770ab4772a7e77e4e5079905d.us-east-1.aws.found.io:9200/), :path=\>"/"}  
[2017-04-11T14:41:18,658][WARN][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=\>#\<URI::HTTP:0x223814d5 URL:[http://elastic:xxxxxx@b1bae1c770ab4772a7e77e4e5079905d.us-east-1.aws.found.io:9200/](http://elastic:xxxxxx@b1bae1c770ab4772a7e77e4e5079905d.us-east-1.aws.found.io:9200/)\>}  
[2017-04-11T14:41:18,659][INFO][logstash.outputs.elasticsearch] Using mapping template from {:path=\>"/home/luis/ELKtesting/geo\_es\_template1.json"}  
[2017-04-11T14:41:20,368][ERROR][logstash.outputs.elasticsearch] Failed to install template. {:message=\>"Unexpected character ('\<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: [B@1744538d; line: 1, column: 2]", :class=\>"LogStash::Json::ParserError", :backtrace=\>["/home/luis/Descargas/logstash-5.2.2/logstash-core/lib/logstash/json.rb:41:in `jruby_load'", "/home/luis/Descargas/logstash-5.2.2/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-6.2.6-java/lib/logstash/outputs/elasticsearch/http_client.rb:84:in`get\_version'", "/home/luis/Descargas/logstash-5.2.2/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-6.2.6-java/lib/logstash/outputs/elasticsearch/template\_manager.rb:16:in `get_es_version'", "/home/luis/Descargas/logstash-5.2.2/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-6.2.6-java/lib/logstash/outputs/elasticsearch/template_manager.rb:20:in`get\_es\_major\_version'", "/home/luis/Descargas/logstash-5.2.2/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-6.2.6-java/lib/logstash/outputs/elasticsearch/template\_manager.rb:7:in `install_template'", "/home/luis/Descargas/logstash-5.2.2/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-6.2.6-java/lib/logstash/outputs/elasticsearch/common.rb:54:in`install\_template'", "/home/luis/Descargas/logstash-5.2.2/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-6.2.6-java/lib/logstash/outputs/elasticsearch/common.rb:21:in `register'", "/home/luis/Descargas/logstash-5.2.2/logstash-core/lib/logstash/output_delegator_strategies/shared.rb:8:in`register'", "/home/luis/Descargas/logstash-5.2.2/logstash-core/lib/logstash/output\_delegator.rb:37:in `register'", "/home/luis/Descargas/logstash-5.2.2/logstash-core/lib/logstash/pipeline.rb:282:in`register\_plugin'", "/home/luis/Descargas/logstash-5.2.2/logstash-core/lib/logstash/pipeline.rb:293:in `register_plugins'", "org/jruby/RubyArray.java:1613:in`each'", "/home/luis/Descargas/logstash-5.2.2/logstash-core/lib/logstash/pipeline.rb:293:in `register_plugins'", "/home/luis/Descargas/logstash-5.2.2/logstash-core/lib/logstash/pipeline.rb:302:in`start\_workers'", "/home/luis/Descargas/logstash-5.2.2/logstash-core/lib/logstash/pipeline.rb:232:in `run'", "/home/luis/Descargas/logstash-5.2.2/logstash-core/lib/logstash/agent.rb:387:in`start\_pipeline'"]}  
[2017-04-11T14:41:20,371][INFO][logstash.outputs.elasticsearch] New Elasticsearch output {:class=\>"LogStash::Outputs::ElasticSearch", :hosts=\>[#\<URI::Generic:0x6180cff7 URL://b1bae1c770ab4772a7e77e4e5079905d.us-east-1.aws.found.io\>]}

```auto
input {
  file {
    path => "/home/luis/ELKtesting/Diario_cloud.txt"
    start_position => "beginning" 
    sincedb_path => "/home/luis/ELKtesting/controlcloud.txt"
    }
}

filter {
  csv {
      separator => ";"
      columns => ["Fecha","EmaID","EMA","ema2","Comuna", "Latitud","Longitud","Altura","Region","TempSuperficie","HumRel",
                  "TempAire","FechaAlt","Precipitacion","RadSolar","PresionAtm","TempAireMin","VelViento","DirViento","TempAireMax"]
  }
   
  date {
   match => ["Fecha","yyy-MM-dd HH:mm:ss","dd/MM/yyyy HH:mm","MM/dd/yy HH:mm","ISO8601"]
   locale => "en"
   timezone => "America/Santiago"
   target => "@timestamp" 
  }
   
  mutate {
      convert => {
        'TempAire' => 'float'
        'Precipitacion' => 'float'
        'HumRel' => 'float'
        'PresionAtm' => 'float'
        'RadSolar' => 'float'
        'VelViento' => 'float'
        'TempAireMin' => 'float'
        'TempAireMax' => 'float'
	'DirViento' => 'float'        
        'TempSuperficie' => 'float'        
        'Latitud' => 'float'
        'Longitud' => 'float'
        }
   }
   mutate {
          rename => {
              "Longitud" => "[location][lon]"
              "Latitud" => "[location][lat]"
          }
   }               
} 

output {
     elasticsearch {
           user => "elastic"
           password => "iqY4P"
           action => "index"
           hosts => "cloudelastic"
           index => "biotagro"
           workers => 1
           template => "/home/luis/ELKtesting/geo_es_template1.json"
           document_type => "ubicacion"
     }
    stdout {}
}

```

next my geo\_es\_template1.json

```auto
{
  "template": "biot*",
   "order": 1,
   "settings": {
    "number_of_shards": 1
    },
   "mappings": {
          "ubicacion" : {
                 "properties" : {
                       "location" : {"type": "geo_point"}
                  }
          }
    }
}

```

---

<div class="post-metadata">

### Author: ![yoshua](https://avatars.discourse-cdn.com/v4/letter/y/ba9def/32.png) [@yoshua](https://discuss.elastic.co/u/yoshua)
#### Post date: [April 17, 2017, 3:51pm UTC](https://discuss.elastic.co/t/error-logstash-outputs-elasticsearch-failed-to-install-template-message-unexpected-character-code-60/82049/4 "2017-04-17T15:51:41Z")

</div>

I hope you are fine, I can not still solve that , do you have any news ?  
Thanks,  
Regards.

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [April 17, 2017, 4:13pm UTC](https://discuss.elastic.co/t/error-logstash-outputs-elasticsearch-failed-to-install-template-message-unexpected-character-code-60/82049/5 "2017-04-17T16:13:26Z")

</div>

I would follow the instructions in [this blog post](https://www.elastic.co/blog/logstash_lesson_elasticsearch_mapping) about using Logstash to create a mapping template. I'm confident it will help you fix this.

---

<div class="post-metadata">

### Author: ![yoshua](https://avatars.discourse-cdn.com/v4/letter/y/ba9def/32.png) [@yoshua](https://discuss.elastic.co/u/yoshua)
#### Post date: [April 17, 2017, 11:23pm UTC](https://discuss.elastic.co/t/error-logstash-outputs-elasticsearch-failed-to-install-template-message-unexpected-character-code-60/82049/6 "2017-04-17T23:23:01Z")

</div>

Aaron,

I got it, was a security problem, but the error message did't specify that,  
Thanks a lot, anyway  
Regards  
Luis

---

<div class="post-metadata">

### Author: ![gjones](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@gjones](https://discuss.elastic.co/u/gjones)
#### Post date: [April 18, 2017, 12:38pm UTC](https://discuss.elastic.co/t/error-logstash-outputs-elasticsearch-failed-to-install-template-message-unexpected-character-code-60/82049/7 "2017-04-18T12:38:14Z")

</div>

Hi Aaron,

I ma getting the same issue. Can I ask what the security issue was, I may have the same issue!

Thanks

Glyn

---

<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: [May 16, 2017, 12:43pm UTC](https://discuss.elastic.co/t/error-logstash-outputs-elasticsearch-failed-to-install-template-message-unexpected-character-code-60/82049/8 "2017-05-16T12:43:21Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
