elasticsearch{
hosts => ["https://elastic host :9243"]
user => "xxx"
password => "xxxx"
index => "upc_words"
}
}
this keeps getting error . ogstash.javapipeline ][main] Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<LogStash::Json::ParserError: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
but when i try to import into local elastic host with this conf (changing only host of course) it works .
please help . it's been two days i am stuck here , no progress , searched , tried every answer no hope ,
looking forward to get some help , cheers.
My guess is that https://elastic host :9243 is returning HTML. The output expects it to send JSON. Conceivably an authentication error. Does elasticsearch log anything when you start logstash?
From what I understand, if you change the hosts value to the Elasticsearch Service endpoint URL, then you are encountering this issue. I am not sure if that would help but you could take a look at our documentation. I am just wondering whether the hosts value you specified is correct or not.
If you are still encountering any problems, can you run Logstash with debug logging and provide the logs here (please remove any sensitive information)? For example:
I see that you are using the Cloud ID. That can be useful in certain scenarios as described in the note section in the documentation I just shared.
Your hosts value in the Elasticsearch output plugin actually points to your Kibana endpoint URL. This is where the problem lies. You need to use the Elasticsearch endpoint URL. You can find it in your Elasticsearch Service Console by browsing to:
Deployments => <deployment_name> => Elasticsearch and click on Copy Endpoint URL.
Use this endpoint URL as the hosts value in your Elasticsearch output plugin and you should be good to go.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.