The Wayback Machine - http://web.archive.org/web/20210119182907/https://github.com/SocketCluster/socketcluster/issues/502
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket Connect Error: Unknown request #502

Open
happilymarrieddad opened this issue Jul 2, 2019 · 3 comments
Open

Socket Connect Error: Unknown request #502

happilymarrieddad opened this issue Jul 2, 2019 · 3 comments

Comments

@happilymarrieddad
Copy link
Contributor

@happilymarrieddad happilymarrieddad commented Jul 2, 2019

Hello, I've been trying to dockerize a really old socketcluster app that we have here and it keeps trying to connect to some other service... I can't find in the code where this is happening. Is there a way to show what endpoint it is trying to connect to? I think if I knew what it was trying to do then it would be a lot easier to diagnosis where this is failing. Thanks!

{ SocketProtocolError: Socket hung up
    at SCClientSocket._onSCClose (/app/node_modules/socketcluster-client/lib/scclientsocket.js:654:15)
    at SCTransport.<anonymous> (/app/node_modules/socketcluster-client/lib/scclientsocket.js:304:12)
    at SCTransport.Emitter.emit (/app/node_modules/component-emitter/index.js:133:20)
    at SCTransport._onClose (/app/node_modules/socketcluster-client/lib/sctransport.js:217:28)
    at WebSocket.SCTransport.wsSocket.onerror (/app/node_modules/socketcluster-client/lib/sctransport.js:81:12)
    at WebSocket.onError (/app/node_modules/socketcluster-client/node_modules/ws/lib/event-target.js:128:16)
    at emitOne (events.js:116:13)
    at WebSocket.emit (events.js:211:7)
    at ClientRequest.req.on (/app/node_modules/socketcluster-client/node_modules/ws/lib/websocket.js:535:10)
    at emitOne (events.js:116:13)
  name: 'SocketProtocolError',
  message: 'Socket hung up',
  code: 1006 }

@happilymarrieddad
Copy link
Contributor Author

@happilymarrieddad happilymarrieddad commented Jul 2, 2019

Maybe something like `Attempted to connect to 'some DNS.com' or something like that.

@jondubois
Copy link
Member

@jondubois jondubois commented Jul 2, 2019

@happilymarrieddad Socket hung up can also happen on sudden disconnect; not only for failed connect attempts. But I guess it might help to improve the error message to give more details about the host/port.

In the meantime you can use socket.options to check where it was trying to connect. There should the the hostname and port in there.

@happilymarrieddad
Copy link
Contributor Author

@happilymarrieddad happilymarrieddad commented Jul 3, 2019

ok cool thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.