1.0.0-pre "Session ID unknown"
Problem
HTTP Response {"code":1,"message":"Session ID unknown"} DEBUG=socket.io:* socket.io:socket joined room 2d1DHsPAtc1Sspm6AAAE +0ms socket.io:server incoming connection with id rwLW7JMBp6E4TyexAAAG +3s socket.io:client connecting to namespace / +3s socket.io:namespace adding socket to nsp / +3s socket.io:socket socket connected - writing packet +3s socket.io:socket joining room rwLW7JMBp6E4TyexAAAG +0ms socket.io:client writing packet {"type":0,"nsp":"/"} +1ms socket.io:client writing packet {"type":2,"data":["news",{"hello":"world"}],"nsp":"/"} +0ms socket.io:socket joined room rwLW7JMBp6E4TyexAAAG +1ms socket.io:server incoming connection with id 03Izy4YOxaYm5-d-AAAH +1s socket.io:client connecting to namespace / +1s socket.io:namespace adding socket to nsp / +1s socket.io:socket socket connected - writing packet +1s socket.io:socket joining room 03Izy4YOxaYm5-d-AAAH +0ms socket.io:client writing packet {"type":0,"nsp":"/"} +1ms socket.io:client writing packet {"type":2,"data":["news",{"hello":"world"}],"nsp":"/"} +0ms And socket is disconnected immediately
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: 1.0.0-pre "Session ID unknown"
Hi guys, socket.io 1.0.6 socket.io-redis response: {"code":1,"message":"Session ID unknown"} just with more than 1 instance on Heroku. With one instance everything works fine (we love it) with 2 or more instances it fails. 400 error. Initialisation: io = require('socket.io')(compound.server); [code block] sub = redis.createClient(redisPort, redisHost,{return_buffers:true}); pub = redis.c
Trust Score
3 verifications
- 1
Step 1
socket.io 1.0.6 socket.io-redis
textio.adapter(redisSocket({ host: redisHost , port: redisPort , pubClient: pub , subClient: sub })); - 2
Step 2
{"code":1,"message":"Session ID unknown"}
- 3
just with more than 1 instance on Heroku.
With one instance everything works fine (we love it) with 2 or more instances it fails. 400 error.
- 4
Initialisation:
io = require('socket.io')(compound.server);
Validation
Resolved in socketio/socket.io GitHub issue #1503. Community reactions: 3 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep