Logstash HTTP Output Failure

I'm using logstash 6.5.4 in centos7 for collecting the information from system and sending it to node server through http output plugin. following is my code.

input {
stdin{}
}

output{
http {
url => "{URL_SET_CLOG}" format => "json" http_method => "post" headers => ["Authorization", "Bearer {CLOG_TOKEN}"]
content_type => "application/json"
}
}

but I'm getting http output failure

[2020-05-27T16:19:37,789][ERROR][logstash.outputs.http ] [HTTP Output Failure] Could not fetch URL {:url=>"http://nodeserver.example.in:5000/send", :method=>:post, :body=>"{"@version":"1","host":"vm2","message":"hello","@timestamp":"2020-05-27T10:49:32.699Z"}", :headers=>{"Authorization"=>"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTMxNjgzODIsInVzZXJuYW1lIjoic3lzYWRtaW4iLCJvcmdOYW1lIjoiUHJvdmlkZXJPcmciLCJyb2xlIjoid3JpdGVyIiwiaWF0IjoxNTkwNTc2MzgyfQ.vNaPEBhxG26oUYNKBYHKFtE0FH8mqHsKJRd45UjWFZE", "Content-Type"=>"application/json"}, :message=>"Connection reset", :class=>"Manticore::SocketException", :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/manticore-0.6.4-java/lib/manticore/response.rb:37:in block in initialize'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/manticore-0.6.4-java/lib/manticore/response.rb:79:in call'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-http-5.2.3/lib/logstash/outputs/http.rb:239:in send_event'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-http-5.2.3/lib/logstash/outputs/http.rb:175:in send_events'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-http-5.2.3/lib/logstash/outputs/http.rb:124:in multi_receive'", "org/logstash/config/ir/compiler/OutputStrategyExt.java:114:in multi_receive'", "org/logstash/config/ir/compiler/AbstractOutputDelegatorExt.java:97:in multi_receive'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:373:in block in output_batch'", "org/jruby/RubyHash.java:1343:in each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:372:in output_batch'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:324:in worker_loop'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:286:in block in start_workers'"], :will_retry=>true}
[2020-05-27T16:19:37,869][INFO ][logstash.outputs.http ] Retrying http request, will sleep for 0 seconds

my server is working fine through curl command I'm able to send the data.
and also I tried the same code in other system with logstash 6.8.9 version, there it is working without any issue.

can any one suggest why this error is occurring?

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