You are not logged in.

#1 2023-01-19 19:47:55

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 189

[SOLVED]Resolving xxxxxx.local doesn't work

I have added a network printer to CUPS using DNS-SD/mDNS and everything seems to have gone fine, but when I try to print something, the job never gets to the printer and it ends up showing the error: Could not locate printer "NPI099206.local".

❯ host NPI099206
NPI099206 has address 192.168.1.18

❯ host NPI099206.local
Host NPI099206.local not found: 3(NXDOMAIN)

❯ ping -c 3 NPI099206
PING NPI099206 (192.168.1.18) 56(84) bytes of data.
64 bytes from NPI099206 (192.168.1.18): icmp_seq=1 ttl=255 time=0.323 ms
64 bytes from NPI099206 (192.168.1.18): icmp_seq=2 ttl=255 time=0.261 ms
64 bytes from NPI099206 (192.168.1.18): icmp_seq=3 ttl=255 time=0.274 ms

--- NPI099206 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.261/0.286/0.323/0.026 ms

❯ ping -c 3 NPI099206.local
ping: NPI099206.local: Name or service not known
❯ avahi-browse --all --ignore-local --resolve --terminate
+ enp68s0 IPv4 HP LaserJet M209dw (099206)                   UNIX Printer         local
+ enp68s0 IPv4 HP LaserJet M209dw (099206)                   PDL Printer          local
+ enp68s0 IPv4 HP LaserJet M209dw (099206)                   Secure Internet Printer local
+ enp68s0 IPv4 HP LaserJet M209dw (099206)                   Internet Printer     local
+ enp68s0 IPv4 HP LaserJet M209dw (099206)                   _print-caps._tcp     local
+ enp68s0 IPv4 HP LaserJet M209dw (099206)                   _http-alt._tcp       local
+ enp68s0 IPv4 HP LaserJet M209dw (099206)                   Web Site             local
....
= enp68s0 IPv4 HP LaserJet M209dw (099206)                   Web Site             local
   hostname = [NPI099206.local]
   address = [192.168.1.18]
   port = [80]
   txt = ["UUID=c4f4dc9b-6dd2-4d75-bb96-60dd689d8ecf"]

❯ host -t SOA local
local has no SOA record

❯ grep hosts /etc/nsswitch.conf
hosts: mymachines mdns4_minimal [NOTFOUND=return] dns mdns4 resolve [!UNAVAIL=return] files myhostname

❯ cat /etc/mdns.allow
.local.
.local

❯ resolvectl status
Failed to get global data: Unit dbus-org.freedesktop.resolve1.service not found.

❯ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 127.0.0.1
options edns0 trust-ad

I use NetworkManager with dnsmasq to resolve DNS.
I have searched for solutions on the Internet but none of them work for me.

Last edited by j1simon (2023-01-20 08:25:48)

Offline

#2 2023-01-19 20:07:38

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: [SOLVED]Resolving xxxxxx.local doesn't work

Sorry if I'm missing something here, but your output is clear: the name is NPI099206, not NPI099206.local, so it's not surprising that the latter could not be printed to.  You either need to configure printing to the name without .local, or change the naming to include .local.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2023-01-19 20:43:56

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 189

Re: [SOLVED]Resolving xxxxxx.local doesn't work

Trilby wrote:

Sorry if I'm missing something here, but your output is clear: the name is NPI099206, not NPI099206.local, so it's not surprising that the latter could not be printed to.  You either need to configure printing to the name without .local, or change the naming to include .local.

Descripción:	HP LaserJet M207-M212
Controlador:	HP LaserJet m207-m212, hpcups 3.22.10 (escala de grises, dúplex)
Conexión:	dnssd://HP%20LaserJet%20M209dw%20(099206)._ipp._tcp.local/?uuid=c4f4dc9b-6dd2-4d75-bb96-60dd689d8ecf

This is the CUPS printer, the dnssd connection doesn't work. The address detected by CUPS is provided by Avahi.

❯ avahi-browse --all --ignore-local --resolve --terminate
....
= enp68s0 IPv4 HP LaserJet M209dw (099206)                   Web Site             local
   hostname = [NPI099206.local]
....

Avahi reports the printer hostname is NPI099206.local. But it is unreachable from my computer.

Offline

#4 2023-01-19 21:06:16

seth
Member
Registered: 2012-09-03
Posts: 50,970

Re: [SOLVED]Resolving xxxxxx.local doesn't work

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

That configuration is nonsense.
https://wiki.archlinux.org/title/Avahi# … om_working but there's no systemd-resolved…?

nameserver 127.0.0.1

What is your local DNS server? dnsmasq? stubby?

pacman -Qs nss-mdns
systemctl status avahi-daemon.service

Offline

#5 2023-01-19 21:26:52

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 189

Re: [SOLVED]Resolving xxxxxx.local doesn't work

I have tried different configurations because there is no consensus on which one is correct. https://wiki.archlinux.org/title/Avahi# … om_working https://github.com/lathiat/nss-mdns/blo … activation and so on... It's very frustrating.
None resolves the printer domain to .local.

I use NetworkManager with dnsmasq.
I do not have nss-mdns installed.

❯ systemctl status avahi-daemon.service
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
     Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; enabled; preset: disabled)
     Active: active (running) since Thu 2023-01-19 22:21:19 CET; 5min ago
TriggeredBy: ● avahi-daemon.socket
   Main PID: 32831 (avahi-daemon)
     Status: "avahi-daemon 0.8 starting up."
      Tasks: 2 (limit: 76918)
     Memory: 920.0K
        CPU: 9ms
     CGroup: /system.slice/avahi-daemon.service
             ├─32831 "avahi-daemon: running [juan-PC.local]"
             └─32832 "avahi-daemon: chroot helper"

ene 19 22:21:19 juan-PC avahi-daemon[32831]: Successfully dropped remaining capabilities.
ene 19 22:21:19 juan-PC avahi-daemon[32831]: No service file found in /etc/avahi/services.
ene 19 22:21:19 juan-PC avahi-daemon[32831]: Joining mDNS multicast group on interface enp68s0.IPv4 with address 192.168.1.3.
ene 19 22:21:19 juan-PC avahi-daemon[32831]: New relevant interface enp68s0.IPv4 for mDNS.
ene 19 22:21:19 juan-PC avahi-daemon[32831]: Joining mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
ene 19 22:21:19 juan-PC avahi-daemon[32831]: New relevant interface lo.IPv4 for mDNS.
ene 19 22:21:19 juan-PC avahi-daemon[32831]: Network interface enumeration completed.
ene 19 22:21:19 juan-PC avahi-daemon[32831]: Registering new address record for 192.168.1.3 on enp68s0.IPv4.
ene 19 22:21:19 juan-PC avahi-daemon[32831]: Registering new address record for 127.0.0.1 on lo.IPv4.
ene 19 22:21:19 juan-PC avahi-daemon[32831]: Server startup complete. Host name is juan-PC.local. Local service cookie is 1813244285.

Offline

#6 2023-01-19 21:28:51

seth
Member
Registered: 2012-09-03
Posts: 50,970

Re: [SOLVED]Resolving xxxxxx.local doesn't work

I do not have nss-mdns installed.


https://wiki.archlinux.org/title/Avahi# … resolution

Offline

Board footer

Powered by FluxBB