Strange error for some hosts

We operate a ejabberd server for a long time now. Recently, users complained about being unable to communicate with users on some external jabber servers.

The following Log file enty describes the problem. I don't really get what's about this one.
All affected domains have in common that they do not have SRV records in place but an A record for the jabber domain.
AFAIK, this should also be a valid configuration.

It's ejabberd 2.1.5 on Erlang R13B04 (erts-5.7.5).
The DNS Server on the affected host is working and does resolve those domains.

=INFO REPORT==== 2010-12-24 05:13:15 ===
I(<0.9100.0>:ejabberd_s2s_out:1158) : Trying to open s2s connection: schokokeks.org -> die-informatiker.eu with TLS=true

=ERROR REPORT==== 2010-12-24 05:13:15 ===
** State machine <0.9100.0> terminating
** Last event in was init
** When State == open_socket
** Data == {state,undefined,undefined,true,true,false,false,
[{certfile,"/etc/ssl/private/schokokeks.org.pem"},
connect],
false,true,true,"schokokeks.org",
"die-informatiker.eu",
{[],[]},
undefined_delay,"915449794",false,#Ref<0.0.0.55251>}
** Reason for termination =
** {function_clause,[{inet_dns,encode_labels,
[<<0,135,1,0,0,1,0,0,0,0,0,0,12,95,120,109,112,
112,45,115,101,114,118,101,114,4,95,116,99,
112,16,100,105,101,45,105,110,102,111,114,
109,97,116,105,107,101,114,2,101,117>>,
{4,
{[<<"_xmpp-server">>,<<"_tcp">>,
<<"die-informatiker">>,<<"eu">>,<<>>],
12,
{[<<"_tcp">>,<<"die-informatiker">>,
<<"eu">>,<<>>],
25,nil,nil},
{[<<"die-informatiker">>,<<"eu">>,<<>>],
30,nil,
{[<<"eu">>,<<>>],47,nil,nil}}}},
50,
[<<>>]]},
{inet_dns,encode_name,4},
{inet_dns,encode_query_section,3},
{inet_dns,encode,1},
{inet_res,make_query,5},
{inet_res,make_query,4},
{inet_res,res_query,6},
{inet_res,res_getby_query,4}]}

If you look at the error

If you look at the error report, the DNS query is [<<"_xmpp-server">>,<<"_tcp">>,<<"die-informatiker">>,<<"eu">>,<<>>]

That <<>> at the end shouldn't be there. I tested a little with my ejabberd (Erlang R14B01 and R13B03), and couldn't reproduce your problem: all s2s works well in my server.

In an ejabberd live I tried:

ejabberd_s2s_out:get_addr_port("die-informatiker.eu").
[{"die-informatiker.eu",5269}]

In a simple erlang, I tried:

inet_res:getbyname("_xmpp-server._tcp.die-informatiker.eu",srv,10000).
{error,nxdomain}

You should check what changed in the ejabberd machine shortly before the problem was first reported: system upgrade, erlang upgrade, ...?. You can try to restart ejabberd.

If you find no clue, it would be possible to add some log lines to ejabberd_s2s_out.erl to see what exact calls to Erlang's inet_res does ejabberd perform in your server.

We have this very problem on

We have this very problem on our server now in production (Erlang R14A) after moving from an older machine, but we don't know Erlang. Can you help us in debugging the problem with detailed instructions?

thanks!
matteo

Syndicate content