socket.io
socket.io copied to clipboard
“transport disconnect close” when use socketio&socketio-redisadapter,nginx ingress in k3s
this is error report
this is my ingress config
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: CI_PROJECT_NAME annotations: kubernetes.io/ingress.class: "nginx" #nginx.ingress.kubernetes.io/ssl-redirect: "true" #nginx.ingress.kubernetes.io/force-ssl-redirect: "true" #nginx.ingress.kubernetes.io/use-regex: "true" #nginx.ingress.kubernetes.io/proxy-body-size: 100m # ip hash nginx.ingress.kubernetes.io/upstream-hash-by: "$http_x_forwarded_for" spec: tls: - hosts: - HOST_URL secretName: cluster-holyyun-tls rules: - host: HOST_URL http: paths: - path: / pathType: Prefix backend: service: name: CI_PROJECT_NAME port: number: 3000
It`s worked sometimes,but when the client connected a span,this error happen。 this is my client&server config
socket = io(socketUrl + data.data.namespace, { query: { token: data.data.token, userId: userId }, transports: ["polling", "websocket"] })
io.adapter(createAdapter(pubClient, subClient));
It looks like you are not able to reach the Socket.IO server. Were you eventually able to find a solution?
It looks like you are not able to reach the Socket.IO server. Were you eventually able to find a solution?
but sometimes it worked in the same ingress config,when i restart the cluster of socket.io,it will lose connection and can't connected again,the problem happend. sometimes the client connected too long,the problem would happen also, there's no solution or example for cluster of ingress.
That sounds weird. I'll try to add an example with a k3s cluster.