Summary: | ASTERISK-10470: Jabber gtalk not connecting anymore | ||
Reporter: | tootai (tootai) | Labels: | |
Date Opened: | 2007-10-08 07:34:15 | Date Closed: | 2007-10-15 08:30:39 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Resources/res_jabber |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) trunk-10913-1.diff | |
Description: | Good day, as from version trunk from yesterday we have following logs and no conenction to gtalk. Hadn't had this issue till now (last update: trunk from around one month): [Oct 8 14:40:57] VERBOSE[3995] logger.c: JABBER: googletalk INCOMING: <stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required/></starttls><mechanisms xmlns="urn:ietf:params:xml: ns:xmpp-sasl"><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features><proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/> [Oct 8 14:40:57] VERBOSE[3995] logger.c: JABBER: googletalk OUTGOING: <?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='gmail.com' version ='1.0'> [Oct 8 14:40:57] VERBOSE[3995] logger.c: JABBER: googletalk INCOMING: <?xml version="1.0" encoding="UTF-8"?><stream:stream from="gmail.com" id="37EFFCC36FEC8C8F" version="1.0" xmlns:stream="http://e therx.jabber.org/streams" xmlns="jabber:client"> [Oct 8 14:40:57] VERBOSE[3995] logger.c: JABBER: googletalk INCOMING: <stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>X-GOOGLE-TOKEN</mec hanism></mechanisms></stream:features> [Oct 8 14:40:57] VERBOSE[3995] logger.c: JABBER: googletalk OUTGOING: <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>**********************************</auth> [Oct 8 14:40:57] VERBOSE[3995] logger.c: JABBER: googletalk INCOMING: <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure> [Oct 8 14:40:57] ERROR[3995] res_jabber.c: JABBER: encryption failure. possible bad password. [Oct 8 14:40:57] VERBOSE[3995] logger.c: JABBER: googletalk INCOMING: </stream:stream> [Oct 8 14:40:57] ERROR[3995] res_jabber.c: aji_act_hook was called with out a packet [Oct 8 14:40:58] VERBOSE[3995] logger.c: JABBER: googletalk OUTGOING: <?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='gmail.com' version='1.0'> [Oct 8 14:40:58] VERBOSE[3995] logger.c: JABBER: googletalk INCOMING: <?xml version="1.0" encoding="UTF-8"?><stream:stream from="gmail.com" id="6DCA9605189AA9E9" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client"> [Oct 8 14:40:58] VERBOSE[3995] logger.c: JABBER: googletalk OUTGOING: <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/> -- Daniel | ||
Comments: | By: phsultan (phsultan) 2007-10-09 08:48:12 Daniel, the credentials are not encrypted in your console debug output, they're simply encoded (base64 form). I'll masquerade them in your initial post, but I would advice you change them, now they've been publicly posted. The <unauthorized/> tag usually means that a wrong username or password has been entered. Can you confirm you can connect with another Jabber client (GoogleTalk, PSI, Jabbin, ...) with the credentials taken from your jabber.conf file? Thanks! By: phsultan (phsultan) 2007-10-09 08:49:59 I just made a succesful connection to Google's Jabber server, using the latest SVN trunk code. By: tootai (tootai) 2007-10-09 10:02:56 Good day, I updated asterisk trunk SVN AND asterisk 1.4 SVN. I went to the google account and change the password. I then ran Kopete to connect to talk.google.com: everything is ok (as it was with the previous password). I updated a running Googletalk on a Windows machine: same, everything is OK, with previous password too. I installed 1.4 -> same errors. I reinstalled trunk -> still the errors. Sorry, but for me something is wrong ;-) What's that, can't it be the problem? Oct 9 17:19:36] ERROR[15194]: res_jabber.c:590 aji_act_hook: aji_act_hook was called with out a packet [Oct 9 17:19:36] WARNING[15194]: res_jabber.c:1667 aji_recv_loop: JABBER: Got hook event. Thanks, Daniel By: phsultan (phsultan) 2007-10-09 10:35:45 That's weird, indeed. Can you post your jabber.conf file? The error messages are a consequence of the problem. Providing Asterisk with wrong credentials yields the same console debug output on my system. By: tootai (tootai) 2007-10-09 11:37:32 Here we are. Username (before @) and secret only cached dh@keewi:~$ cat /etc/asterisk/jabber.conf [general] ;debug=yes ;;Turn on debugging by default. autoprune=yes ;;Auto remove users from buddy list. autoregister=yes ;;Auto register users from buddy list. [googletalk] ;;label type=client ;;Client or Component connection ;;serverhost=astjab.org ;;Route to server for example, ;;username=asterisk@astjab.org/asterisk ;;Username with optional roster. serverhost=talk.google.com ;; talk.google.com username=johndoe@gmail.com/Talk ;;Username with optional roster. secret=foo ;;Password port=5222 ;;Port to use defaults to 5222 usetls=yes ;;Use tls or not usesasl=yes ;;Use sasl or not ;buddy=one_address_only@gmail.com ;;Manual addition of buddy to list. statusmessage="Voice calls only" ;;Have custom status message for ;;Asterisk. timeout=100 ;;Timeout on the message stack. -- Daniel By: phsultan (phsultan) 2007-10-09 13:52:46 Mmh, that looks right. Would you allow me to login to your Asterisk server for further testing? My contact : philippe.sultanATgmail.com By: phsultan (phsultan) 2007-10-10 11:56:47 It looks like something went wrong when allocating space for the credentials. The attached patch should solve the problem, please try it out. Thanks for granting access to your system, that helped a lot. By: tootai (tootai) 2007-10-10 12:13:30 Patch applied but problem stays :-( -- Daniel By: tootai (tootai) 2007-10-11 11:49:39 Philippe, I stop Asterisk, refresh res_jabber with your patch, compile, reinstall and finally start again Asterisk. Now everything looks fine and I'm again registered. Problem is solved. Many thanks for your help -- Daniel By: phsultan (phsultan) 2007-10-12 11:48:05 Glad to read that! Daniel, can you please confirm that Asterisk 1.4 SVN is affected too? The corresponding code in 1.4 was not modified recently, so it looks to me that this branch works ok. Have a nice week end. By: tootai (tootai) 2007-10-14 12:29:06 Philippe, sorry for late reply, I'm far from office. I tested with 1.4 SVN when problem appears in trunk and had the same error. For me 1.4 is also affected but I can't certify it by a new test as I'm not in office and will be back in only about 4 weeks time. If you want to let the bug open until I confirm/infirm ... -- Daniel By: Digium Subversion (svnbot) 2007-10-15 08:30:39 Repository: asterisk Revision: 85551 U trunk/res/res_jabber.c ------------------------------------------------------------------------ r85551 | phsultan | 2007-10-15 08:30:39 -0500 (Mon, 15 Oct 2007) | 5 lines Allocate more space for the base64 output we need to generate. Closes issue ASTERISK-10470, reported by tootai, who graciously granted us access to his Asterisk server, thanks! Daniel, feel free to reopen the bug in case you can reproduce this on 1.4. ------------------------------------------------------------------------ |