Created attachment 1066789 [details] prosody debug log Description of problem: When using IPv6 DNS servers, DNS resolution fails. This results in non working s2s connections. Version-Release number of selected component (if applicable): Arch : x86_64 Epoch : 0 Version : 0.9.8 Release : 4.fc22 How reproducible: Set network interface to use IPv6 DNS servers. When these new IPv6 DNS servers are used after a system reboot, Prosody fails to resolve DNS. Steps to Reproduce: 1. In /etc/sysconfig/network-scripts/ifcfg-eth0, set the interface to use Google's IPv6 DNS servers: DNS1=2001:4860:4860::8844 DNS2=2001:4860:4860::8888 2. Reboot (shutdown -r now) 3. /etc/resolv.conf now contains the previously set IPv6 DNS servers: # Generated by NetworkManager nameserver 2001:4860:4860::8844 nameserver 2001:4860:4860::8888 4. Start prosody (if not done yet) and connect to the server using a XMPP client. The connected user should have at least one remote contact in its roster (s2s). Actual results: s2s connections fail. /var/log/prosody.log (info log): Aug 25 08:19:07 adns warn DNS socket for 127.0.0.1 disconnected: connection refused Aug 25 08:19:07 adns error Exhausted all 1 configured DNS servers, next lookup will try 127.0.0.1 again Aug 25 08:19:37 s2sout1f4a990 info Out of connection options, can't connect to remote-server.tld /var/log/prosody.err (error log): Aug 25 08:19:07 adns error Exhausted all 1 configured DNS servers, next lookup will try 127.0.0.1 again /var/log/prosody.deb (debug log): see attached file: "prosody debug log". Expected results: DNS resolution should work when using IPv6 DNS servers. Additional info: When using IPv4 DNS servers, everything works as expected (DNS resolutions succeeds and s2s connection work). I'm not sure if this is really a Prosody problem or some other Fedora configuration problem but I've never encountered this problem on other distributions or operating systems. I tried this on Fedora 22 installation on different servers and getting the same results each time. So I'm filling this report for investigation. This may simply be my servers that are misconfigured. It may also be a problem in the underlying Lua libraries. I haven't checked this yet.
This is an upstream issue, see https://prosody.im/issues/issue/352
https://hg.prosody.im/0.10/rev/6eebd5808fbc is an upstream patch; are you able to test it? I didn't manage it here to reproduce the issue you mention.
Ah, the trick seems to be that 127.0.0.1 does not answer because it is asked anyway due to Prosody code.
From my point of view, the upstream patch is faulty (or I am too dumb to test it properly).
I applied the upstream patch (to the prosody 0.9.8 sources), but it doesn't fix the issue. After a quick look at the source code, it turns out that further changes to the code are required for the patch to work.
Created attachment 1072623 [details] prosody-0.9.8-dns-ipv6.patch
Michael, do you see chances to test the attached patch?
I tested the patch and it fixes the issue. With the patch applied, DNS resolution works when using IPv6 DNS servers. Thanks!
prosody-0.9.8-6.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-402828fb0f
prosody-0.9.8-6.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-942ee651c7
prosody-0.9.8-6.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-fb587311d8
prosody-0.9.8-6.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-07be103bf4
prosody-0.9.8-6.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-9bbb48ec01
prosody-0.9.8-6.el5 has been submitted as an update to Fedora EPEL 5. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-c99b4b33a8
prosody-0.9.8-6.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'yum --enablerepo=epel-testing update prosody' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-9bbb48ec01
prosody-0.9.8-6.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'dnf --enablerepo=updates-testing update prosody' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-fb587311d8
prosody-0.9.8-6.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'dnf --enablerepo=updates-testing update prosody' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-402828fb0f
prosody-0.9.8-6.el5 has been pushed to the Fedora EPEL 5 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'yum --enablerepo=epel-testing update prosody' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-c99b4b33a8
prosody-0.9.8-6.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'dnf --enablerepo=updates-testing update prosody' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-942ee651c7
prosody-0.9.8-6.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
prosody-0.9.8-6.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
prosody-0.9.8-6.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
prosody-0.9.8-6.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
prosody-0.9.8-6.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
prosody-0.9.8-6.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.