Logstash failed to put logs to java ee application

hi
plz i m trying to filter logs with logstash then to put them in a java ee application that i m building with http requests

output {
http {
url => "http://localhost:8080/LogRest/router/router"
http_method => "post"
format => "json"
mapping => ["dateRouter", "%{dateRouter}", "idFlux", "%{idFlux}"]
}
}

but it says

14:51:24.586 [pool-4-thread-1] ERROR logstash.outputs.http - [HTTP Output Failur
e] Could not fetch URL {:url=>"http://localhost:8080/LogRest/router/router", :me
thod=>:post, :body=>"{"dateRouter":"2017-01-18 16:02:37,146","idFlux":"26
cc5677-c7d6-4597-bdb9-d041da8187da"}", :headers=>{"Content-Type"=>"application/
json"}, :message=>"Connection refused: connect", :class=>"Manticore::SocketExcep
tion", :backtrace=>nil}

Does curl localhost:8080 on the Logstash machine work?

Failed to connect to localhost port 8080: Connection refused

So... change the configuration so that it refers to whereever your Java application is running?

i thought wildfly http requests work on 8080 !!

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