The Config file of Logstash for the Websocket Client-
input {
websocket {
codec => "plain"
url => "http://localhost:8080/WebsocketHome/"
}
}
output {
elasticsearch {
hosts => ["http://localhost:9200"]
index => "websocket"
#user => "elastic"
#password => "changeme"
}
}
and the following warning comes on the console for logstash:
websocket input client threw exception, restarting {:exception= #<NoMethodError: undefined method 'each' for #<FTW: :Response: 0x ******** >>}
And as for Kibana , the no file is getting uploaded.
I am running into the same exact issue was well
Please find my pipeline below:
input {
websocket {
url => "wss://certstream.calidog.io"
codec => "json"
}
}
output {
elasticsearch {
hosts => [ "localhost:9200" ]
index => "calidog"
}
}
Error:
[WARN ] 2018-10-25 17:32:05.483 [[main]<websocket] websocket - websocket input client threw exception, restarting {:exception=>#<NoMethodError: undefined method `each' for #<FTW::Response:0x7279ccb8>>}
1 Like
**Update:
I added the forward slash / to the end of the url like below and receive hanshake_failure error
input {
websocket {
url => "wss://certstream.calidog.io/"
codec => "json"
}
}
Error:
[2018-10-25T18:52:55,836][WARN ][logstash.inputs.websocket] websocket input client threw exception, restarting {:exception=>#<OpenSSL::SSL::SSLError: Received fatal alert: handshake_failure>}
1 Like
Alright, I have tried this and it worked for me. I hope it helps and it was truly a pain researching for solution for this problem. It was a little frustrating with visit many posts relating to this issues and most of them are left without an answer. so I really hope this helps you and potentially many other people
input {
websocket {
mode => "client"
url => "wss://certstream.calidog.io/?param=logstash"
type => "string"
}
}
output {
elasticsearch {
hosts => [ "localhost:9200" ]
index => "calidog"
}
stdout { codec => rubydebug }
}
so it will complains regardless when the client cannot get data from server but data is still flows.
Happy logstashing!
system
(system)
Closed
November 23, 2018, 12:58am
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.