s2s stop work after upgrade to ejabberd 2.1-RC2

Gentoo Linux x86, compiled from experimental ebuild

in ejabberd.log i see many messages like

=INFO REPORT==== 2009-10-21 23:24:15 ===
I(<0.431.0>:ejabberd_s2s:368) : New s2s connection started <0.435.0>

=INFO REPORT==== 2009-10-21 23:24:15 ===
I(<0.435.0>:ejabberd_s2s_out:1140) : Trying to open s2s connection: evadim.ru -> jabber.org

=INFO REPORT==== 2009-10-21 23:24:16 ===
I(<0.435.0>:ejabberd_s2s_out:227) : s2s connection: evadim.ru -> jabber.org (remote server not found)

=INFO REPORT==== 2009-10-21 23:24:28 ===
I(<0.435.0>:ejabberd_s2s_out:834) : Reconnect delay expired: Will now retry to connect to jabber.org when needed.

inetrc:

{lookup,["file","native"]}.
{host,{127,0,0,1}, ["localhost","evadim.ru"]}.
{file, resolv, "/etc/jabber/resolv.conf.jabber"}.

resolv.conf.jabber

nameserver 208.67.222.222
nameserver 208.67.220.220

from ejabberd.conf

  {5269, ejabberd_s2s_in, [
                           {shaper, s2s_shaper},
                           {max_stanza_size, 131072}
                          ]},

{s2s_use_starttls, true}.

{s2s_certfile, "/etc/jabber/ejabberd.pem"}.

{s2s_default_policy, allow}.

{outgoing_s2s_options, [ipv4, ipv6], 10000}.

{access, s2s_shaper, [{fast, all}]}.

/bin/busybox nslookup www.google.ru 208.67.220.220
Server:    208.67.220.220
Address 1: 208.67.220.220 resolver2.opendns.com

Name:      www.google.ru
Address 1: 66.102.9.99 lm-in-f99.1e100.net
Address 2: 66.102.9.104 lm-in-f104.1e100.net
Address 3: 66.102.9.103 lm-in-f103.1e100.net
Address 4: 66.102.9.147 lm-in-f147.1e100.net
Address 5: 66.102.9.105 lm-in-f105.1e100.net

any ideas ?

downgrade to RC1 solve this

downgrade to RC1 solve this issue

Try this small fix

I found the problem. It affects s2s out connections in ejabberd 2.1.0-rc2 when using Erlang/OTP R12 or older.

You can fix easily, only need to remove one line:

--- src/ejabberd_s2s_out.erl
+++ src/ejabberd_s2s_out.erl
@@ -272,7 +272,6 @@ open_socket2(Type, Addr, Port) ->
     case (catch ejabberd_socket:connect(Addr, Port,
                                        [binary, {packet, 0},
                                         {send_timeout, ?TCP_SEND_TIMEOUT},
-                                         {send_timeout_close, true},
                                         {active, false}, Type | SockOpts],
                                        Timeout)) of
        {ok, _Socket} = R -> R;

If you install rc2 again and you try this solution, please tell me if that solves the problem.

thaks!

s2s work now. If ejabberd compiled with "new" version Erlang/OTP it work without this patch ? Any "side effects" of this patch ?

> Any "side effects" of this

> Any "side effects" of this patch ?

No. This patch doesn't have bad effects. If S2S works well for you, you can continue until new version is published.

> If ejabberd compiled with "new" version Erlang/OTP it work without this patch ?

Right. You can have:

  • ejabberd 2.1.0-rc2 + patch, compiled with Erlang/OTP R12B-5 or older
  • ejabberd 2.1.0-rc2, compiled with Erlang/OTP R13B or newer
Syndicate content