在使用应用程序负载平衡器并从节点(服务器端)连接的弹性beantalk上,socket.io出现了一个奇怪的问题。目前,我有两个节点,每个节点都位于其自己的nginx之后,而所有节点都位于配置了粘性会话的应用程序负载平衡器之后。
我遇到的问题是,从长轮询-> websocket进行的升级在浏览器中工作正常,但从节点失败。我可以从节点连接的唯一方法是手动设置transports: ["websockets"]
,这是不希望的。以下是使用此代码和DEBUG=*
const clientSocket = io(URL);
看看nginx access.logs
,关于会话似乎没有什么异常。这是一个片段。如您所见,my-ip
中的所有内容始终路由到同一节点
172.31.8.41 - - [28/Feb/2019:19:51:42 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:51:42 +0000] "GET /socket.io/?EIO=3&transport=polling&t=MargPwH&b64=1&sid=7k33d9491Y8GWscOAABp HTTP/1.1" 400 52 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:51:42 +0000] "GET /socket.io/?EIO=3&transport=websocket&sid=7k33d9491Y8GWscOAABp HTTP/1.1" 400 18 "-" "-" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:51:44 +0000] "GET /socket.io/?EIO=3&transport=polling&t=MargQGg&b64=1&sid=hy5Trvc1rOCOV-BrAABq HTTP/1.1" 400 52 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:51:44 +0000] "GET /socket.io/?EIO=3&transport=websocket&sid=hy5Trvc1rOCOV-BrAABq HTTP/1.1" 400 18 "-" "-" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:51:44 +0000] "GET /socket.io/?EIO=3&transport=polling&t=MargI-p&b64=1&sid=4ZsFjp8X8MDznyr9AABE HTTP/1.1" 200 3 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:51:45 +0000] "GET /socket.io/?EIO=3&transport=polling&t=MargQfk&b64=1 HTTP/1.1" 200 103 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:51:51 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.8.41 - - [28/Feb/2019:19:51:57 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:52:06 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:52:11 +0000] "GET /socket.io/?EIO=3&transport=polling&t=MargW-E&b64=1 HTTP/1.1" 200 103 "-" "node-XMLHttpRequest" "my-ip"
172.31.8.41 - - [28/Feb/2019:19:52:12 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:52:15 +0000] "GET /socket.io/?EIO=3&transport=polling&t=MargQhr&b64=1&sid=uxJMGa3egW9Wb2jhAABG HTTP/1.1" 200 3 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:52:21 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.8.41 - - [28/Feb/2019:19:52:27 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:52:36 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:52:36 +0000] "GET /socket.io/?EIO=3&transport=polling&t=MargX0N&b64=1&sid=bBINNyBJvvX5cP0RAABH HTTP/1.1" 200 3 "-" "node-XMLHttpRequest" "my-ip"
172.31.8.41 - - [28/Feb/2019:19:52:36 +0000] "POST /socket.io/?EIO=3&transport=polling&t=MargdA9&b64=1&sid=bBINNyBJvvX5cP0RAABH HTTP/1.1" 200 2 "-" "node-XMLHttpRequest" "my-ip"
172.31.8.41 - - [28/Feb/2019:19:52:37 +0000] "GET /socket.io/?EIO=3&transport=polling&t=MargdR3&b64=1 HTTP/1.1" 200 103 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:52:38 +0000] "GET /socket.io/?EIO=3&transport=websocket&sid=gfTQu0aAJF6Z6Q5gAABI HTTP/1.1" 101 0 "-" "-" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:52:39 +0000] "GET /socket.io/?EIO=3&transport=polling&t=Margdm-&b64=1 HTTP/1.1" 200 103 "-" "node-XMLHttpRequest" "my-ip"
172.31.8.41 - - [28/Feb/2019:19:52:42 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:52:51 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.8.41 - - [28/Feb/2019:19:52:57 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:53:04 +0000] "GET /socket.io/?EIO=3&transport=polling&t=Margdpg&b64=1&sid=3nZgirr9cXOZNj_XAABJ HTTP/1.1" 200 3 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:53:04 +0000] "POST /socket.io/?EIO=3&transport=polling&t=Margjz2&b64=1&sid=3nZgirr9cXOZNj_XAABJ HTTP/1.1" 200 2 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:53:05 +0000] "GET /socket.io/?EIO=3&transport=polling&t=MargkGk&b64=1 HTTP/1.1" 200 103 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:53:06 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.8.41 - - [28/Feb/2019:19:53:12 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:53:21 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.8.41 - - [28/Feb/2019:19:53:27 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:53:31 +0000] "GET /socket.io/?EIO=3&transport=polling&t=MargkJN&b64=1&sid=rKuyOzJrHA7Fe41JAABK HTTP/1.1" 200 3 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:53:31 +0000] "POST /socket.io/?EIO=3&transport=polling&t=MargqSU&b64=1&sid=rKuyOzJrHA7Fe41JAABK HTTP/1.1" 200 2 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:53:32 +0000] "GET /socket.io/?EIO=3&transport=polling&t=MargqnP&b64=1&sid=vlqaqHh9VJNz5gXjAABr HTTP/1.1" 400 52 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:53:33 +0000] "POST /socket.io/?EIO=3&transport=polling&t=Margqpb&b64=1&sid=vlqaqHh9VJNz5gXjAABr HTTP/1.1" 400 52 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:53:34 +0000] "GET /socket.io/?EIO=3&transport=polling&t=MargrBM&b64=1&sid=oJJ-VBCV30wZRG_4AABs HTTP/1.1" 400 52 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:53:34 +0000] "POST /socket.io/?EIO=3&transport=polling&t=MargrDy&b64=1&sid=oJJ-VBCV30wZRG_4AABs HTTP/1.1" 400 52 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:53:36 +0000] "GET /socket.io/?EIO=3&transport=polling&t=MargrdM&b64=1&sid=UR3CqEnDl_-nFC5pAABt HTTP/1.1" 400 52 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:53:36 +0000] "POST /socket.io/?EIO=3&transport=polling&t=MargrfZ&b64=1&sid=UR3CqEnDl_-nFC5pAABt HTTP/1.1" 400 52 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:53:36 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:53:37 +0000] "GET /socket.io/?EIO=3&transport=websocket&sid=04idFIicBmnKXJVyAABu HTTP/1.1" 400 18 "-" "-" "my-ip"
172.31.8.41 - - [28/Feb/2019:19:53:42 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:53:51 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.8.41 - - [28/Feb/2019:19:53:57 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:54:06 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.8.41 - - [28/Feb/2019:19:54:12 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:54:21 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.8.41 - - [28/Feb/2019:19:54:27 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.8.41 - - [28/Feb/2019:19:54:27 +0000] "POST /socket.io/?EIO=3&transport=polling&t=Marh2FA&b64=1&sid=04idFIicBmnKXJVyAABu HTTP/1.1" 400 52 "-" "node-XMLHttpRequest" "my-ip"
172.31.8.41 - - [28/Feb/2019:19:54:27 +0000] "POST /socket.io/?EIO=3&transport=polling&t=Marh2Hf&b64=1&sid=04idFIicBmnKXJVyAABu HTTP/1.1" 400 52 "-" "node-XMLHttpRequest" "my-ip"
172.31.8.41 - - [28/Feb/2019:19:54:28 +0000] "GET /socket.io/?EIO=3&transport=websocket&sid=LE3bgCzvK0VAtXL_AABv HTTP/1.1" 400 18 "-" "-" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:54:36 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.8.41 - - [28/Feb/2019:19:54:42 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:54:51 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:54:54 +0000] "GET /socket.io/?EIO=3&transport=polling&t=Marh8em&b64=1&sid=LE3bgCzvK0VAtXL_AABv HTTP/1.1" 400 52 "-" "node-XMLHttpRequest" "my-ip"
172.31.8.41 - - [28/Feb/2019:19:54:54 +0000] "POST /socket.io/?EIO=3&transport=polling&t=Marh8hg&b64=1&sid=LE3bgCzvK0VAtXL_AABv HTTP/1.1" 400 52 "-" "node-XMLHttpRequest" "my-ip"
172.31.8.41 - - [28/Feb/2019:19:54:55 +0000] "GET /socket.io/?EIO=3&transport=polling&t=Marh928&b64=1&sid=F_VPIilCbjKlcTAfAABw HTTP/1.1" 400 52 "-" "node-XMLHttpRequest" "my-ip"
172.31.8.41 - - [28/Feb/2019:19:54:55 +0000] "GET /socket.io/?EIO=3&transport=websocket&sid=F_VPIilCbjKlcTAfAABw HTTP/1.1" 400 18 "-" "-" "my-ip"
172.31.8.41 - - [28/Feb/2019:19:54:56 +0000] "GET /socket.io/?EIO=3&transport=websocket&sid=w2fGwjpj8ElojoJTAABx HTTP/1.1" 400 18 "-" "-" "my-ip"
172.31.8.41 - - [28/Feb/2019:19:54:57 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:55:06 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.8.41 - - [28/Feb/2019:19:55:12 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.8.41 - - [28/Feb/2019:19:55:21 +0000] "POST /socket.io/?EIO=3&transport=polling&t=MarhFRZ&b64=1&sid=w2fGwjpj8ElojoJTAABx HTTP/1.1" 400 52 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:55:21 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.8.41 - - [28/Feb/2019:19:55:22 +0000] "GET /socket.io/?EIO=3&transport=polling&t=MarhFfr&b64=1 HTTP/1.1" 200 103 "-" "node-XMLHttpRequest" "my-ip"
172.31.8.41 - - [28/Feb/2019:19:55:27 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:55:36 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.8.41 - - [28/Feb/2019:19:55:42 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.8.41 - - [28/Feb/2019:19:55:47 +0000] "GET /socket.io/?EIO=3&transport=polling&t=MarhFiU&b64=1&sid=RmuQkr9UirrYp6NGAABL HTTP/1.1" 200 3 "-" "node-XMLHttpRequest" "my-ip"
172.31.8.41 - - [28/Feb/2019:19:55:47 +0000] "POST /socket.io/?EIO=3&transport=polling&t=MarhLpU&b64=1&sid=RmuQkr9UirrYp6NGAABL HTTP/1.1" 200 2 "-" "node-XMLHttpRequest" "my-ip"
172.31.8.41 - - [28/Feb/2019:19:55:48 +0000] "GET /socket.io/?EIO=3&transport=polling&t=MarhM45&b64=1 HTTP/1.1" 200 103 "-" "node-XMLHttpRequest" "my-ip"
172.31.8.41 - - [28/Feb/2019:19:55:49 +0000] "GET /socket.io/?EIO=3&transport=websocket&sid=fTWuT3g-SQ6Y-7DKAABM HTTP/1.1" 101 0 "-" "-" "my-ip"
172.31.8.41 - - [28/Feb/2019:19:55:50 +0000] "GET /socket.io/?EIO=3&transport=polling&t=MarhMTu&b64=1 HTTP/1.1" 200 103 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:55:52 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.8.41 - - [28/Feb/2019:19:55:57 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.28.138 - - [28/Feb/2019:19:56:07 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.8.41 - - [28/Feb/2019:19:56:12 +0000] "GET / HTTP/1.1" 200 5 "-" "ELB-HealthChecker/2.0" "-"
172.31.8.41 - - [28/Feb/2019:19:56:16 +0000] "GET /socket.io/?EIO=3&transport=polling&t=MarhMWX&b64=1&sid=4UCaq5tvWPrIxr-RAABN HTTP/1.1" 200 3 "-" "node-XMLHttpRequest" "my-ip"
172.31.28.138 - - [28/Feb/2019:19:56:16 +0000] "POST /socket.io/?EIO=3&transport=polling&t=MarhSg5&b64=1&sid=4UCaq5tvWPrIxr-RAABN HTTP/1.1" 200 2 "-" "node-XMLHttpRequest" "my-ip"
socket.io日志来自节点:
julian@wilson:~/project/app-server$ tsc && node dist/src/order_spammer.js
socket.io-client:url parse https://env.api.app.bet +0ms
socket.io-client new io instance for https://env.api.app.bet +0ms
socket.io-client:manager readyState closed +0ms
socket.io-client:manager opening https://env.api.app.bet +1ms
engine.io-client:socket creating transport "polling" +0ms
engine.io-client:polling polling +0ms
engine.io-client:polling-xhr xhr poll +0ms
engine.io-client:polling-xhr xhr open GET: https://env.api.app.bet/socket.io/?EIO=3&transport=polling&t=Mard8kg&b64=1 +1ms
engine.io-client:polling-xhr xhr data null +0ms
engine.io-client:socket setting transport polling +12ms
socket.io-client:manager connect attempt will timeout after 20000 +13ms
socket.io-client:manager readyState opening +1ms
engine.io-client:polling polling got data 96:0{"sid":"xxj_pihkgmI4gJEhAABB","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":5000}2:40 +174ms
engine.io-client:socket socket receive: type "open", data "{"sid":"xxj_pihkgmI4gJEhAABB","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":5000}" +164ms
engine.io-client:socket socket open +0ms
socket.io-client:manager open +162ms
socket.io-client:manager cleanup +0ms
socket.io-client:socket transport is open - connecting +0ms
engine.io-client:socket starting upgrade probes +1ms
engine.io-client:socket probing transport "websocket" +0ms
engine.io-client:socket creating transport "websocket" +0ms
engine.io-client:socket socket receive: type "message", data "0" +4ms
socket.io-parser decoded 0 as {"type":0,"nsp":"/"} +0ms
engine.io-client:polling polling +7ms
engine.io-client:polling-xhr xhr poll +180ms
engine.io-client:polling-xhr xhr open GET: https://env.api.app.bet/socket.io/?EIO=3&transport=polling&t=Mard8nV&b64=1&sid=xxj_pihkgmI4gJEhAABB +0ms
engine.io-client:polling-xhr xhr data null +0ms
engine.io-client:socket socket error {"type":"TransportError","description":400} +171ms
socket.io-client:manager error { Error: xhr poll error
at XHR.Transport.onError (/home/julian/project/app-server/node_modules/engine.io-client/lib/transport.js:64:13)
at Request.<anonymous> (/home/julian/project/app-server/node_modules/engine.io-client/lib/transports/polling-xhr.js:128:10)
at Request.Emitter.emit (/home/julian/project/app-server/node_modules/component-emitter/index.js:133:20)
at Request.onError (/home/julian/project/app-server/node_modules/engine.io-client/lib/transports/polling-xhr.js:309:8)
at Timeout._onTimeout (/home/julian/project/app-server/node_modules/engine.io-client/lib/transports/polling-xhr.js:256:18)
at ontimeout (timers.js:427:11)
at tryOnTimeout (timers.js:289:5)
at listOnTimeout (timers.js:252:5)
at Timer.processTimers (timers.js:212:10) type: 'TransportError', description: 400 } +177ms
engine.io-client:socket socket close with reason: "transport error" +4ms
engine.io-client:polling transport open - closing +174ms
engine.io-client:polling writing close packet +0ms
engine.io-client:polling-xhr xhr open POST: https://env.api.app.bet/socket.io/?EIO=3&transport=polling&t=Mard8qD&b64=1&sid=xxj_pihkgmI4gJEhAABB +175ms
engine.io-client:polling-xhr xhr data 1:1 +0ms
socket.io-client:manager onclose +4ms
socket.io-client:manager cleanup +0ms
socket.io-client:socket close (transport error) +181ms
socket.io-client:manager will wait 661ms before reconnect attempt +1ms
engine.io-client:socket probe transport "websocket" failed because of error: socket closed +3ms
socket.io-client:socket emitting packet with ack id 0 +425ms
socket.io-client:manager attempting reconnect +661ms
socket.io-client:manager readyState closed +0ms
socket.io-client:manager opening https://env.api.app.bet +0ms
engine.io-client:socket creating transport "polling" +661ms
engine.io-client:polling polling +664ms
engine.io-client:polling-xhr xhr poll +663ms
engine.io-client:polling-xhr xhr open GET: https://env.api.app.bet/socket.io/?EIO=3&transport=polling&t=Mard8-b&b64=1 +1ms
engine.io-client:polling-xhr xhr data null +0ms
engine.io-client:socket setting transport polling +3ms
socket.io-client:manager connect attempt will timeout after 20000 +4ms
engine.io-client:polling polling got data 96:0{"sid":"HADNz_FR5SkW-zAdAAA0","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":5000}2:40 +140ms
engine.io-client:socket socket receive: type "open", data "{"sid":"HADNz_FR5SkW-zAdAAA0","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":5000}" +137ms
engine.io-client:socket socket open +0ms
socket.io-client:manager open +137ms
socket.io-client:manager cleanup +1ms
socket.io-client:socket transport is open - connecting +378ms
socket.io-client:manager reconnect success +0ms
engine.io-client:socket starting upgrade probes +1ms
engine.io-client:socket probing transport "websocket" +0ms
engine.io-client:socket creating transport "websocket" +0ms
engine.io-client:socket socket receive: type "message", data "0" +3ms
socket.io-parser decoded 0 as {"type":0,"nsp":"/"} +983ms
socket.io-client:manager writing packet {"type":2,"data":["active_markets",null],"options":{"compress":true},"id":0,"nsp":"/"} +3ms
socket.io-parser encoding packet {"type":2,"data":["active_markets",null],"options":{"compress":true},"id":0,"nsp":"/"} +1ms
socket.io-parser encoded {"type":2,"data":["active_markets",null],"options":{"compress":true},"id":0,"nsp":"/"} as 20["active_markets",null] +0ms
engine.io-client:socket flushing 1 packets in socket +1ms
engine.io-client:polling-xhr xhr open POST: https://env.api.app.bet/socket.io/?EIO=3&transport=polling&t=Mard90s&b64=1&sid=HADNz_FR5SkW-zAdAAA0 +145ms
engine.io-client:polling-xhr xhr data 26:420["active_markets",null] +0ms
engine.io-client:polling polling +7ms
engine.io-client:polling-xhr xhr poll +1ms
engine.io-client:polling-xhr xhr open GET: https://env.api.app.bet/socket.io/?EIO=3&transport=polling&t=Mard90u&b64=1&sid=HADNz_FR5SkW-zAdAAA0 +1ms
engine.io-client:polling-xhr xhr data null +0ms
engine.io-client:socket probe transport "websocket" failed because of error: Error: websocket error +135ms
engine.io-client:socket socket error {"type":"TransportError","description":400} +5ms
socket.io-client:manager error { Error: xhr post error
at XHR.Transport.onError (/home/julian/project/app-server/node_modules/engine.io-client/lib/transport.js:64:13)
at Request.<anonymous> (/home/julian/project/app-server/node_modules/engine.io-client/lib/transports/polling-xhr.js:109:10)
at Request.Emitter.emit (/home/julian/project/app-server/node_modules/component-emitter/index.js:133:20)
at Request.onError (/home/julian/project/app-server/node_modules/engine.io-client/lib/transports/polling-xhr.js:309:8)
at Timeout._onTimeout (/home/julian/project/app-server/node_modules/engine.io-client/lib/transports/polling-xhr.js:256:18)
at ontimeout (timers.js:427:11)
at tryOnTimeout (timers.js:289:5)
at listOnTimeout (timers.js:252:5)
at Timer.processTimers (timers.js:212:10) type: 'TransportError', description: 400 } +141ms
engine.io-client:socket socket close with reason: "transport error" +1ms
engine.io-client:polling transport open - closing +139ms
engine.io-client:polling writing close packet +0ms
engine.io-client:polling-xhr xhr open POST: https://env.api.app.bet/socket.io/?EIO=3&transport=polling&t=Mard933&b64=1&sid=HADNz_FR5SkW-zAdAAA0 +138ms
engine.io-client:polling-xhr xhr data 1:1 +0ms
socket.io-client:manager onclose +2ms
socket.io-client:manager cleanup +0ms
socket.io-client:socket close (transport error) +146ms
socket.io-client:manager will wait 760ms before reconnect attempt +1ms
engine.io-client:polling polling got data 1:6 +168ms
socket.io-client:manager attempting reconnect +760ms
socket.io-client:manager readyState closed +0ms
socket.io-client:manager opening https://env.api.app.bet +0ms
engine.io-client:socket creating transport "polling" +762ms
engine.io-client:polling polling +594ms
engine.io-client:polling-xhr xhr poll +763ms
engine.io-client:polling-xhr xhr open GET: https://env.api.app.bet/socket.io/?EIO=3&transport=polling&t=Mard9E-&b64=1 +0ms
engine.io-client:polling-xhr xhr data null +0ms
engine.io-client:socket setting transport polling +2ms
socket.io-client:manager connect attempt will timeout after 20000 +2ms
engine.io-client:polling polling got data 96:0{"sid":"WKWlwvuSqRP4z_kbAABC","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":5000}2:40 +197ms
engine.io-client:socket socket receive: type "open", data "{"sid":"WKWlwvuSqRP4z_kbAABC","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":5000}" +195ms
engine.io-client:socket socket open +0ms
socket.io-client:manager open +195ms
socket.io-client:manager cleanup +0ms
socket.io-client:socket transport is open - connecting +958ms
socket.io-client:manager reconnect success +0ms
engine.io-client:socket starting upgrade probes +0ms
engine.io-client:socket probing transport "websocket" +0ms
engine.io-client:socket creating transport "websocket" +0ms
engine.io-client:socket socket receive: type "message", data "0" +1ms
socket.io-parser decoded 0 as {"type":0,"nsp":"/"} +1s
engine.io-client:polling polling +2ms
engine.io-client:polling-xhr xhr poll +198ms
engine.io-client:polling-xhr xhr open GET: https://env.api.app.bet/socket.io/?EIO=3&transport=polling&t=Mard9I4&b64=1&sid=WKWlwvuSqRP4z_kbAABC +0ms
engine.io-client:polling-xhr xhr data null +0ms
engine.io-client:socket socket error {"type":"TransportError","description":400} +135ms
socket.io-client:manager error { Error: xhr poll error
at XHR.Transport.onError (/home/julian/project/app-server/node_modules/engine.io-client/lib/transport.js:64:13)
at Request.<anonymous> (/home/julian/project/app-server/node_modules/engine.io-client/lib/transports/polling-xhr.js:128:10)
at Request.Emitter.emit (/home/julian/project/app-server/node_modules/component-emitter/index.js:133:20)
at Request.onError (/home/julian/project/app-server/node_modules/engine.io-client/lib/transports/polling-xhr.js:309:8)
at Timeout._onTimeout (/home/julian/project/app-server/node_modules/engine.io-client/lib/transports/polling-xhr.js:256:18)
at ontimeout (timers.js:427:11)
at tryOnTimeout (timers.js:289:5)
at listOnTimeout (timers.js:252:5)
at Timer.processTimers (timers.js:212:10) type: 'TransportError', description: 400 } +136ms
engine.io-client:socket socket close with reason: "transport error" +1ms
engine.io-client:polling transport open - closing +135ms
engine.io-client:polling writing close packet +0ms
engine.io-client:polling-xhr xhr open POST: https://env.api.app.bet/socket.io/?EIO=3&transport=polling&t=Mard9KB&b64=1&sid=WKWlwvuSqRP4z_kbAABC +135ms
engine.io-client:polling-xhr xhr data 1:1 +0ms
socket.io-client:manager onclose +3ms
socket.io-client:manager cleanup +0ms
socket.io-client:socket close (transport error) +139ms
socket.io-client:manager will wait 1076ms before reconnect attempt +0ms
engine.io-client:socket probe transport "websocket" failed because of error: socket closed +2ms
socket.io-client:manager attempting reconnect +1s
socket.io-client:manager readyState closed +0ms
socket.io-client:manager opening https://env.api.app.bet +0ms
engine.io-client:socket creating transport "polling" +1s
engine.io-client:polling polling +1s
engine.io-client:polling-xhr xhr poll +1s
engine.io-client:polling-xhr xhr open GET: https://env.api.app.bet/socket.io/?EIO=3&transport=polling&t=Mard9b3&b64=1 +0ms
engine.io-client:polling-xhr xhr data null +0ms
engine.io-client:socket setting transport polling +2ms
socket.io-client:manager connect attempt will timeout after 20000 +2ms
有什么想法可以调试吗?