Bug 1256677 - Prosody DNS resolution fails when using IPv6 DNS servers - s2s connections fail
Prosody DNS resolution fails when using IPv6 DNS servers - s2s connections fail
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: prosody (Show other bugs)
22
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Robert Scheck
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-25 05:05 EDT by Michael Wermeester
Modified: 2015-10-26 16:20 EDT (History)
3 users (show)

See Also:
Fixed In Version: prosody-0.9.8-6.fc23 prosody-0.9.8-6.fc21 prosody-0.9.8-6.fc22 prosody-0.9.8-6.el7 prosody-0.9.8-6.el6 prosody-0.9.8-6.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-11 12:05:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
prosody debug log (1.95 KB, text/plain)
2015-08-25 05:05 EDT, Michael Wermeester
no flags Details
prosody-0.9.8-dns-ipv6.patch (2.64 KB, patch)
2015-09-11 15:50 EDT, Robert Scheck
no flags Details | Diff

  None (edit)
Description Michael Wermeester 2015-08-25 05:05:20 EDT
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.
Comment 1 Robert Scheck 2015-08-25 06:03:29 EDT
This is an upstream issue, see https://prosody.im/issues/issue/352
Comment 2 Robert Scheck 2015-08-31 14:32:10 EDT
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.
Comment 3 Robert Scheck 2015-08-31 14:41:23 EDT
Ah, the trick seems to be that 127.0.0.1 does not answer because it is asked 
anyway due to Prosody code.
Comment 4 Robert Scheck 2015-08-31 14:57:21 EDT
From my point of view, the upstream patch is faulty (or I am too dumb to
test it properly).
Comment 5 Michael Wermeester 2015-09-01 12:42:24 EDT
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.
Comment 6 Robert Scheck 2015-09-11 15:50:35 EDT
Created attachment 1072623 [details]
prosody-0.9.8-dns-ipv6.patch
Comment 7 Robert Scheck 2015-09-11 15:51:30 EDT
Michael, do you see chances to test the attached patch?
Comment 8 Michael Wermeester 2015-09-25 13:37:34 EDT
I tested the patch and it fixes the issue. 

With the patch applied, DNS resolution works when using IPv6 DNS servers. 

Thanks!
Comment 9 Fedora Update System 2015-09-27 14:48:38 EDT
prosody-0.9.8-6.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-402828fb0f
Comment 10 Fedora Update System 2015-09-27 14:49:50 EDT
prosody-0.9.8-6.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-942ee651c7
Comment 11 Fedora Update System 2015-09-27 14:52:02 EDT
prosody-0.9.8-6.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-fb587311d8
Comment 12 Fedora Update System 2015-09-27 14:55:45 EDT
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
Comment 13 Fedora Update System 2015-09-27 14:56:46 EDT
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
Comment 14 Fedora Update System 2015-09-27 14:56:59 EDT
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
Comment 15 Fedora Update System 2015-09-29 00:18:18 EDT
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
Comment 16 Fedora Update System 2015-09-29 00:50:23 EDT
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
Comment 17 Fedora Update System 2015-09-29 02:22:27 EDT
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
Comment 18 Fedora Update System 2015-10-01 20:53:22 EDT
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
Comment 19 Fedora Update System 2015-10-01 23:49:06 EDT
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
Comment 20 Fedora Update System 2015-10-11 12:05:04 EDT
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.
Comment 21 Fedora Update System 2015-10-11 19:17:57 EDT
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.
Comment 22 Fedora Update System 2015-10-11 22:18:01 EDT
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.
Comment 23 Fedora Update System 2015-10-26 14:56:44 EDT
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.
Comment 24 Fedora Update System 2015-10-26 15:27:26 EDT
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.
Comment 25 Fedora Update System 2015-10-26 16:20:35 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.