Skip to content

Websocket input doesn't work #3

@jordansissel

Description

@jordansissel

(This issue was originally filed by @aemxdp at https://github.com/elastic/logstash-contrib/issues/161)


Config:

input {
  websocket {
    url => "ws://127.0.0.1:3000"
  }
}

output {
  stdout {}
}

Run:

$ /opt/logstash/bin/logstash agent -f logstash-simple.conf

Output:

Using milestone 1 input plugin 'websocket'. This plugin should work, but would benefit from use by folks like you. Please let us know if you find bugs or have suggestions on how to improve this plugin.  For more information on plugin milestones, see http://logstash.net/docs/1.4.2-modified/plugin-milestones {:level=>:warn}
websocket input client threw exception, restarting {:exception=>#<NoMethodError: undefined method `redirect?' for nil:NilClass>, :level=>:warn}
websocket input client threw exception, restarting {:exception=>#<NoMethodError: undefined method `redirect?' for nil:NilClass>, :level=>:warn}
websocket input client threw exception, restarting {:exception=>#<NoMethodError: undefined method `redirect?' for nil:NilClass>, :level=>:warn}
...

Websocket example (nodejs/coffee):

#!/bin/env node
WebSocket = require "ws"
wss = new WebSocket.Server(port: 3000)
foo = -> wss.clients.forEach (client) -> client.send("test")
setInterval(foo, 3000)

I've checked it works by writing test client like this:

WebSocket = require "ws"
ws = new WebSocket("ws://127.0.0.1:3000")
ws.on "message", (data) -> console.log(data)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions