Unable to connect to google contacts

Just installed Wildfire, and have hit a snag. I am able to log into my server, add a gateway (MSN), and communicate with contacts via that gateway. However, when I try to add a google contact, I fail to have any contact – and when I add my wildfire account as a contact, I see the same behavior – no status, no messages passed.

I have confirmed that my s2s port (standard) is open, that s2s allows everyone to connect, and that I can actually connect to google via talk.google.com on the s2s port. I have also verified that I can connect to my wildfire server on the s2s port from a location outside of my local network.

The only clue so far is in the debug log, which showed:

2006.10.13 02:03:35 OS - Trying to connect to gmail.com:5269(DNS lookup: gmail.com:5269)

– So for some reason, it is trying to connect to gmail.com instead of talk.google.com – the contact I added is my gmail account (benwern @ gmail.com). Should I have specified this differently? Is there something basic that I have missed?

Thanks for any help,

Ben Wern

Hi Ben,

Looks like you’‘ve done all the necessary steps except maybe to configure your DNS so that when google try to resolve your Wildfire xmpp.domain, it will get the correct ip address. Before an S2S with google is established, google will attempt a dialback to your server. It needs to be able to resolve your server’'s ip address via DNS.

You don’‘t have to worry about gmail.com or talk.gmail.com. That’'s just how google wants its DNS to resolve gmail.com SRV record for port 5269.

2006.10.13 02:03:35 OS - Trying to connect to gmail.com:5269(DNS lookup: gmail.com:5269)

What are the next few lines after the line above? Is it something like fail verification?

The next few lines are:

2006.10.13 02:03:55 Error sending packet to remote server:

java.lang.Exception: Failed to create connection to remote server

at org.jivesoftware.wildfire.server.OutgoingSessionPromise.createSessionAndSendPac ket(OutgoingSessionPromise.java:143)

at org.jivesoftware.wildfire.server.OutgoingSessionPromise.access$300(OutgoingSess ionPromise.java:40)

at org.jivesoftware.wildfire.server.OutgoingSessionPromise$1$1.run(OutgoingSession Promise.java:95)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Which I can confirm - if I try to connect to google.com on the S2S port, I get a connection refused. However, if I manually connect to talk.google.com… I connect.

My own server is in DNS, both as charon.enmesh.net (the server name), and with the SVR records…

Thanks!

Which I can confirm - if I try to connect to google.com on the S2S port, I get a connection refused.

What method did you use to test? It wouldn’‘t work if you do “telnet google.com 5269” because “dig -t a google.com” returns ip addresses that don’'t run any s2s server. If you use telnet, you have to telnet to the hosts return by “dig -t srv xmpp-server.tcp.google.com”. Those are the hosts that run s2s server. BTW, xmpp-server SRV records are similar for both google.com and gmail.com.

However, if I manually connect to talk.google.com… I connect.

My test showed that telnet talk.google.com works on port 5222 and 5223, but not on 5269. I guess talk.google.com is not used for s2s at all. In fact, “dig -t srv xmpp-server.tcp.gmail.com” doesn’'t return talk.google.com as one of the s2s hosts.

My own server is in DNS, both as charon.enmesh.net (the server name), and with the SVR records…

Yep, I could verify that using “dig -t srv xmpp-server.tcp.charon.enmesh.net”.

I’'m not really sure what the problem is here. What version of Wildfire are you using? BTW, I wonder if you get the same result if you simulate the test with other jabber servers. Try to use jabber.org instead. Just to eliminate the firewall issue that you might have overlooked.

Wildfire 3.1.0, freshly installed. I’'m logging into my accounts with Psi.

With the account on my local wildfire system, I can add contacts and IM with jabber.org, as well as use the gateway for MSN (the AOL one seems to crash the Wildfire server for some reason.) I can also add users on other servers, including my gmail.com address, and chat with them. I am not able to perform service discoveries to talk.google.com, google.com, or gmail.com.

From my gmail.com GTalk address, I am able to add contacts with other domains, including jabber.org and IM with them. I’'m able to perform service discoveries to jabber.org. However, I am not able to perform a service discovery to charon.enmesh.net. I am also able to send messages to my account on charon.enmesh.net, but my online status does not propagate - I show as offline.

I get the same behavior from my Google for Domains hosted GTalk account.

So, this does point to either something being wrong with my SVR record (which you could see), or a firewall issue (but I could connect to my server directly via an outside network.) So I’'m still pretty lost; the inability to show presence information or service browse seems to point to the port or SVR record, but the dig and ability to directly telnet to the S2S port appear to contradict that…

Hey Ben,

Could you post the entire relevant section of your debug.log while trying to connect to the remote server? That section contains entries that start with OS, AS and RS.

Regards,

– Gato

Here is the output in diag.log when trying to do a service discovery to gmail.com. Attempting to do a service discovery FROM my Google Talk account to the Wildfire server (via Psi client logged into GTalk) fails nearly instantly, and does not appear to generate debug entries.

charon:/opt/wildfire/logs # cat debug.log

2006.10.16 23:35:12 OS - Trying to connect to gmail.com:5269(DNS lookup: gmail.com:5269)

2006.10.16 23:35:32 Error sending packet to remote server:

java.lang.Exception: Failed to create connection to remote server

at org.jivesoftware.wildfire.server.OutgoingSessionPromise.createSessionAndSendPac ket(OutgoingSessionPromise.java:143)

at org.jivesoftware.wildfire.server.OutgoingSessionPromise.access$300(OutgoingSess ionPromise.java:40)

at org.jivesoftware.wildfire.server.OutgoingSessionPromise$1$1.run(OutgoingSession Promise.java:95)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Using gmail.com I have actually gotten a little farther than you on this. I can actually get dialback success, but when I send dialback key, it gives Time out waiting on Message validation. I have heard the you gotta have SRV records in your External DNS entries… is this true, and can someone provide an example? I am really close I just know it, but this is starting to turn hair grey for me…

I have a NAT’'d address to the outside world with the port being forwarded on to the inside address. THis wouldn;t cause what I described above would it?

I cannot add either a gmail address and get a prompt on the outside nor a internal server.domainname.com

Jeff

Anyone have an idea on this… I still think it is SRV issues…anyone concurr or challenge that idea?

Jeff

Hi Jeff,

I’‘m not sure if google implements A record lookup as a fallback when SRV fails. If it doesn’‘t then SRV on your side is required. If you’'re using BIND, an SRV record looks like:

xmpp-server.tcp.your.xmpp.domain. 86400 IN SRV 20 0 5269 your.xmpp.server.

Of course, your.xmpp.server then must resolve to the IP address of your Wildfire.

I don’‘t suppose using NAT is not workable. However, you’‘ll have to make sure that you don’'t have a firewall blocking access from external server to port 5269. If you already have an SRV setup accordingly, my guess of the cause of the timeout would be the firewall.

Hope that helps.