s2s connection issue

Hello,

I have a very recent ejabberd install, using the version 2.0.0-rc1 build acquired about a week ago off of the commercial site. This is my first experience with Jabber/ejabberd, but I've been programming in the internet world for over a decade now and am pretty comfortable with the lower-level stuff. It installed fine and everything seemed to be working until I tried to enable s2s support.

I have tried all the following after MUCH trolling the these forums looking for suggestions and fruitless google searching:

  • added -kernel inetrc "/path/to/file" to start-up script, as I am not using the SVN codebase.
  • executed the Erlang command: inet_res:getbyname("_xmpp-server._tcp.gmail.com",srv). to confirm that DNS SRV records are resolving properly on my machine, which they seem to be (see logs later in post).
  • when I make the same Erlang command on different off-network server to my specific domain name I get a successful DNS SRV response.
  • confirmed via tcpdump 5222, 5223 and 5269 (TCP) are all open to the world
  • telnetting to port 5269 works and returns an XML error packet, as I don't natively speak XMPP :)
  • tried with s2s_use_starttls in .cfg file set to true and false, neither seem to work.
  • generated a new server.pem keyfile as per instructions found in the ejabberd install guide
  • confirmed that the s2s_default_policy is set to 'allow', with no special cases denying specific servers

I usually don't like to post on forums and bother people with my problems, but I've tried everything I can think of, and all suggestions I've been able to find online to solve the s2s issues I'm having, and I haven't been able to get it to work.

Here is a copy of the debug log from a "request auth" attempt from a gmail account to my server. If anyone could have a look at it and possibly suggest another course of action to get s2s functional, I'd really appreciate it. Thanks in advance.

(Note: I have unfortunately had to hide my actual server name and IP address in these logs for privacy reasons for now... I've replaced them with 'myservername.com' and a masked IP address of XXX.XXX.XXX.XXX in all instances, but be aware that that is not the actual domain I'm dealing with here. If it becomes critical to expose that to get the issue solved, I can arrange that in a further posting.)

=INFO REPORT==== 2008-01-25 23:40:38 ===
I(<0.251.0>:ejabberd_listener:112) : (#Port<0.402>) Accepted connection {{72,14,252,129},12505} -> {{XXX,XXX,XXX,XXX},5269}

=INFO REPORT==== 2008-01-25 23:40:38 ===
D(<0.354.0>:ejabberd_s2s_in:138) : started: {ejabberd_socket,
                                             {socket_state,
                                              gen_tcp,
                                              #Port<0.402>,
                                              <0.353.0>}}

=INFO REPORT==== 2008-01-25 23:40:38 ===
D(<0.354.0>:ejabberd_s2s_in:549) : terminated: normal

=INFO REPORT==== 2008-01-25 23:40:38 ===
I(<0.251.0>:ejabberd_listener:112) : (#Port<0.404>) Accepted connection {{72,14,252,129},12506} -> {{XXX,XXX,XXX,XXX},5269}

=INFO REPORT==== 2008-01-25 23:40:38 ===
D(<0.356.0>:ejabberd_s2s_in:138) : started: {ejabberd_socket,
                                             {socket_state,
                                              gen_tcp,
                                              #Port<0.404>,
                                              <0.355.0>}}

=INFO REPORT==== 2008-01-25 23:40:38 ===
D(<0.355.0>:ejabberd_receiver:297) : Received XML on stream = "<stream:stream id=\"13B331A9216B9590\" xmlns:stream=\"http://etherx.jabber.org/streams\" xmlns=\"jabber:server\" xmlns:db=\"jabber:server:dialback\">"

=INFO REPORT==== 2008-01-25 23:40:38 ===
D(<0.355.0>:ejabberd_receiver:297) : Received XML on stream = "<db:result to=\"myservername.com\" from=\"gmail.com\">CAESBxCLyrmh+yIaEGhcA88nFqbCEfwbvOXXUiI=</db:result>"

=INFO REPORT==== 2008-01-25 23:40:38 ===
D(<0.356.0>:ejabberd_s2s_in:343) : GET KEY: {"myservername.com",
                                             "gmail.com",
                                             [],
                                             "CAESBxCLyrmh+yIaEGhcA88nFqbCEfwbvOXXUiI="}

=INFO REPORT==== 2008-01-25 23:40:38 ===
D(<0.357.0>:ejabberd_s2s_out:144) : started: {"myservername.com",
                                              "gmail.com",
                                              {verify,
                                               <0.356.0>,
                                               "CAESBxCLyrmh+yIaEGhcA88nFqbCEfwbvOXXUiI=",
                                               "890145589"}}

=INFO REPORT==== 2008-01-25 23:40:38 ===
D(<0.357.0>:ejabberd_s2s_out:186) : open_socket: {"myservername.com",
                                                  "gmail.com",
                                                  false,
                                                  {<0.356.0>,
                                                   "CAESBxCLyrmh+yIaEGhcA88nFqbCEfwbvOXXUiI=",
                                                   "890145589"}}

=INFO REPORT==== 2008-01-25 23:40:38 ===
D(<0.357.0>:ejabberd_s2s_out:928) : srv lookup of 'gmail.com': [{20,
                                                                 0,
                                                                 5269,
                                                                 "xmpp-server2.l.google.com"},
                                                                {20,
                                                                 0,
                                                                 5269,
                                                                 "xmpp-server3.l.google.com"},
                                                                {20,
                                                                 0,
                                                                 5269,
                                                                 "xmpp-server4.l.google.com"},
                                                                {5,
                                                                 0,
                                                                 5269,
                                                                 "xmpp-server.l.google.com"},
                                                                {20,
                                                                 0,
                                                                 5269,
                                                                 "xmpp-server1.l.google.com"}]

=INFO REPORT==== 2008-01-25 23:40:38 ===
D(<0.357.0>:ejabberd_s2s_out:953) : srv lookup of 'gmail.com': [{"xmpp-server.l.google.com",
                                                                 5269},
                                                                {"xmpp-server2.l.google.com",
                                                                 5269},
                                                                {"xmpp-server3.l.google.com",
                                                                 5269},
                                                                {"xmpp-server4.l.google.com",
                                                                 5269},
                                                                {"xmpp-server1.l.google.com",
                                                                 5269}]

=INFO REPORT==== 2008-01-25 23:40:38 ===
D(<0.357.0>:ejabberd_s2s_out:236) : s2s_out: connecting to xmpp-server.l.google.com:5269

***====== server sits and times out for a few mins all the time at this point ======***

=INFO REPORT==== 2008-01-25 23:42:21 ===
D(<0.337.0>:ejabberd_s2s_out:243) : s2s_out: connect return etimedout

=INFO REPORT==== 2008-01-25 23:42:21 ===
D(<0.337.0>:ejabberd_s2s_out:259) : s2s_out: inet6 connect return nxdomain

=INFO REPORT==== 2008-01-25 23:42:21 ===
D(<0.337.0>:ejabberd_s2s_out:236) : s2s_out: connecting to xmpp-server1.l.google.com:5269

And at this point, it just tries to make the connection about 3 more times, returning the 'etimedout' and wierd inet6 connect messages.... and then it spits out this log message:

=INFO REPORT==== 2008-01-25 23:45:30 ===
I(<0.337.0>:ejabberd_s2s_out:218) : s2s connection: myservername.com -> gmail.com (remote server not found)

Eventually it reaches its retry delay and the whole thing starts over again:

=INFO REPORT==== 2008-01-25 23:50:30 ===
I(<0.337.0>:ejabberd_s2s_out:757) : Reconnect delay expired: Will now retry to connect to gmail.com when needed.

=INFO REPORT==== 2008-01-25 23:50:30 ===
D(<0.337.0>:ejabberd_s2s_out:774) : terminated: {normal,wait_before_retry}

If there's any other info I can provide that would be of use, just let me know.

Thanks again!

P.S. One last thing... this doesn't seem to be exclusive to gmail.com either. I've tried it with accounts on jabber.org and jabber80.org as well, and I get the same response.

Are outbound connection to

Are outbound connection to port 5269 closed by a firewall? Try to

telnet xmpp-server.l.google.com 5269

It seems to me that it will fail.

You're correct. The telnet

You're correct. The telnet command refuses to connect, both using IP and domain name. I will have to investigate further upstream firewalling I guess. Thanks for the help!

Follow-up

Just to follow-up, I checked with the firewall admins and sure enough, outbound 5269 was being blocked afterall. It's opened now and handshaking is working. Thanks again for your help. Sometimes you just get so bogged down in the technical things, you overlook the obvious :)

Cheers!

No s2s connection found in

No s2s connection found in ejabberd android for usersearchManager return 503 in android App.

I'm recent to ejabberd android. I can send and receive the messages successfully but I m not able to search user details using UserSearchManager in android it returns 503 error always.my code is below:

//mConnection in XMPP Connection Object
UserSearchManager usm = new UserSearchManager(mConnection);
List services = usm.getSearchServices();
//usm.gersearchservice() size always 0
//if (services == null || services.size() < 1)
for (String service: services) {
Log.e("SERVICE", service);
}
Form searchForm = usm.getSearchForm("service."+mConnection.getServiceName());
Form answerForm = searchForm.createAnswerForm();
answerForm.setAnswer("Username", true);
answerForm.setAnswer("search", "ashok25");
ReportedData data = null;
data = usm.getSearchResults(answerForm, mConnection.getServiceName());
Iterator it = (Iterator) data.getRows();

Result:
D/SMACK: SENT (0):
D/SMACK: RECV (0): No s2s connection found

Syndicate content