无法使用Pidgin连接到Google Talk(SASL错误)

在全新安装Ubuntu 11.10后,Pidgin停止连接任何Jabber服务(Google Talk和本地IM)。 奇怪的是,相同的配置适用于使用Ubuntu 11.10的笔记本电脑,但不适用于工作站。 .purple目录已从笔记本电脑复制到工作站,但仍然无效。 运行piding -d > pidgin.log ,会发现以下情况:

 (16:06:25) account: Connecting to account foo@gmail.com/. (16:06:25) connection: Connecting. gc = 0x7f38e3828ea0 (16:06:25) dnssrv: querying SRV record for gmail.com: _xmpp-client._tcp.gmail.com (16:06:25) dnssrv: found 5 SRV entries (16:06:25) dnsquery: Performing DNS lookup for xmpp.l.google.com (16:06:25) dns: Wait for DNS child 11596 failed: No child processes (16:06:25) dns: Created new DNS child 11867, there are now 1 children. (16:06:25) dns: Successfully sent DNS request to child 11867 (16:06:25) dns: Got response for 'xmpp.l.google.com' (16:06:25) dnsquery: IP resolved for xmpp.l.google.com (16:06:25) proxy: Attempting connection to 173.194.70.125 (16:06:25) proxy: Connecting to xmpp.l.google.com:5222 with no proxy (16:06:25) proxy: Connection in progress (16:06:25) proxy: Connecting to xmpp.l.google.com:5222. (16:06:25) proxy: Connected to xmpp.l.google.com:5222. (16:06:25) jabber: Sending (foo@gmail.com):  (16:06:25) jabber: Sending (foo@gmail.com):  (16:06:25) jabber: Recv (379): X-GOOGLE-TOKENX-OAUTH2 (16:06:25) jabber: Sending (foo@gmail.com):  (16:06:25) jabber: Recv (50):  (16:06:25) nss: subject=CN=gmail.com,O=Google Inc.,L=Mountain View,ST=California,C=US issuer=CN=Google Internet Authority,O=Google Inc,C=US (16:06:25) nss: subject=CN=Google Internet Authority,O=Google Inc,C=US issuer=OU=Equifax Secure Certificate Authority,O=Equifax,C=US (16:06:25) nss: subject=OU=Equifax Secure Certificate Authority,O=Equifax,C=US issuer=OU=Equifax Secure Certificate Authority,O=Equifax,C=US (16:06:25) certificate/x509/tls_cached: Starting verify for gmail.com (16:06:25) certificate/x509/tls_cached: Checking for cached cert... (16:06:25) certificate/x509/tls_cached: ...Found cached cert (16:06:25) nss/x509: Loading certificate from /home/david/.purple/certificates/x509/tls_peers/gmail.com (16:06:25) certificate/x509/tls_cached: Peer cert matched cached (16:06:25) nss/x509: Exporting certificate to /home/david/.purple/certificates/x509/tls_peers/gmail.com (16:06:25) util: Writing file /home/david/.purple/certificates/x509/tls_peers/gmail.com (16:06:25) certificate: Successfully verified certificate for gmail.com (16:06:25) jabber: Sending (ssl) (foo@gmail.com):  (16:06:25) jabber: Recv (ssl)(138):  (16:06:25) jabber: Recv (ssl)(197): PLAINX-GOOGLE-TOKENX-OAUTH2 (16:06:25) sasl: sasl_state is -1, failing the mech and trying again (16:06:25) connection: Connection error on 0x7f38e3828ea0 (reason: 3 description: Server does not use any supported authentication method) (16:06:25) account: Disconnecting account foo@gmail.com/ (0x7f38e2ca5b50) (16:06:25) connection: Disconnecting connection 0x7f38e3828ea0 (16:06:25) jabber: Sending (ssl) (foo@gmail.com):  (16:06:25) connection: Destroying connection 0x7f38e3828ea0 

如您所见,证书似乎是有效的,问题是:

 sasl: sasl_state is -1, failing the mech and trying again 

没有启用防火墙,所以必须有其他东西。 有任何想法吗?

由于某种原因, /etc/hosts包含错误的127.0.0.1主机名。 修改后,它开始工作。 希望帮助某人:)

在/ etc / hostname中检查系统的主机名。 然后在/ etc / hosts文件中修改它。 这将解决您的问题:-)

我在Ubuntu 12.04中遇到了同样的问题。 当我看到之前的评论时,我检查了/etc/hosts ,它是空白的。 所以,我添加了以下内容:

 127.0.0.1 localhost 127.0.1.1 ubuntu 

这就是现在的样子:

 root@ubuntu:/etc/apt/apt.conf.d# cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 ubuntu 

然后

 root@ubuntu:/etc/apt/apt.conf.d# /etc/init.d/networking restart * Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces * Reconfiguring network interfaces... 

退出Pidgin并再次打开它。 瞧它现在就像魅力一样。 希望它也能帮助别人。

我遇到过同样的问题。 事实certificate我已在我的Google帐户上启用了两步validation。 我只是去了我的应用程序专用密码设置(在Google中)并撤销了对Pidgin的访问权限。 然后我添加了Pidgin并生成了一个新的应用程序专用密码,将其输入Pidgin中的我的Google Talk帐户设置,现在一切正常。