# Logstash websockets input generates \`force\_encoding\` exceptions

**URL:** <https://discuss.elastic.co/t/logstash-websockets-input-generates-force-encoding-exceptions/122723>\
**Category:** Logstash\
**Created:** [March 6, 2018, 1:36pm UTC](https://discuss.elastic.co/t/logstash-websockets-input-generates-force-encoding-exceptions/122723 "2018-03-06T13:36:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Loek](https://avatars.discourse-cdn.com/v4/letter/l/a9adbd/32.png) [@Loek](https://discuss.elastic.co/u/Loek)\
**Post date:** [March 6, 2018, 1:36pm UTC](https://discuss.elastic.co/t/logstash-websockets-input-generates-force-encoding-exceptions/122723/1 "2018-03-06T13:36:24Z")

</div>

Logstash: 6.2.2

Installed `logstash-input-websocket` via `logstash-plugin`

Input:

```auto
input {
  websocket {
    id => "meetup-rsvp-websocket"
    url => "http://stream.meetup.com/2/rsvps"
  }
}

```

Errors:

```auto
[2018-03-06T01:24:15,246][WARN][logstash.inputs.websocket] websocket input client threw exception, restarting {:exception=>#<NoMethodError: undefined method `force_encoding' for nil:NilClass>}`

```

Happens about every second. There is still data flowing, just lots of these exceptions happening. There don't seem to be more logs associated with this error (checked the Logstash logs on `DEBUG`).

Using `ws://` instead of `http://` did not help.

---

<div class="post-metadata">

**Author:** ![Loek](https://avatars.discourse-cdn.com/v4/letter/l/a9adbd/32.png) [@Loek](https://discuss.elastic.co/u/Loek)\
**Post date:** [April 3, 2018, 1:36pm UTC](https://discuss.elastic.co/t/logstash-websockets-input-generates-force-encoding-exceptions/122723/2 "2018-04-03T13:36:24Z")

</div>

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