Logstash failed to put logs to java ee application


(Maher Glenza) #1

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}


(Magnus Bäck) #2

Does curl localhost:8080 on the Logstash machine work?


(Maher Glenza) #3

Failed to connect to localhost port 8080: Connection refused


(Magnus Bäck) #4

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


(Maher Glenza) #5

i thought wildfly http requests work on 8080 !!


(system) #6

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