-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to create template on open search 1.3 getting 400 error #249
Comments
@dblock It's a odd behaviour for my case, after adding |
@gaddehyd that would definitely be a bug! maybe some code that only gets executed on debug? what are the versions that you're using? post relevant logs with and without? |
logstash-with-debug.txt |
Thanks. This has to be a red herring and a timing problem where by enabling debug logs we end up doing something out of order. There's nothing I found in the logs out of ordinary. Are you able to build and use the plugin code here and make some changes? I would make a change in
I have details of how to do the above in #186 (comment) (and #250 to add this to the dev guide). |
[2024-04-29T05:59:12,764][ERROR][logstash.outputs.opensearch][main] Failed to install template {:message=>"Got response code '400' contacting OpenSearch at URL 'https://url:443/_template/template_toptracks_stats'", :exception=>LogStash::Outputs::OpenSearch::HttpClient::Pool::BadResponseCodeError, :backtrace=>["/usr/share/logstash/vendor/local_gems/c5127f68/logstash-output-opensearch-2.0.2-universal.arm64e-darwin-23/lib/logstash/outputs/opensearch/http_client/manticore_adapter.rb:181:in @dblock Again same error, I have build the plugin and deployed on logstash. I am running image on AWS Batch service. |
@gaddehyd the code should be modified to display the |
@dblock Can you suggest where I need to update the code for response_body ? I have searched with log string which you are updated last time in code. |
It says "Got response code '#{response_code}' contacting OpenSearch at URL '#{@url}'" try changing it to "Got response code '#{response_code}' contacting OpenSearch at URL '#{@url}, request: #{@request_body}, response: #{@response_body}'" I can make some time to do this IRL if you want on zoom, find me on the public slack, I'm @ dblock. |
@dblock After adding shared lines of code found below error After changing the data type varchar to text, Issue got resolved |
This is helpful! The error seems common, SO says that So what's your initial state? What is in this |
@dblock I have updated my index template with open search supported data types(https://opensearch.org/docs/latest/search-plugins/sql/datatypes/), But we getting new issue after updating the template. |
I still would like a detailed repro so that we can actually improve the code to show the error here. Help us build one? Something super rudimentary with 5 steps from scratch would be amazing.
Good. This is one less problem. Could you please give a tl;dr on exactly what you had and did for the next person after you have repro steps?
Where's this error from? Same place? I am not familiar with this error, but there's a lot of google hits that say something about the data format being the problem / json being sent with the wrong content type, etc. |
Unable create template on open search 1.3 version using logstash 8.13.2 version.
Getting below error, Opensearch is hosted on aws.
[Ruby-0-Thread-10: /usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-output-opensearch-2.0.2-java/lib/logstash/plugin_mixins/opensearch/common.rb:77]
opensearch - Failed to install template {:message=>"Got response code '400' contacting OpenSearch at URL 'https://xxxx:443/_template/logstash'",
:exception=>LogStash::Outputs::OpenSearch::HttpClient::Pool::BadResponseCodeError,
:backtrace=>["/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-output-opensearch-2.0.2-java/lib/logstash/outputs/opensearch/http_client/manticore_adapter.rb:181:in
perform_request'", "/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-output-opensearch-2.0.2-java/lib/logstash/outputs/opensearch/http_client/pool.rb:272:in
perform_request_to_url'","/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-output-opensearch-2.0.2-java/lib/logstash/outputs/opensearch/http_client/pool.rb:259:in
block in perform_request'", "/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-output-opensearch-2.0.2-java/lib/logstash/outputs/opensearch/http_client/pool.rb:348:in
with_connection'","/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-output-opensearch-2.0.2-java/lib/logstash/outputs/opensearch/http_client/pool.rb:258:in
perform_request'", "/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-output-opensearch-2.0.2-java/lib/logstash/outputs/opensearch/http_client/pool.rb:266:in
block in Pool'","/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-output-opensearch-2.0.2-java/lib/logstash/outputs/opensearch/http_client.rb:404:in
template_put'", "/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-output-opensearch-2.0.2-java/lib/logstash/outputs/opensearch/http_client.rb:82:in
template_install'","/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-output-opensearch-2.0.2-java/lib/logstash/outputs/opensearch/template_manager.rb:37:in
install'", "/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-output-opensearch-2.0.2-java/lib/logstash/outputs/opensearch/template_manager.rb:25:in
install_template'","/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-output-opensearch-2.0.2-java/lib/logstash/outputs/opensearch.rb:419:in
install_template'", "/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-output-opensearch-2.0.2-java/lib/logstash/outputs/opensearch.rb:254:in
finish_register'","/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-output-opensearch-2.0.2-java/lib/logstash/outputs/opensearch.rb:231:in
block in register'", "/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-output-opensearch-2.0.2-java/lib/logstash/plugin_mixins/opensearch/common.rb:83:in
block in after_successful_connection'"]}The text was updated successfully, but these errors were encountered: