adhearsion / blather

XMPP/Jabber Library and DSL for Ruby written on EventMachine and Nokogiri.
adhearsion.com/blather
Other
557 stars 89 forks source link

Can't connect to tigase server #91

Closed paulhsu closed 11 years ago

paulhsu commented 12 years ago

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

D, [2012-04-24T21:33:52.507271 #17680] DEBUG -- : USING JID: all-xmpp-test@paulhsu-desktop
D, [2012-04-24T21:33:52.507586 #17680] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.3-p0/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-04-24T21:33:52.509523 #17680] DEBUG -- : RECEIVING (stream) <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="paulhsu-desktop" id="6309b2a7-c130-491c-9da7-701d7aa092a1" version="1.0" lang="en"/>
D, [2012-04-24T21:33:52.513820 #17680] DEBUG -- : RECEIVING (features) <stream:features xmlns:stream="http://etherx.jabber.org/streams">
  <ver xmlns="urn:xmpp:features:rosterver"/>
  <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
  <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-04-24T21:33:52.514212 #17680] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.0/lib/blather/stream/features/tls.rb:16:in `receive_data') <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
D, [2012-04-24T21:33:52.518077 #17680] DEBUG -- : RECEIVING (proceed) <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
D, [2012-04-24T21:33:52.518783 #17680] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.3-p0/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-04-24T21:33:52.528936 #17680] DEBUG -- : Checking SSL cert: -----BEGIN CERTIFICATE-----
MIICLDCCAZUCBEVzLU8wDQYJKoZIhvcNAQEEBQAwXTELMAkGA1UEBhMCZHUxDjAM
BgNVBAgTBWR1bW15MQ4wDAYDVQQHEwVkdW1teTEOMAwGA1UEChMFZHVtbXkxDjAM
BgNVBAsTBWR1bW15MQ4wDAYDVQQDEwVkdW1teTAeFw0wNjEyMDMyMDAyMjNaFw0w
NzAzMDMyMDAyMjNaMF0xCzAJBgNVBAYTAmR1MQ4wDAYDVQQIEwVkdW1teTEOMAwG
A1UEBxMFZHVtbXkxDjAMBgNVBAoTBWR1bW15MQ4wDAYDVQQLEwVkdW1teTEOMAwG
A1UEAxMFZHVtbXkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM9o5DmAPm/E
BrwbF+jsIUGF07U2srvgkT+KUoMecEPJvcr8a0sf4uwOwf+IzTLv6QL8JhTXlz+x
H/x9RvxF+td/iHip7R8hu23AaZ0LDHPALWH0N9bliCZt+7fHS08MfpJekYUL9Qfy
qfmIDIdPZy0ZLGY/TuDCGH0dMDr4VcWzAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEA
m6s7ucnSkhmV7OckGfTp3TRi6cdEOnMgJFguyS594yLRwnWGuf/sJZ/SAnPAwRTj
uY+YuLjJJHuJrLSJI7KN9DyXyC2xH21rgWCcctvLOx7Q9I0j39vUcfVVvQ4ocTno
M+KImL33lGZev8bIDwUOEP1ZcgJDwZZFonrifm7YPbc=
-----END CERTIFICATE-----

D, [2012-04-24T21:33:52.529198 #17680] DEBUG -- : Checking SSL cert: -----BEGIN CERTIFICATE-----
MIICLDCCAZUCBEVzLU8wDQYJKoZIhvcNAQEEBQAwXTELMAkGA1UEBhMCZHUxDjAM
BgNVBAgTBWR1bW15MQ4wDAYDVQQHEwVkdW1teTEOMAwGA1UEChMFZHVtbXkxDjAM
BgNVBAsTBWR1bW15MQ4wDAYDVQQDEwVkdW1teTAeFw0wNjEyMDMyMDAyMjNaFw0w
NzAzMDMyMDAyMjNaMF0xCzAJBgNVBAYTAmR1MQ4wDAYDVQQIEwVkdW1teTEOMAwG
A1UEBxMFZHVtbXkxDjAMBgNVBAoTBWR1bW15MQ4wDAYDVQQLEwVkdW1teTEOMAwG
A1UEAxMFZHVtbXkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM9o5DmAPm/E
BrwbF+jsIUGF07U2srvgkT+KUoMecEPJvcr8a0sf4uwOwf+IzTLv6QL8JhTXlz+x
H/x9RvxF+td/iHip7R8hu23AaZ0LDHPALWH0N9bliCZt+7fHS08MfpJekYUL9Qfy
qfmIDIdPZy0ZLGY/TuDCGH0dMDr4VcWzAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEA
m6s7ucnSkhmV7OckGfTp3TRi6cdEOnMgJFguyS594yLRwnWGuf/sJZ/SAnPAwRTj
uY+YuLjJJHuJrLSJI7KN9DyXyC2xH21rgWCcctvLOx7Q9I0j39vUcfVVvQ4ocTno
M+KImL33lGZev8bIDwUOEP1ZcgJDwZZFonrifm7YPbc=
-----END CERTIFICATE-----

D, [2012-04-24T21:33:52.529343 #17680] DEBUG -- : Checking SSL cert: -----BEGIN CERTIFICATE-----
MIICLDCCAZUCBEVzLU8wDQYJKoZIhvcNAQEEBQAwXTELMAkGA1UEBhMCZHUxDjAM
BgNVBAgTBWR1bW15MQ4wDAYDVQQHEwVkdW1teTEOMAwGA1UEChMFZHVtbXkxDjAM
BgNVBAsTBWR1bW15MQ4wDAYDVQQDEwVkdW1teTAeFw0wNjEyMDMyMDAyMjNaFw0w
NzAzMDMyMDAyMjNaMF0xCzAJBgNVBAYTAmR1MQ4wDAYDVQQIEwVkdW1teTEOMAwG
A1UEBxMFZHVtbXkxDjAMBgNVBAoTBWR1bW15MQ4wDAYDVQQLEwVkdW1teTEOMAwG
A1UEAxMFZHVtbXkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM9o5DmAPm/E
BrwbF+jsIUGF07U2srvgkT+KUoMecEPJvcr8a0sf4uwOwf+IzTLv6QL8JhTXlz+x
H/x9RvxF+td/iHip7R8hu23AaZ0LDHPALWH0N9bliCZt+7fHS08MfpJekYUL9Qfy
qfmIDIdPZy0ZLGY/TuDCGH0dMDr4VcWzAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEA
m6s7ucnSkhmV7OckGfTp3TRi6cdEOnMgJFguyS594yLRwnWGuf/sJZ/SAnPAwRTj
uY+YuLjJJHuJrLSJI7KN9DyXyC2xH21rgWCcctvLOx7Q9I0j39vUcfVVvQ4ocTno
M+KImL33lGZev8bIDwUOEP1ZcgJDwZZFonrifm7YPbc=
-----END CERTIFICATE-----

D, [2012-04-24T21:33:52.573282 #17680] DEBUG -- : RECEIVING (stream) <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="paulhsu-desktop" id="6309b2a7-c130-491c-9da7-701d7aa092a1" version="1.0" lang="en"/>
D, [2012-04-24T21:33:52.612156 #17680] 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-04-24T21:33:52.613015 #17680] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.3-p0/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-04-24T21:33:52.618806 #17680] DEBUG -- : RECEIVING (challenge) <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09InBhdWxoc3UtaHRjLWRlc2t0b3AiLG5vbmNlPSJ0dkRzMC9vZW0yVkFhS08yaWNoSnZTbkt3aUhCekhqZFpCWlFTaTlRIixxb3A9ImF1dGgiLGNoYXJzZXQ9dXRmLTgsYWxnb3JpdGhtPW1kNS1zZXNz</challenge>
D, [2012-04-24T21:33:52.619306 #17680] DEBUG -- : CHALLENGE DECODE: {"realm"=>"paulhsu-desktop", "nonce"=>"tvDs0/oem2VAaKO2ichJvSnKwiHBzHjdZBZQSi9Q", "qop"=>"auth", "charset"=>"utf-8", "algorithm"=>"md5-sess"}
D, [2012-04-24T21:33:52.619770 #17680] DEBUG -- : CHALLENGE RESPONSE: {:nonce=>"\"tvDs0/oem2VAaKO2ichJvSnKwiHBzHjdZBZQSi9Q\"", :charset=>"utf-8", :username=>"\"all-xmpp-test\"", :realm=>"\"paulhsu-desktop\"", :cnonce=>"\"2e5f7a8dbefcac699b84381a277bbb05\"", :nc=>"00000001", :qop=>"auth", :"digest-uri"=>"\"xmpp/paulhsu-desktop\"", :response=>"5aafd164b05398eede23860117fc3f27"}
D, [2012-04-24T21:33:52.619932 #17680] DEBUG -- : CH RESP TXT: nonce="tvDs0/oem2VAaKO2ichJvSnKwiHBzHjdZBZQSi9Q",charset=utf-8,username="all-xmpp-test",realm="paulhsu-desktop",cnonce="2e5f7a8dbefcac699b84381a277bbb05",nc=00000001,qop=auth,digest-uri="xmpp/paulhsu-desktop",response=5aafd164b05398eede23860117fc3f27
D, [2012-04-24T21:33:52.620467 #17680] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.0/lib/blather/stream/features/sasl.rb:167:in `respond') <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">bm9uY2U9InR2RHMwL29lbTJWQWFLTzJpY2hKdlNuS3dpSEJ6SGpkWkJaUVNpOVEiLGNoYXJzZXQ9dXRmLTgsdXNlcm5hbWU9ImFsbC14bXBwLXRlc3QiLHJlYWxtPSJwYXVsaHN1LWh0Yy1kZXNrdG9wIixjbm9uY2U9IjJlNWY3YThkYmVmY2FjNjk5Yjg0MzgxYTI3N2JiYjA1IixuYz0wMDAwMDAwMSxxb3A9YXV0aCxkaWdlc3QtdXJpPSJ4bXBwL3BhdWxoc3UtaHRjLWRlc2t0b3AiLHJlc3BvbnNlPTVhYWZkMTY0YjA1Mzk4ZWVkZTIzODYwMTE3ZmMzZjI3</response>
D, [2012-04-24T21:33:52.626098 #17680] DEBUG -- : RECEIVING (failure) <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
  <not-authorized/>
</failure>
D, [2012-04-24T21:33:52.626728 #17680] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.3-p0/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">YWxsLXhtcHAtdGVzdEBwYXVsaHN1LWh0Yy1kZXNrdG9wAGFsbC14bXBwLXRlc3QAdGlnYXNl</auth>
D, [2012-04-24T21:33:52.633477 #17680] DEBUG -- : RECEIVING (failure) <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
  <not-authorized/>
</failure>
D, [2012-04-24T21:33:52.633855 #17680] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.3-p0/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-04-24T21:33:52.637328 #17680] DEBUG -- : RECEIVING (success) <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
D, [2012-04-24T21:33:52.637570 #17680] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.3-p0/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-04-24T21:33:52.638555 #17680] DEBUG -- : RECEIVING (stream) <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="paulhsu-desktop" id="6309b2a7-c130-491c-9da7-701d7aa092a1" version="1.0" lang="en"/>
D, [2012-04-24T21:33:52.671994 #17680] 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-24T21:33:52.672614 #17680] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.3-p0/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-04-24T21:33:52.679610 #17680] DEBUG -- : RECEIVING (iq) <iq type="error" from="paulhsu-desktop" id="blather0002">
  <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-24T21:33:52.680570 #17680] DEBUG -- : SENDING: (/home/paulhsu/.rvm/gems/ruby-1.9.3-p0/gems/blather-0.7.0/lib/blather/stream.rb:248:in `stop') </stream:stream>
D, [2012-04-24T21:33:52.681588 #17680] DEBUG -- : RECEIVING (end) <stream:end xmlns:stream="http://etherx.jabber.org/streams"/>
paulhsu commented 12 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 -- : 
benlangfeld commented 12 years ago

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.

paulhsu commented 12 years ago

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"/>
AntV commented 12 years ago

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'
benlangfeld commented 12 years ago

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:incall' /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:inblock (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:inblock 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:infind' /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:inblock 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:inhandle_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:incatch' /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:inblock 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:inblock (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:inblock 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:inblock (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:inwatchdog' /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:innew' /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

pmashchak commented 12 years ago

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.

benlangfeld commented 12 years ago

@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!

pmashchak commented 12 years ago

Ok thanks will be glad to have this issue fixed.

benlangfeld commented 11 years ago

Potential fix in #95. All discussion there please. Closing.