Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS: resoving domain names fail #13

Closed
Hc10b opened this issue Feb 1, 2017 · 14 comments
Closed

DNS: resoving domain names fail #13

Hc10b opened this issue Feb 1, 2017 · 14 comments

Comments

@Hc10b
Copy link

Hc10b commented Feb 1, 2017

Recently linphone stopped working for me. Neither registration nor calling outwards is possible anymore. Calling results in an IO Error.
Starting linphone --verbose revealed:

linphone-message : transaction [0xd0cdd0] channel state changed to [RES_IN_PROGRESS]
linphone-message : Resolver is using DNS server(s):
linphone-message : 	192.168.1.1
linphone-message : No SRV result for [_sip._tcp.sip.easybell.de], trying A/AAAA.
linphone-message : Resolver is using DNS server(s):
linphone-message : 	192.168.1.1
linphone-error : channel_res_done: DNS resolution failed for sip.easybell.de
linphone-message : channel 0xd31750: state ERROR

So it seems to be an DNS resolving problem. Indeed it's true that there is no SRV, but an A entry for sip.easybell.de and it had worked before (at least with linphone 3.9).

Actually there are more people experiencing the same issue at the Arch Linux forum.

Is this a bug or a configuration issue? Please let me know if I can provide you with more information.
Thanks a lot in advance.

Edit:
Linphone 3.10.2-3 on Arch Linux.

@marmistrz
Copy link

The same problem happens for me under Arch Linux with the official linphone server.

message: 2017-02-01 17:35:18:304 New local ip address is 192.168.0.106
message: 2017-02-01 17:35:18:304 SIP network reachability state is now [UP]
message: 2017-02-01 17:35:18:304 Resolver is using DNS server(s):
message: 2017-02-01 17:35:18:304 	208.67.222.222
message: 2017-02-01 17:35:18:304 	208.67.220.220
message: 2017-02-01 17:35:18:304 	192.168.0.1
message: 2017-02-01 17:35:18:304 No SRV result for [_stun._udp.stun.linphone.org], trying A/AAAA.
message: 2017-02-01 17:35:18:304 Resolver is using DNS server(s):
message: 2017-02-01 17:35:18:304 	208.67.222.222
message: 2017-02-01 17:35:18:304 	208.67.220.220
message: 2017-02-01 17:35:18:304 	192.168.0.1
warning: 2017-02-01 17:35:18:304 Stun server resolution failed.
message: 2017-02-01 17:35:18:304 Media network reachability state is now [UP]
message: 2017-02-01 17:35:18:305 LinphoneProxyConfig [0xa7eb40] about to register (LinphoneCore version: 3.10.2)
message: 2017-02-01 17:35:18:404 belle_sip_client_transaction_send_request(): waiting channel to be ready
message: 2017-02-01 17:35:18:404 channel [0xbbd4e0]: starting resolution of sip.linphone.org
message: 2017-02-01 17:35:18:404 channel 0xbbd4e0: state RES_IN_PROGRESS
message: 2017-02-01 17:35:18:404 transaction [0xb7a3a0] channel state changed to [RES_IN_PROGRESS]
message: 2017-02-01 17:35:18:404 Resolver is using DNS server(s):
message: 2017-02-01 17:35:18:404 	208.67.222.222
message: 2017-02-01 17:35:18:404 	208.67.220.220
message: 2017-02-01 17:35:18:404 	192.168.0.1
message: 2017-02-01 17:35:18:404 No SRV result for [_sips._tcp.sip.linphone.org], trying A/AAAA.
message: 2017-02-01 17:35:18:404 Resolver is using DNS server(s):
message: 2017-02-01 17:35:18:404 	208.67.222.222
message: 2017-02-01 17:35:18:404 	208.67.220.220
message: 2017-02-01 17:35:18:404 	192.168.0.1
error: 2017-02-01 17:35:18:404 channel_res_done: DNS resolution failed for sip.linphone.org
message: 2017-02-01 17:35:18:404 channel 0xbbd4e0: state ERROR
message: 2017-02-01 17:35:18:404 Neither Expires header nor corresponding Contact header found, checking from original request

Linphone 3.6 on Linux Mint 17.x works as expected.

@Hc10b
Copy link
Author

Hc10b commented Feb 2, 2017

After further investigation I believe that linphone has worked on 4th Dezember. At that time linphone 3.10.2-2 had been installed.

@marmistrz
Copy link

@sebalis
Copy link

sebalis commented Feb 6, 2017

The same issue was raised by me on the linphone-users mailing list, with some details from my debug window: http://lists.nongnu.org/archive/html/linphone-users/2017-01/msg00037.html

As can be seen from the debug output, Linphone tries two DNS requests: one for an SRV record and one for an A/AAAA record – and both fail while I could show that these requests can be resolved on my system outside of Linphone. The workaround suggested by Russell Treleaven (which I didn’t understand at first because I had overlooked the A/AAAA request) was to add the A data to /etc/hosts. I am hoping that with a new Linphone version, I will be able to abandon this workaround.

@vasisualiy
Copy link

The problem is a buggy systemd-resolved. The workaround is to utilize any other resolver. For example mdns or dns-server from resolve.conf

Try to change the hosts: line of /etc/nsswitch.conf from this one (for example)
hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname

to this one:
hosts: files mymachines dns

the "resolve" keyword seems to stay for a systemd-resolved

@sebalis
Copy link

sebalis commented Feb 12, 2017

As I wrote on linphone-users (link in my previous comment), I was able to resolve the SRV records using dig on the command line. So the statement that resolved is buggy seems a bit too general to me.

@jethrogb
Copy link

jethrogb commented Feb 19, 2017

This is not a bug in systemd-resolved. This is a bug in belle-sip's nsswitch.conf parser. This is completely valid syntax that belle-sip/src/dns.c:dns_nssconf_loadfile chokes on:

hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname

If you reorder the line like so

hosts: files mymachines dns resolve [!UNAVAIL=return] myhostname

it chokes less hard and linphone seems to work.

@sebalis
Copy link

sebalis commented Feb 27, 2017

Are the developers aware of this now? I was considering opening a bug on the belle-sip Github project but that does not seem to be possible.

@ghismary
Copy link

We are following this thread and are investigating this issue. It indeed seems to be a bug in the nsswitch.conf parsing. Thanks for spotting this!

@sebalis
Copy link

sebalis commented Feb 27, 2017

Thanks to @jethrogb from me too, and to the developers!

BelledonneComm pushed a commit to BelledonneCommunications/belle-sip that referenced this issue Feb 27, 2017
@ghismary
Copy link

Alright, I have just commited a fix in belle-sip. It is now working correctly with the new default nsswitch.conf file from Arch Linux.

BelledonneComm pushed a commit to BelledonneCommunications/belle-sip that referenced this issue Mar 2, 2017
@Hc10b
Copy link
Author

Hc10b commented Mar 18, 2017

Thanks to all pushing the issue forward, especially to @jethrogb and the developers. As the fix found its way to the arch repository and linphone is working again the issue is done. Thanks a lot again!

@Hc10b Hc10b closed this as completed Mar 18, 2017
@sebalis
Copy link

sebalis commented Mar 18, 2017

With the update it’s working for me as well, I was able to remove the entries I had to add to /etc/hosts. I’ve now also checked Linphone’s debug output and was able to confirm that both the SRV and A/AAAA queries for my three SIP accounts are working correctly. Thanks!

@marmistrz
Copy link

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants