Closed paulhsu closed 11 years ago
I tried many version of balther, 0.5.3/0.5.12/0.6.2/0.7.0 under ruby-1.9.2-p320.
I finally get
D, [2012-04-25T13:51:33.901350 #1969] DEBUG -- : STREAM IN: <stream:features><ver xmlns="urn:xmpp:features:rosterver"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/><register xmlns="http://jabber.org/features/iq-register"/><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/></stream:features>
D, [2012-04-25T13:51:33.901660 #1969] DEBUG -- : RECEIVING (features) <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<ver xmlns="urn:xmpp:features:rosterver"/>
<session xmlns="urn:ietf:params:xml:ns:xmpp-session"/>
<register xmlns="http://jabber.org/features/iq-register"/>
<bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/>
</stream:features>
D, [2012-04-25T13:51:33.901941 #1969] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.2-p320/gems/blather-0.6.0/lib/blather/stream/features/session.rb:40:in `session') <iq type="set" id="blather0002" to="paulhsu-htc-desktop"><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></iq>
D, [2012-04-25T13:51:33.905832 #1969] DEBUG -- :
------------------------------
D, [2012-04-25T13:51:33.905969 #1969] DEBUG -- : STREAM IN: <iq type="error" id="blather0002" from="paulhsu-htc-desktop"><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/><error code="401" type="auth"><not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en">You must bind the resource first: http://www.xmpp.org/rfcs/rfc3920.html#bind</text></error></iq>
D, [2012-04-25T13:51:33.906598 #1969] DEBUG -- : RECEIVING (iq) <iq type="error" id="blather0002" from="paulhsu-htc-desktop">
<session xmlns="urn:ietf:params:xml:ns:xmpp-session"/>
<error code="401" type="auth">
<not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
<text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" lang="en">You must bind the resource first: http://www.xmpp.org/rfcs/rfc3920.html#bind</text>
</error>
</iq>
D, [2012-04-25T13:51:33.907372 #1969] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.2-p320/gems/blather-0.6.0/lib/blather/stream.rb:250:in `stop') </stream:stream>
D, [2012-04-25T13:51:33.908706 #1969] DEBUG -- :
Can you connect to tigase without TLS? I don't really have time to chase this right now, but @fyafighter implemented our TLS support, so he might have an idea on this.
After I close tigase's tls, the problem seems the same.
D, [2012-05-11T11:05:45.333671 #21890] DEBUG -- : USING JID: admin@paulhsu-desktop
D, [2012-05-11T11:05:45.334033 #21890] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.3-p194/gems/blather-0.7.0/lib/blather/stream/client.rb:21:in `start') <stream:stream to='paulhsu-desktop' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en' >
D, [2012-05-11T11:05:45.337886 #21890] DEBUG -- : RECEIVING (stream) <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="paulhsu-desktop" id="1225fccb-b769-46ee-9221-ca4d445a97e5" version="1.0" lang="en"/>
D, [2012-05-11T11:05:45.343172 #21890] DEBUG -- : RECEIVING (features) <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<ver xmlns="urn:xmpp:features:rosterver"/>
<mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<mechanism>PLAIN</mechanism>
<mechanism>DIGEST-MD5</mechanism>
<mechanism>CRAM-MD5</mechanism>
<mechanism>ANONYMOUS</mechanism>
</mechanisms>
<register xmlns="http://jabber.org/features/iq-register"/>
<auth xmlns="http://jabber.org/features/iq-auth"/>
</stream:features>
D, [2012-05-11T11:05:45.343628 #21890] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.3-p194/gems/blather-0.7.0/lib/blather/stream/features/sasl.rb:101:in `authenticate') <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="DIGEST-MD5"/>
D, [2012-05-11T11:05:45.349810 #21890] DEBUG -- : RECEIVING (challenge) <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09InBhdWxoc3UtaHRjLWRlc2t0b3AiLG5vbmNlPSJUV05iTURrbyt0L3FPZCs3M1hWK0N5NE4yTkh0TTZsR1V6NnFGUzJvIixxb3A9ImF1dGgiLGNoYXJzZXQ9dXRmLTgsYWxnb3JpdGhtPW1kNS1zZXNz</challenge>
D, [2012-05-11T11:05:45.350145 #21890] DEBUG -- : CHALLENGE DECODE: {"realm"=>"paulhsu-desktop", "nonce"=>"TWNbMDko+t/qOd+73XV+Cy4N2NHtM6lGUz6qFS2o", "qop"=>"auth", "charset"=>"utf-8", "algorithm"=>"md5-sess"}
D, [2012-05-11T11:05:45.350450 #21890] DEBUG -- : CHALLENGE RESPONSE: {:nonce=>"\"TWNbMDko+t/qOd+73XV+Cy4N2NHtM6lGUz6qFS2o\"", :charset=>"utf-8", :username=>"\"admin\"", :realm=>"\"paulhsu-desktop\"", :cnonce=>"\"24206e19e1fc5162877b1af85c52db3d\"", :nc=>"00000001", :qop=>"auth", :"digest-uri"=>"\"xmpp/paulhsu-desktop\"", :response=>"5b36028cd2a8ce1785b61f51f44e234c"}
D, [2012-05-11T11:05:45.350561 #21890] DEBUG -- : CH RESP TXT: nonce="TWNbMDko+t/qOd+73XV+Cy4N2NHtM6lGUz6qFS2o",charset=utf-8,username="admin",realm="paulhsu-desktop",cnonce="24206e19e1fc5162877b1af85c52db3d",nc=00000001,qop=auth,digest-uri="xmpp/paulhsu-desktop",response=5b36028cd2a8ce1785b61f51f44e234c
D, [2012-05-11T11:05:45.350917 #21890] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.3-p194/gems/blather-0.7.0/lib/blather/stream/features/sasl.rb:167:in `respond') <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">bm9uY2U9IlRXTmJNRGtvK3QvcU9kKzczWFYrQ3k0TjJOSHRNNmxHVXo2cUZTMm8iLGNoYXJzZXQ9dXRmLTgsdXNlcm5hbWU9ImFkbWluIixyZWFsbT0icGF1bGhzdS1odGMtZGVza3RvcCIsY25vbmNlPSIyNDIwNmUxOWUxZmM1MTYyODc3YjFhZjg1YzUyZGIzZCIsbmM9MDAwMDAwMDEscW9wPWF1dGgsZGlnZXN0LXVyaT0ieG1wcC9wYXVsaHN1LWh0Yy1kZXNrdG9wIixyZXNwb25zZT01YjM2MDI4Y2QyYThjZTE3ODViNjFmNTFmNDRlMjM0Yw==</response>
D, [2012-05-11T11:05:45.360218 #21890] DEBUG -- : RECEIVING (failure) <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<not-authorized/>
</failure>
D, [2012-05-11T11:05:45.360760 #21890] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.3-p194/gems/blather-0.7.0/lib/blather/stream/features/sasl.rb:177:in `authenticate') <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">YWRtaW5AcGF1bGhzdS1odGMtZGVza3RvcABhZG1pbgB0aWdhc2U=</auth>
D, [2012-05-11T11:05:45.367503 #21890] DEBUG -- : RECEIVING (failure) <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<not-authorized/>
</failure>
D, [2012-05-11T11:05:45.367912 #21890] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.3-p194/gems/blather-0.7.0/lib/blather/stream/features/sasl.rb:184:in `authenticate') <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="ANONYMOUS"/>
D, [2012-05-11T11:05:45.372390 #21890] DEBUG -- : RECEIVING (success) <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
D, [2012-05-11T11:05:45.372645 #21890] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.3-p194/gems/blather-0.7.0/lib/blather/stream/client.rb:21:in `start') <stream:stream to='paulhsu-desktop' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en' >
D, [2012-05-11T11:05:45.373569 #21890] DEBUG -- : RECEIVING (stream) <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="paulhsu-desktop" id="1225fccb-b769-46ee-9221-ca4d445a97e5" version="1.0" lang="en"/>
D, [2012-05-11T11:05:45.413625 #21890] DEBUG -- : RECEIVING (features) <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<ver xmlns="urn:xmpp:features:rosterver"/>
<session xmlns="urn:ietf:params:xml:ns:xmpp-session"/>
<register xmlns="http://jabber.org/features/iq-register"/>
<bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/>
</stream:features>
D, [2012-05-11T11:05:45.414248 #21890] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.3-p194/gems/blather-0.7.0/lib/blather/stream/features/session.rb:40:in `session') <iq type="set" id="blather0002" to="paulhsu-desktop"><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></iq>
D, [2012-05-11T11:05:45.419716 #21890] DEBUG -- : RECEIVING (iq) <iq id="blather0002" from="paulhsu-desktop" type="error">
<session xmlns="urn:ietf:params:xml:ns:xmpp-session"/>
<error code="401" type="auth">
<not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
<text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" lang="en">You must bind the resource first: http://www.xmpp.org/rfcs/rfc3920.html#bind</text>
</error>
</iq>
D, [2012-05-11T11:05:45.420604 #21890] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.3-p194/gems/blather-0.7.0/lib/blather/stream.rb:248:in `stop') </stream:stream>
D, [2012-05-11T11:05:45.421493 #21890] DEBUG -- : RECEIVING (end) <stream:end xmlns:stream="http://etherx.jabber.org/streams"/>
The same is for me, can it be fixed? Because I really need work with Tigase over TLS.
Error: Stanza Error (not-authorized): You must bind the resource first: http://www.xmpp.org/rfcs/rfc3920.html#bind
The trace:
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:232:in `block in setup_initial_handlers'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:295:in `call'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:295:in `call_handler'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:286:in `block (2 levels) in call_handler_for'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:286:in `catch'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:286:in `block in call_handler_for'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:285:in `each'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:285:in `find'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:285:in `call_handler_for'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:278:in `block in handle_stanza'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:277:in `each'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:277:in `handle_stanza'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:194:in `block in handle_data'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:192:in `catch'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:192:in `handle_data'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:63:in `block in initialize'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/work_queue.rb:139:in `call'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/work_queue.rb:139:in `block (2 levels) in start'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/actor.rb:86:in `call'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/actor.rb:86:in `block in spawn_link'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/actor.rb:69:in `call'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/actor.rb:69:in `block (2 levels) in spawn'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/actor.rb:212:in `block in initialize'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/actor.rb:377:in `watchdog'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/actor.rb:212:in `initialize'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/actor.rb:66:in `new'
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/actor.rb:66:in `block in spawn'
It almost certainly can be fixed, but I don't have the time right now to do it. All contributions welcome.
Enviado via iPad
Em 11 Jun 2012, às 12:57, AntV reply@reply.github.com escreveu:
The same is for me, can it be fixed? Because I really need work with Tigase over TLS.
Error: Stanza Error (not-authorized): You must bind the resource first: http://www.xmpp.org/rfcs/rfc3920.html#bind
The trace:
/home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:232:in
block in setup_initial_handlers' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:295:in
call' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:295:incall_handler' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:286:in
block (2 levels) in call_handler_for' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:286:incatch' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:286:in
block in call_handler_for' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:285:ineach' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:285:in
find' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:285:incall_handler_for' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:278:in
block in handle_stanza' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:277:ineach' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:277:in
handle_stanza' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:194:inblock in handle_data' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:192:in
catch' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:192:inhandle_data' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.1/lib/blather/client/client.rb:63:in
block in initialize' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/work_queue.rb:139:incall' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/work_queue.rb:139:in
block (2 levels) in start' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/actor.rb:86:incall' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/actor.rb:86:in
block in spawn_link' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/actor.rb:69:incall' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/actor.rb:69:in
block (2 levels) in spawn' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/actor.rb:212:inblock in initialize' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/actor.rb:377:in
watchdog' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/actor.rb:212:ininitialize' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/actor.rb:66:in
new' /home/pmashchak/.rvm/gems/ruby-1.9.3-p0/gems/girl_friday-0.9.7/lib/girl_friday/actor.rb:66:in `block in spawn'
Reply to this email directly or view it on GitHub: https://github.com/sprsquish/blather/issues/91#issuecomment-6241643
I found the main couse why Tigase doesn't want to authorize a blather bot.
Please take a look at pull requiest:
https://github.com/sprsquish/blather/pull/95
This is however quick fix. The problem was that <session/>
went before <bind/>
node.
And Blather started to establish session without binding.
Hope this helps.
@pmashchak That's interesting. I will review the spec when I get some time and determine who is at fault here, and what might be a more robust approach to fixing this. I'm glad you have it working in the short term though!
Ok thanks will be glad to have this issue fixed.
Potential fix in #95. All discussion there please. Closing.
Hi, I tried several XMPP servers, ejabberd, vines, tigase on my desktop.
I can use trusted_echo.rb(in the example fold) to login to ejabberd, vines on my local machine.
But when I use trusted_echo.rb to login to my tigase server. It fails.
But I can use the PSI client to login to my tigase server.
Does anyone know why?
Thanks