astro/node-xmpp — Issue #39: Bug in S2S
Author: superfeedr
Created: 2011-10-09 22:13:03+00:00
State: open

I was consistently able to reproduce the following stack error (read : this happens quite often) :

net.js:391
throw new Error('Socket is not writable');
^
Error: Socket is not writable
at Socket._writeOut (net.js:391:11)
at Socket. (net.js:377:17)
at Socket.write (/home/node/msgboy-xmpp-server/node_modules/node-xmpp/lib/idle_timeout.js:22:18)
at /home/node/msgboy-xmpp-server/node_modules/node-xmpp/lib/xmpp/connection.js:87:25
at /home/node/msgboy-xmpp-server/node_modules/node-xmpp/lib/xmpp/connection.js:82:21
at Element.write (/home/node/msgboy-xmpp-server/node_modules/ltx/lib/element.js:189:13)
at /home/node/msgboy-xmpp-server/node_modules/ltx/lib/element.js:198:23
at Array.forEach (native)
at Element.write (/home/node/msgboy-xmpp-server/node_modules/ltx/lib/element.js:196:23)
at Socket.serializeStanza (/home/node/msgboy-xmpp-server/node_modules/node-xmpp/lib/xmpp/connection.js:81:20)
at [object Object].send (/home/node/msgboy-xmpp-server/node_modules/node-xmpp/lib/xmpp/connection.js:86:21)
at [object Object].error (/home/node/msgboy-xmpp-server/node_modules/node-xmpp/lib/xmpp/connection.js:295:10)
at DomainContext.addInStream (/home/node/msgboy-xmpp-server/node_modules/node-xmpp/lib/xmpp/router.js:200:19)
at [object Object]. (/home/node/msgboy-xmpp-server/node_modules/node-xmpp/lib/xmpp/router.js:330:18)
at [object Object].emit (events.js:72:17)
at [object Object]. (/home/node/msgboy-xmpp-server/node_modules/node-xmpp/lib/xmpp/server.js:48:22)
at [object Object].emit (events.js:81:20)
at [object Object].onStanza (/home/node/msgboy-xmpp-server/node_modules/node-xmpp/lib/xmpp/connection.js:215:14)
at StreamParser. (/home/node/msgboy-xmpp-server/node_modules/node-xmpp/lib/xmpp/connection.js:116:14)
at StreamParser.emit (events.js:64:17)
at [object Object]. (/home/node/msgboy-xmpp-server/node_modules/node-xmpp/lib/xmpp/stream_parser.js:42:22)
at [object Object].emit (events.js:64:17)
at [object Object].emit (/home/node/msgboy-xmpp-server/node_modules/node-xmpp/node_modules/node-expat/lib/node-expat.js:14:12)
at [object Object].parse (/home/node/msgboy-xmpp-server/node_modules/node-xmpp/node_modules/node-expat/lib/node-expat.js:20:24)
at StreamParser.write (/home/node/msgboy-xmpp-server/node_modules/node-xmpp/lib/xmpp/stream_parser.js:78:26)
at [object Object].onData (/home/node/msgboy-xmpp-server/node_modules/node-xmpp/lib/xmpp/connection.js:164:21)
at Socket. (/home/node/msgboy-xmpp-server/node_modules/node-xmpp/lib/xmpp/connection.js:50:14)
at Socket.emit (events.js:81:20)
at Socket._onReadable (net.js:678:14)
at IOWatcher.onReadable [as callback] (net.js:177:10)

Based on my understanding, it happens when S2S connections are replaced by another one. Not sure how to handle this gracefuly.