Bug 1256677 - Prosody DNS resolution fails when using IPv6 DNS servers - s2s connections fail
Summary: Prosody DNS resolution fails when using IPv6 DNS servers - s2s connections fail
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: prosody
Version: 22
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Robert Scheck
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-25 09:05 UTC by Michael Wermeester
Modified: 2015-10-26 20:20 UTC (History)
3 users (show)

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:
Clone Of:
Environment:
Last Closed: 2015-10-11 16:05:05 UTC
Type: Bug
Embargoed:


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

Description Michael Wermeester 2015-08-25 09:05:20 UTC
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 10:03:29 UTC
This is an upstream issue, see https://prosody.im/issues/issue/352

Comment 2 Robert Scheck 2015-08-31 18:32:10 UTC
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 18:41:23 UTC
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 18:57:21 UTC
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 16:42:24 UTC
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 19:50:35 UTC
Created attachment 1072623 [details]
prosody-0.9.8-dns-ipv6.patch

Comment 7 Robert Scheck 2015-09-11 19:51:30 UTC
Michael, do you see chances to test the attached patch?

Comment 8 Michael Wermeester 2015-09-25 17:37:34 UTC
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 18:48:38 UTC
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 18:49:50 UTC
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 18:52:02 UTC
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 18:55:45 UTC
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 18:56:46 UTC
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 18:56:59 UTC
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 04:18:18 UTC
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 04:50:23 UTC
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 06:22:27 UTC
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-02 00:53:22 UTC
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-02 03:49:06 UTC
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 16:05:04 UTC
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 23:17:57 UTC
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-12 02:18:01 UTC
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 18:56:44 UTC
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 19:27:26 UTC
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 20:20:35 UTC
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.