Bug#895692: ejabberd: Does not use IPv6 for PostgreSQL and LDAP

2018-04-18 Thread Dominik George
Hi,

> could you please supply corresponding logs?

Here is the crash dump:

2018-04-14 19:50:16 =CRASH REPORT
  crasher:
initial call: pgsql_proto:init/1
pid: <0.516.0>
registered_name: []
exception exit: 
{{init,{error,nxdomain}},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,344}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}
ancestors: 
[<0.481.0>,'ejabberd_sql_sup_mercurius.teckids.org',ejabberd_rdbms,ejabberd_sup,<0.62.0>]
messages: []
links: []
dictionary: []
trap_exit: false
status: running
heap_size: 610
stack_size: 27
reductions: 349
  neighbours:

Error log:

2018-04-14 19:52:06.522 [error] <0.648.0>@eldap:connect_bind:1083 LDAP 
connection failed:
** Server: db.teckids.org:636
** Reason: nxdomain
** Socket options: [{packet,asn1},{active,true},{keepalive,true},binary]

ejabberd.log has nothing different.

> Also, have you tried configuring IPv6 addresses directly instead of 
> records to rule out wonky DNS?

See my initial report ;).  Putting an IPv6 address leads to the same error,
and ejabberd even seems to try to resolve it via a DNS forward query because
with an IPv6 address, the error also is nxdomain.

-nik


signature.asc
Description: PGP signature


Bug#895692: ejabberd: Does not use IPv6 for PostgreSQL and LDAP

2018-04-18 Thread Philipp Huebner
Hi,

On Sat, 14 Apr 2018 20:00:16 +0200 Dominik George > ejabberd 18.01 fails
hard when one of the SQL or LDAP hosts does not
> have an A record and is IPv6 only. Providing an IPv6 address directly in
> the configuration also fails. It looks like ejabberd does simply not
> support AF_INET6 for its client sockets.

could you please supply corresponding logs?

If you have the rather recent
ERL_OPTIONS="-env ERL_CRASH_DUMP_BYTES 0"
in /etc/default/ejabberd, please reset that to
ERL_OPTIONS="" to create crash dumps from the next occurrence on.

Then please post your error.log, ejabberd.log, crash.log and at least
one of the crash dumps.

In case you have configured "hide_sensitive_log_data: false" you might
want to filter/anonymize certain aspects from the logs beforehand.


Also, have you tried configuring IPv6 addresses directly instead of 
records to rule out wonky DNS?


Regards,
-- 
 .''`.   Philipp Huebner 
: :'  :  pgp fp: 6719 25C5 B8CD E74A 5225  3DF9 E5CA 8C49 25E4 205F
`. `'`
  `-



signature.asc
Description: OpenPGP digital signature


Bug#895692: ejabberd: Does not use IPv6 for PostgreSQL and LDAP

2018-04-14 Thread Dominik George
Source: ejabberd
Version: 18.01-2
Severity: important
Tags: ipv6

ejabberd 18.01 fails hard when one of the SQL or LDAP hosts does not
have an A record and is IPv6 only. Providing an IPv6 address directly in
the configuration also fails. It looks like ejabberd does simply not
support AF_INET6 for its client sockets.

With IPv4 addresses running out on our infrastructure, we wanted to drop
IPv4 from all hosts not used directly from outside, and ejabberd turned
out to be a showstopper there because it cannot use our databases
anymore that way.

-- System Information:
Debian Release: 9.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-6-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)