Skip to content

Streaming throws on 301 response from an instance #2183

@not7cd

Description

@not7cd

As I'm trying to connect to my instance with client.publicStreaming(), I'm getting this exception

Error: Unexpected server response: 301
    at ClientRequest.<anonymous> (/data/node_modules/node-red-contrib-megalodon/node_modules/ws/lib/websocket.js:912:7)
    at ClientRequest.emit (node:events:513:28)
    at HTTPParser.parserOnIncomingClient (node:_http_client:693:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
    at TLSSocket.socketOnData (node:_http_client:534:22)
    at TLSSocket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at TLSSocket.Readable.push (node:internal/streams/readable:228:10)
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)

It may be connected to a default nginx config that forces TLS?
I'm not sure how to debug this. I'm using a slightly modified streaming example from readme.
https://github.com/not7cd/node-red-contrib-megalodon/blob/fa9c3b49f51208cffb59d793108b79ab563de272/src/streaming.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions