TRANSPORT_HANDSHAKE_ERROR

未关闭
#5,325 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
22/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
aws, node.js, typescript

调研方向

指定的入口点是 Engine 的 connection_error listener;首先跟踪该事件周围的传输握手路径以及 AWS 负载均衡器配置。报告没有提供复现步骤、受影响用户的详细信息、文件或测试,因此首先要建立一个可复现的案例;完成的标准是确定导致握手失败的条件,并验证连接成功。

由索引模型根据 Issue 内容生成。

描述

needs author input

Describe the bug
I am using socketio with eiows and fastify
We are running socketio on AWS EC2 instance behing loadbalancer.
Few of the users(Approx 1%) are not able to connect to socketio server and getting TRANSPORT_HANDSHAKE_ERROR.

I have printed the logs like below:

    fastify.io.engine.on("connection_error", (err) => {
      console.error("Socket connection error: code: " + err.code); // the error code, for example 1
      console.error("Socket connection error: message: " + err.message); // the error message, for example "Session ID unknown"
      console.error("Socket connection error: context: " + JSON.stringify(err.context)); // some additional error context
    });

Below are the logs:

Socket connection error: code: 3
Socket connection error: message: Bad request
Socket connection error: context: {"name":"TRANSPORT_HANDSHAKE_ERROR"}

To Reproduce
I am not sure about the reproduction condition. It is happening for few users and we dont have the user details to connect to them,

Socket.IO server version: 4.8.1

Expected behavior
Socket connection should be success

主要语言
TypeScript
星标
63.2k
派生
10.2k
平均合并
6 天 4 小时
30 天内合并 PR
6

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

socketio/socket.io 的其他 Issue

查看 socketio/socket.io 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。