Can't get Pidgin to connect to GTalk

Asked by BryanGunn

I'm trying to get Pidgin to work on Ubuntu 8.10 and I cannot get it to connect to any of my existing IM accounts, but let's start with the one I care about most - Google Talk.

I have a Gmail account already, and I use Google Talk almost every day on other machines. On the same home network as my Ubuntu machine, I have a Windows machine and GTalk runs on the Windows machine just fine. On the Ubuntu machine, I can use the Firefox browser and can ping talk.google.com from the command line.

I installed Pidgin 2.5.2 which the Synaptic Package Manager (System -> Administration -> Synaptic Package Manager) shows as the latest version.

I launched Pidgin and entered all of my account information for my GTalk account:
Protocol: XMPP
Username: <my Gmail username>
Domain: gmail.com
Resource: Home
Password: <my Gmail password>
Remember password: checked

I left the rest of the settings as default.

When Pidgin tries to connect to my GTalk account, it fails with a "Connection Timed Out" message.

After much Googling around, I found several recommendations about changing the settings on the Advanced tab of the "Modify Account" dialog, such as changing the connection port from the default of 5222 to 5223, entering "talk.google.com" for the "Connect Server" parameter, forcing old (Port 5223) SSL, etc. None of these settings made any difference. I also tried several Proxy types on the Advanced tab: "Use GNOME Proxy Settings (default)", "No proxy", and "Use environmental settings". Again, no combination of any of these resulted in different behavior.

Log output (I removed my Gmail username):
(19:24:50) account: Connecting to account <my Gmail username>@gmail.com/Home
(19:24:50) connection: Connecting. gc = 0x92347b0
(19:24:50) dns: DNS query for 'talk.google.com' queued
(19:24:50) Session Management: Received first save_yourself
(19:24:50) dns: Created new DNS child 25884, there are now 1 children.
(19:24:50) dns: Successfully sent DNS request to child 25884
(19:24:50) Session Management: Received save_complete
(19:24:50) docklet: embedded
(19:24:50) dns: Got response for 'talk.google.com'
(19:24:50) dnsquery: IP resolved for talk.google.com
(19:24:50) proxy: Attempting connection to 209.85.201.125
(19:24:50) proxy: Connecting to talk.google.com:5223 with no proxy
(19:24:50) proxy: Connection in progress
(19:24:54) util: Writing file prefs.xml to directory /home/bgunn/.purple
(19:24:54) util: Writing file /home/bgunn/.purple/prefs.xml
(19:24:55) util: Writing file accounts.xml to directory /home/bgunn/.purple
(19:24:55) util: Writing file /home/bgunn/.purple/accounts.xml
(19:24:55) util: Writing file blist.xml to directory /home/bgunn/.purple
(19:24:55) util: Writing file /home/bgunn/.purple/blist.xml
(19:27:59) proxy: Connected to talk.google.com:5223.
(19:27:59) proxy: Error connecting to talk.google.com:5223 (Connection timed out).
(19:27:59) proxy: Connection attempt failed: Connection timed out
(19:27:59) account: Disconnecting account 0x8a9a280
(19:27:59) connection: Disconnecting connection 0x92347b0
(19:27:59) connection: Destroying connection 0x92347b0

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu pidgin Edit question
Assignee:
No assignee Edit question
Solved by:
BryanGunn
Solved:
Last query:
Last reply:
Revision history for this message
Andy Ruddock (andy-ruddock) said :
#1

You're possibly behind a firewall.
Open pidgin and select Accounts -> <your_gmail_account> -> Edit account
In the Advanced tab, change the "Connect port" from 5222 to 80.
Save.

Revision history for this message
BryanGunn (bryan-gunn) said :
#2

Thanks to a clue from Andy, I believe I am a few steps closer to solving this issue.

I am definitely behind a firewall. I have a firewall running on my router/cable modem. I experimented with its settings and by shutting the firewall off entirely, Pidgin connected to GTalk. However, even with the firewall on its "Low" (out of Low, Medium, and High) security profile, GTalk will no longer connect.

So I think we can conclude that the firewall is blocking GTalk. Since I'm in control of the firewall policy, I Googled around again and found a recommendation to add port 5050 to the firewall (TCP protocol, allow outbound), but this didn't help.

I thinkn one of the following two approaches should work:

1. Adjust Pidgin to work with my existing firewall settings.
2. Change the firewall policy to allow Pidgin to work

I'm fine with either approach if I could get a somewhat definitive recommendation as to either how to configure Pidgin (2.5.2 on Ubuntu 8.10) with a firewall or what firewall settings Pidgin needs in order to work.

Here's the latest Pidgin log with the account configured for port 80.

11:38:17) account: Connecting to account <email address hidden>/Home
(11:38:17) connection: Connecting. gc = 0xa2a4700
(11:38:17) dns: DNS query for 'gmail.com' queued
(11:38:17) dns: Created new DNS child 8849, there are now 1 children.
(11:38:17) dns: Successfully sent DNS request to child 8849
(11:38:17) dns: Got response for 'gmail.com'
(11:38:17) dnsquery: IP resolved for gmail.com
(11:38:17) proxy: Attempting connection to 209.85.171.83
(11:38:17) proxy: Connecting to gmail.com:80 with no proxy
(11:38:17) proxy: Connection in progress
(11:38:17) proxy: Connected to gmail.com:80.
(11:38:22) util: Writing file accounts.xml to directory /home/bgunn/.purple
(11:38:22) util: Writing file /home/bgunn/.purple/accounts.xml
(11:39:17) nss: Handshake failed (-5938)
(11:39:17) account: Disconnecting account 0x9ad5b40
(11:39:17) connection: Disconnecting connection 0xa2a4700
(11:39:17) connection: Destroying connection 0xa2a4700

I noticed that if I try port 443, I get different results:

(11:32:54) account: Connecting to account <my Gmail username>@gmail.com/Home
(11:32:54) connection: Connecting. gc = 0x8dd3cc8
(11:32:54) dns: DNS query for 'gmail.com' queued
(11:32:54) dns: Wait for DNS child 8748 failed: No child processes
(11:32:54) dns: Created new DNS child 8766, there are now 1 children.
(11:32:54) dns: Successfully sent DNS request to child 8766
(11:32:54) dns: Got response for 'gmail.com'
(11:32:54) dnsquery: IP resolved for gmail.com
(11:32:54) proxy: Attempting connection to 74.125.79.83
(11:32:54) proxy: Connecting to gmail.com:443 with no proxy
(11:32:54) proxy: Connection in progress
(11:32:55) proxy: Connected to gmail.com:443.
(11:32:55) nss: subject=CN=mail.google.com,O=Google Inc,L=Mountain View,ST=California,C=US issuer=CN=Thawte SGC CA,O=Thawte Consulting (Pty) Ltd.,C=ZA
(11:32:55) nss: subject=CN=Thawte SGC CA,O=Thawte Consulting (Pty) Ltd.,C=ZA issuer=OU=Class 3 Public Primary Certification Authority,O="VeriSign, Inc.",C=US
(11:32:55) nss: subject=OU=Class 3 Public Primary Certification Authority,O="VeriSign, Inc.",C=US issuer=OU=Class 3 Public Primary Certification Authority,O="VeriSign, Inc.",C=US
(11:32:55) certificate/x509/tls_cached: Starting verify for gmail.com
(11:32:55) certificate/x509/tls_cached: Checking for cached cert...
(11:32:55) certificate/x509/tls_cached: ...Found cached cert
(11:32:55) nss/x509: Loading certificate from /home/bgunn/.purple/certificates/x509/tls_peers/gmail.com
(11:32:55) certificate/x509/tls_cached: Peer cert matched cached
(11:32:55) certificate: Successfully verified certificate for gmail.com
(11:32:55) jabber: Sending (ssl): <?xml version='1.0' ?>
(11:32:55) jabber: Sending (ssl): <stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
(11:32:59) util: Writing file accounts.xml to directory /home/bgunn/.purple
(11:32:59) util: Writing file /home/bgunn/.purple/accounts.xml
(11:33:55) jabber: Server closed the connection.
(11:33:55) jabber: Server closed the connection.
(11:33:55) account: Disconnecting account 0x8c86b40
(11:33:55) connection: Disconnecting connection 0x8dd3cc8
(11:33:55) connection: Destroying connection 0x8dd3cc8

Revision history for this message
Andy Ruddock (andy-ruddock) said :
#3

443 is the port reserved for SSL (encrypted) http - so what you're seeing there is the transfer of certificate details to enable the traffic to be encrypted.

What router do you have?

What happens if you rename/remove your .purple directory and try setting the account up anew?

(Stab in the dark - you're not entering the '@gmail.com' part of your email address in the username box?)

Revision history for this message
BryanGunn (bryan-gunn) said :
#4

The prize goes to Andy. I moved my .purple directory and set the GTalk account up again from scratch. Same exact settings as before (all defaults). Didn't change any firewall settings. And now it works.

I'm going to add my other IM accounts one at a time now and see how it goes...hopefully this is solved now.

Thanks Andy.

Revision history for this message
lhs2miler (billy-bylund) said :
#5

I'm having the same problem in Jaunty, but I'm a linux newbee and don't know how to display the output of pigeon like that above. I do have a /etc/purple/prefs.xml file, but no accounts.xml. Any advice?

Revision history for this message
lhs2miler (billy-bylund) said :
#6

I tried removing my .purple folder and it still didn't help....

Revision history for this message
Duncan Lithgow (duncan-lithgow) said :
#7

bug #293380 might have the solution for you.

"I could log-in to gmail after adding "talk.google.com" in "connect server" field in advanced tab!
so, the report may be modified to "talk.google.com" isn't added by default!!"

Revision history for this message
shail (shail) said :
#8

 I am on jaunty and could not get pidgin work for GTalk.
 i created google account with following settings:

 Under basic tab:

 Protocol: XMPP
Username: <user name>(without @gmail.com)
Domain: gmail.com
Resource : home
Passward: **********
Remember password : checked

Advance settings:

  connect port : 5222
file transfer proxies: proxy.jabber.org
proxy type: use GNOME proxy settings
  all the other fields left blank.

  On connecting error message is displayed:

     <username>@gmail.com/home Disconnected

   I tried it again by setting connect server field in advance tab to talk.google.com

   but its does'nt work well for me.

 any sugesstions?

Revision history for this message
Andy Ruddock (andy-ruddock) said :
#9

You should really ask a new questions rather than tack on to the end of a finished one, but here goes.

My settings are pretty much the same as yours, the "Connect server" should be talk.google.com
My "File transfer proxy" is set to proxy.jabber.org:7777 (note the port number)

Do you have a proxy set up in Gnome? What happens if you set the "Proxy type" to "no proxy"?

Revision history for this message
shail (shail) said :
#10

  Thanks for replying Andy!

 I made some changes in settings under advance tab.

  connect port : 80
  connect server: talk.google.com

 it works well now.