Bug 1690078 - Unable to print due to nss-mdns not resolving .local names when DNS has SOA record for .local
Summary: Unable to print due to nss-mdns not resolving .local names when DNS has SOA r...
Alias: None
Product: Fedora
Classification: Fedora
Component: nss-mdns
Version: 29
Hardware: Unspecified
OS: Linux
Target Milestone: ---
Assignee: Adam Goode
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2019-03-18 18:04 UTC by Steve Fink
Modified: 2019-11-27 21:34 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-11-27 21:34:16 UTC
Type: Bug

Attachments (Terms of Use)

Description Steve Fink 2019-03-18 18:04:35 UTC
Description of problem:

Can't print. It looks like it is printing, but then errors out with "unable to resolve myprinter.local"

Or more simply: `getent ahostsv4 myprinter.local` returns nothing.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. point your DNS in /etc/resolv.conf to something that gives back a SOA for the .local domain. (Test with `host -t SOA local.`. will say not found, which is good. My stupid AT&T DNS will say `local has SOA record ns1-etm.att.net. nomail.etm.att.net. 1 604800 3600 2419200 900`.) is the broken one that I was using.

2. Try to print to a printer that is looked up via mdns.

Or more simply, run `getent hosts myname.local` if your avahi-daemon lists a myname in `systemctl status avahi-daemon` output, something like "Server startup complete. Host name is myname.local.".

Actual results:

cups will whine about not being able to resolve yourprinter.local. Or getent will return no output.

Expected results:

A gorgeous full-color printout of my New Zealand vacation photo. Or an IP address.

Additional info:

This is not bug 1471318. If you are getting here from a web search, check your hosts: line in /etc/nsswitch.conf to see if you're hitting that bug first.

The bug here is that nss-mdns is "helpfully" disabling itself if your DNS server resolves .local addresses, even though your nsswitch.conf file specifically says to try mdns first. (I guess this is because various intranets were using .local and this broke them?)

I have two possible workarounds: the easy one is to switch your DNS to something sane like or (Mine was set to my router, which got the crappy AT&T DNS server via DHCP.)

The more complex one is to:

1. Change your nsswitch.conf to use mdns4 in place of mdns4_minimal, eg:

    hosts:      files mdns4 [NOTFOUND=return] dns myhostname

This is because mdns4 checks /etc/mdns.allow and mdns4_minimal does not.

2. Create a file /etc/mdns.allow containing:

    # Comment making productive use of your favored curse words.

This is supposedly the default behavior, but it will also skip the helpful check to see if DNS can resolve `local.`

Comment 1 Ben Cotton 2019-10-31 19:45:56 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Ben Cotton 2019-11-27 21:34:16 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

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