Redis-adapter -> reject(new Error("timeout reached while waiting for fetchSockets response"))
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- express, redis, typescript
Direzione di ricerca
Reproduce the failure by opening the admin UI with the shown Socket.IO, Redis adapter, and Express setup. Start at node_modules/@socket.io/redis-adapter/dist/index.js around line 615 and trace the fetchSockets timeout and its callers. Done means identifying the cause and preventing the admin UI connection from crashing the server.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
hello.
I am configuring a socket.io server using pm2 and redis-adapter.
I'm using express to bring up the admin ui on the same port as socket.io.
public async connect(http_server: http.Server): Promise<void> {
try {
SocketIO.server = new Server({
cors: {
origin: "*",
credentials: true
},
transports: ['websocket'],
allowUpgrades: true,
});
const pubClient = createClient({
socket: {
host: process.env.REDIS_IP,
port: <number><unknown>process.env.REDIS_PORT,
},
password: process.env.REDIS_PASSWORD
});
const subClient = pubClient.duplicate();
await pubClient.connect();
await subClient.connect();
SocketIO.server.adapter(createAdapter(pubClient, subClient));
SocketIO.server.attach(http_server);
instrument(SocketIO.server, {
auth: {
type: "basic",
username: "...",
password: "^__^",
},
mode: "development",
serverId: `${hostname()}#${process.pid}`,
});
} catch (err) {
process.exit(1);
}
}
run it like this, it works without any problems, but when you connect to http://localhost:3900, the following message occurs after about 3 to 5 seconds.
D:\Project\socket\node_modules\@socket.io\redis-adapter\dist\index.js:615
reject(new Error("timeout reached while waiting for fetchSockets response"));
^
Error: timeout reached while waiting for fetchSockets response
at Timeout._onTimeout (D:\Project\socket\node_modules\@socket.io\redis-adapter\dist\index.js:615:28)
at listOnTimeout (node:internal/timers:564:17)
at processTimers (node:internal/timers:507:7)
https://admin.socket.io <- this url is Same.. the server crashes.
What's the problem? 😢
npm version
"dependencies": {
"@socket.io/admin-ui": "^0.5.1",
"@socket.io/redis-adapter": "^8.0.1",
"express": "^4.18.2",
"redis": "^4.0.4",
"socket.io": "^4.5.4"
},
- Lingua principale
- Vue
- Stelle
- 413
- Fork
- 109
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di socketio/socket.io-admin-ui
-
MaxListenersExceededWarningAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
socketio/socket.io-admin-ui#86 · 2 commenti ·
-
Add support for DenoApertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
socketio/socket.io-admin-ui#84 · 2 commenti · 2 reazioni ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
socketio/socket.io-admin-ui#83 · 7 commenti · 2 reazioni ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
Tutte le issue di socketio/socket.io-admin-ui
Issue simili
-
area/install-update comp/gateway P0 sweeper:risk-compatibility type/bug
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 72/100
NousResearch/hermes-agent#135997 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Team: SCM
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
microsoft/BCApps#12652 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area:auth bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ArchiveLabs/lenny#242 ·
I maintainer di solito rispondono entro 1 giorno