SocketCluster / SocketCluster/socketcluster

Socket hung up

Open
#428 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
6.2k
Forks
318
PR merge metrics
No merged PRs in 30d

Description

###env:
1: ingress
rules:
- host: sprd.nats.service
http:
paths:
- path: /nats/scc-demo
backend:
serviceName: socketcluster
servicePort: 8000
2: socketCluster.connect({host: 'sprd.nats.service:30001/nats/scc-demo', })

###bug:
Most of the time can be connected successfully
but some times: (from chrome devtool)

WebSocket connection to 'ws://sprd.nats.service:30001/nats/scc-demo/socketcluster/' failed: WebSocket is closed before the connection is established.

Uncaught SocketProtocolError {name: "SocketProtocolError", message: "Client connection establishment timed out", code: 4007, stack: "SocketProtocolError: Client connection establishme…_communication_01/public/socketcluster.js:1457:18"}

WebSocket connection to 'ws://sprd.nats.service:30001/nats/scc-demo/socketcluster/' failed: Error in connection establishment: net::ERR_NAME_NOT_RESOLVED

Uncaught SocketProtocolError {name: "SocketProtocolError", message: "Socket hung up", code: 1006, stack: "SocketProtocolError: Socket hung up↵ at SCClien…communication_01/public/socketcluster.js:1452:20)"}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ingress rule and the socketCluster.connect URL shown in the issue, then reproduce the intermittent failure while watching Chrome DevTools. Compare successful connections with the reported WebSocket, timeout, and name-resolution errors. Done means identifying the cause of the hung-up connection and verifying reliable establishment through the shown ingress path.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, kubernetes
Domain
backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.