Logstash conf error - amazon_es

(Anthony Maffert) #1


I am trying to configure for the first time my logstash.conf file with an output to amazon_es.
However, i get the following error:

[ERROR][logstash.outputs.amazones] Failed to install template: [400] {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"No handler for type [string] declared on field [@version]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_default_]: No handler for type [string] declared on field [@version]","caused_by":{"type":"mapper_parsing_exception","reason":"No handler for type [string] declared on field [@version]"}},"status":400}

My whole logstash.conf file is here:

input {
  jdbc { 
    jdbc_connection_string => "jdbc:mysql://localhost:3306/testdb"
    # The user we wish to execute our statement as
    jdbc_user => "root"
    jdbc_password => "root"
    # The path to our downloaded jdbc driver
    jdbc_driver_library => "/mnt/c/Users/xxxxxxxx/mysql-connector-java-5.1.45/mysql-connector-java-5.1.45-bin.jar"
    jdbc_driver_class => "com.mysql.jdbc.Driver"
    # our query
    statement => "SELECT * FROM testtable"
output {
  amazon_es {
    hosts => ["search-xxxxx.eu-west-3.es.amazonaws.com"]
    region => "eu-west-3"
    aws_access_key_id => 'xxxxxxxxxxxxxxxxxxxxxx'
    aws_secret_access_key => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
    index => "test-migrate"
    document_type => "data"

I have 3 elements selected from my database, but the first time i run the script, only the first element is indexed in elastic search. The second time i run it, all 3 elements are indexed. I get the error each time i run logstash with this conf file.

Can someone help me with this version field issue please?


(system) #2

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