Spencer Cheng
2010-11-16 03:14:07 UTC
Hi,
I am writing a custom XMPP client using XMPP4R talking to a local ejabberd server. I am having a problem with my custom XMPP client is being disconnected from the ejabberd server by a connection reset. I haven't been able to figure out whether this is a problem with how I've configured ejabberd, an XMPP4R library issue or some bug in my own XMPP client. I have tried disabling the c2s and s2s traffic shapers in ejabberd but that didn't fix anything.
There is nothing obvious (error reports, connection resets) in the ejabberd logs at the affected timestamps. My XMPP client runs happily for 15 minutes or more before it gets a connection reset while it is processing messages. If it is idle, the connection reset doesn't happen.
My xmpp client attempts to reconnect to the ejabberd server once it sees a connection reset but it is failing with an authentication exception which seems a bit strange. Why is there multiple connection to the same ejabberd server as I am seeing multiple connection failure which is triggering multiple reconnection attempts?
Does anyone have any suggestions as to where I should look? Thanks for any help.
Regards,
Spencer
------------
[...]
WARN [2010-11-15 21:34:32] :: XMPP connection failed. Reconnecting in 10s
WARN [2010-11-15 21:34:41] :: XMPP connection failed. Reconnecting in 10s
WARN [2010-11-15 21:34:49] :: XMPP connection failed. Reconnecting in 10s
WARN [2010-11-15 21:34:49] :: XMPP connection failed. Reconnecting in 10s
WARN [2010-11-15 21:34:49] :: XMPP connection failed. Reconnecting in 10s
WARN [2010-11-15 21:34:49] :: XMPP connection failed. Reconnecting in 10s
WARN [2010-11-15 21:34:49] :: XMPP connection failed. Reconnecting in 10s
/var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:118:in `auth': mechanisms (Jabber::ClientAuthenticationFailure)
from /StarCDN/src/xmppclient.rb:80:in `establish_connection'
from /StarCDN/src/xmppclient.rb:44
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:387:in `call'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:387:in `send'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:384:in `initialize'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:384:in `new'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:384:in `send'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:79:in `close'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:89:in `start'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:87:in `initialize'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:87:in `new'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:87:in `start'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:72:in `initialize'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:72:in `new'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:72:in `start'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/connection.rb:119:in `start'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:87:in `start'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/connection.rb:77:in `connect'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:70:in `connect'
from /StarCDN/src/xmppclient.rb:79:in `establish_connection'
from /StarCDN/src/xmppclient.rb:44
I am writing a custom XMPP client using XMPP4R talking to a local ejabberd server. I am having a problem with my custom XMPP client is being disconnected from the ejabberd server by a connection reset. I haven't been able to figure out whether this is a problem with how I've configured ejabberd, an XMPP4R library issue or some bug in my own XMPP client. I have tried disabling the c2s and s2s traffic shapers in ejabberd but that didn't fix anything.
There is nothing obvious (error reports, connection resets) in the ejabberd logs at the affected timestamps. My XMPP client runs happily for 15 minutes or more before it gets a connection reset while it is processing messages. If it is idle, the connection reset doesn't happen.
My xmpp client attempts to reconnect to the ejabberd server once it sees a connection reset but it is failing with an authentication exception which seems a bit strange. Why is there multiple connection to the same ejabberd server as I am seeing multiple connection failure which is triggering multiple reconnection attempts?
Does anyone have any suggestions as to where I should look? Thanks for any help.
Regards,
Spencer
------------
[...]
WARN [2010-11-15 21:34:32] :: XMPP connection failed. Reconnecting in 10s
WARN [2010-11-15 21:34:41] :: XMPP connection failed. Reconnecting in 10s
WARN [2010-11-15 21:34:49] :: XMPP connection failed. Reconnecting in 10s
WARN [2010-11-15 21:34:49] :: XMPP connection failed. Reconnecting in 10s
WARN [2010-11-15 21:34:49] :: XMPP connection failed. Reconnecting in 10s
WARN [2010-11-15 21:34:49] :: XMPP connection failed. Reconnecting in 10s
WARN [2010-11-15 21:34:49] :: XMPP connection failed. Reconnecting in 10s
/var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:118:in `auth': mechanisms (Jabber::ClientAuthenticationFailure)
from /StarCDN/src/xmppclient.rb:80:in `establish_connection'
from /StarCDN/src/xmppclient.rb:44
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:387:in `call'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:387:in `send'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:384:in `initialize'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:384:in `new'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:384:in `send'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:79:in `close'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:89:in `start'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:87:in `initialize'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:87:in `new'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:87:in `start'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:72:in `initialize'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:72:in `new'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:72:in `start'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/connection.rb:119:in `start'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:87:in `start'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/connection.rb:77:in `connect'
from /var/lib/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:70:in `connect'
from /StarCDN/src/xmppclient.rb:79:in `establish_connection'
from /StarCDN/src/xmppclient.rb:44