Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

32 votes
4 answers
77591 views
What is the avahi daemon?
I just learning about daemon, by that time I came know avahi daemon can you please explain detaily about avahi daemon and why linux has a avahi user ?
I just learning about daemon, by that time I came know avahi daemon can you please explain detaily about avahi daemon and why linux has a avahi user ?
MP Creations (485 rep)
Feb 11, 2020, 11:29 AM • Last activity: May 23, 2025, 01:54 AM
2 votes
1 answers
7035 views
cups unable to communicate with avahi-daemon when running as a service
I'm finishing setting up my Raspberry Pi in a read-only mode and cups service seems to be the last thing that is causing me issues. As cups writes the config to /etc, I decided to mount /etc/cups as an overlay system: $ mount ... overlay on /etc/cups type overlay (rw,relatime,lowerdir=/etc/cups_org,...
I'm finishing setting up my Raspberry Pi in a read-only mode and cups service seems to be the last thing that is causing me issues. As cups writes the config to /etc, I decided to mount /etc/cups as an overlay system: $ mount ... overlay on /etc/cups type overlay (rw,relatime,lowerdir=/etc/cups_org,upperdir=/etc/cups_rw/upper,workdir=/etc/cups_rw/work) ... The cups service starts successfully, I'm able to access the localhost:631 page, however going to /admin subpage results in "Internal server error" and the /printer subpage shows: Unable to get printer list: Bad file descriptor. During startup of the service I see in the log: E [03/Sep/2016:17:17:13 +0200] Unable to communicate with avahi-daemon: Daemon not running while the avahi daemon is active and running When accessing the /admin subpage the log shows: D [03/Sep/2016:18:22:39 +0200] [CGI] Started /usr/lib/cups/cgi-bin/admin.cgi (PID 5367) I [03/Sep/2016:18:22:39 +0200] [Client 13] Started "/usr/lib/cups/cgi-bin/admin.cgi" (pid=5367) D [03/Sep/2016:18:22:39 +0200] [Client 13] file=14 D [03/Sep/2016:18:22:39 +0200] [Client 13] Waiting for CGI data. D [03/Sep/2016:18:22:39 +0200] Report: clients=1 D [03/Sep/2016:18:22:39 +0200] Report: jobs=0 D [03/Sep/2016:18:22:39 +0200] Report: jobs-active=0 D [03/Sep/2016:18:22:39 +0200] Report: printers=1 D [03/Sep/2016:18:22:39 +0200] Report: stringpool-string-count=654 D [03/Sep/2016:18:22:39 +0200] Report: stringpool-alloc-bytes=6392 D [03/Sep/2016:18:22:39 +0200] Report: stringpool-total-bytes=11720 D [03/Sep/2016:18:22:39 +0200] cupsd is not idle any more, canceling shutdown. D [03/Sep/2016:18:22:39 +0200] [CGI] admin.cgi started... D [03/Sep/2016:18:22:39 +0200] cupsd is not idle any more, canceling shutdown. E [03/Sep/2016:18:22:39 +0200] [CGI] Unable to connect to cupsd: Bad file descriptor E [03/Sep/2016:18:22:39 +0200] [CGI] Unable to connect to cupsd: Bad file descriptor D [03/Sep/2016:18:22:39 +0200] [CGI] cupsServer()="/var/run/cups/cups.sock" D [03/Sep/2016:18:22:39 +0200] [CGI] ippPort()=631 D [03/Sep/2016:18:22:39 +0200] cupsd is not idle any more, canceling shutdown. D [03/Sep/2016:18:22:39 +0200] [CGI] cupsEncryption()=0 D [03/Sep/2016:18:22:39 +0200] cupsd is not idle any more, canceling shutdown. D [03/Sep/2016:18:22:39 +0200] [Client 13] CGI data ready to be sent. D [03/Sep/2016:18:22:39 +0200] PID 5367 (/usr/lib/cups/cgi-bin/admin.cgi) stopped with status 1. However, when I stop the service, and run the program manually: /usr/sbin/cupsd -f the problem does not occur at all. The log shows: D [03/Sep/2016:18:25:33 +0200] Avahi server connection now available, registering printers for Bonjour broadcasting. And I'm able to access /admin (and all the other subpages): D [03/Sep/2016:18:25:36 +0200] [CGI] Started /usr/lib/cups/cgi-bin/admin.cgi (PID 6269) I [03/Sep/2016:18:25:36 +0200] [Client 17] Started "/usr/lib/cups/cgi-bin/admin.cgi" (pid=6269) D [03/Sep/2016:18:25:36 +0200] [Client 17] file=18 D [03/Sep/2016:18:25:36 +0200] [Client 17] Waiting for CGI data. D [03/Sep/2016:18:25:36 +0200] cupsd is not idle any more, canceling shutdown. D [03/Sep/2016:18:25:36 +0200] [CGI] admin.cgi started... D [03/Sep/2016:18:25:36 +0200] cupsd is not idle any more, canceling shutdown. D [03/Sep/2016:18:25:36 +0200] [Client 19] Accepted from localhost (Domain) D [03/Sep/2016:18:25:36 +0200] [Client 19] Waiting for request. D [03/Sep/2016:18:25:36 +0200] [CGI] http=0x554e9db8 D [03/Sep/2016:18:25:36 +0200] [CGI] cgiSetVariable: SECTION="admin" D [03/Sep/2016:18:25:36 +0200] [CGI] cgiSetVariable: REFRESH_PAGE="" D [03/Sep/2016:18:25:36 +0200] cupsd is not idle any more, canceling shutdown. D [03/Sep/2016:18:25:36 +0200] [CGI] org.cups.sid cookie is "72b5efbcd72416115613b87b329ce911" D [03/Sep/2016:18:25:36 +0200] [CGI] No form data, showing main menu... Any hints on what can be the reason of this behavior and how to solve the issue (change the config in cups.service file?) or at least to move this troubleshooting further?
asliwinski (121 rep)
Sep 3, 2016, 04:43 PM • Last activity: May 2, 2025, 01:02 PM
0 votes
1 answers
25 views
How can avahi daemon backward resolution be working while forward is not?
After a reboot of my server, I noticed the hostname wasn't resolving. I checked the `firewall-cmd` to see if `mdns`/`5353/udp` was open, which it was. Then, I went to check if Avahi daemon was running, which it is. ``` [vestatian@etune ~]$ systemctl status avahi-daemon ● avahi-daemon.service - Avahi...
After a reboot of my server, I noticed the hostname wasn't resolving. I checked the firewall-cmd to see if mdns/5353/udp was open, which it was. Then, I went to check if Avahi daemon was running, which it is.
[vestatian@etune ~]$ systemctl status avahi-daemon
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
     Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service;>
     Active: active (running) since Mon 2025-02-10 15:13:27 +08;
Furthermore, sudo netstat -tuln showed that the server was in fact listening here
udp        0      0 0.0.0.0:5353            0.0.0.0:*
It was after I ran the below commands, I realized that the mdns was in fact resolving, but only backwards. What about avahi-daemon might be causing this behaviour?
vestatian@pegasus:~/sources/frappe_podlet$ avahi-resolve -n etune.local
Failed to resolve host name 'etune.local': Timeout reached
vestatian@pegasus:~/sources/frappe_podlet$ avahi-resolve -a 192.168.50.241
192.168.50.241  etune
Additional info:
Operating System: Red Hat Enterprise Linux 9.5 (Plow)     
     CPE OS Name: cpe:/o:redhat:enterprise_linux:9::baseos
          Kernel: Linux 5.14.0-503.21.1.el9_5.x86_64
    Architecture: x86-64
Vesta Tian (81 rep)
Feb 10, 2025, 10:55 AM • Last activity: Mar 3, 2025, 08:02 PM
2 votes
1 answers
834 views
Unable to ping mDNS hostname
I have an application which has an mDNS server running on an ESP32 device. Its hostname is `esp32-mdns.local`. I can ping this hostname from Windows. However, it is not possible from my Ubuntu 22.04 system. I have re-installed the avahi daemon and the utils again. When I do `avahi-browse --all` : av...
I have an application which has an mDNS server running on an ESP32 device. Its hostname is esp32-mdns.local. I can ping this hostname from Windows. However, it is not possible from my Ubuntu 22.04 system. I have re-installed the avahi daemon and the utils again. When I do avahi-browse --all : avahi-browse -all + wlp0s20f3 IPv6 192-168-178-1 Microsoft Windows Network local + wlp0s20f3 IPv6 fritz-box Microsoft Windows Network local + wlp0s20f3 IPv4 192-168-178-1 Microsoft Windows Network local + wlp0s20f3 IPv4 fritz-box Microsoft Windows Network local + wlp0s20f3 IPv6 ESP32-WebServer1 Web Site local + wlp0s20f3 IPv6 ESP32-WebServer Web Site local + wlp0s20f3 IPv4 ESP32-WebServer1 Web Site local + wlp0s20f3 IPv4 ESP32-WebServer Web Site local Then avahi-resolve --name esp32-mdns.local : avahi-resolve --name esp32-mdns.local esp32-mdns.local 192.168.178.71 So, the name is getting resolved, but when I ping it : ping esp32-mdns.local ping: esp32-mdns.local: Name or service not known I can ping the IP address directly, but not the hostname. Here is my /etc/avahi/avahi-daemon.conf file. Am I missing something? Or what could be the issue? Thanks. # avahi is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public # License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with avahi; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA. # See avahi-daemon.conf(5) for more information on this configuration # file! [server] #host-name=foo #domain-name=local #browse-domains=0pointer.de, zeroconf.org use-ipv4=yes use-ipv6=yes #allow-interfaces=eth0 #deny-interfaces=eth1 #check-response-ttl=no #use-iff-running=no #enable-dbus=yes #disallow-other-stacks=no #allow-point-to-point=no #cache-entries-max=4096 #clients-max=4096 #objects-per-client-max=1024 #entries-per-entry-group-max=32 ratelimit-interval-usec=1000000 ratelimit-burst=1000 [wide-area] enable-wide-area=yes [publish] #disable-publishing=no #disable-user-service-publishing=no
Engineer999 (1233 rep)
Dec 16, 2024, 09:03 PM • Last activity: Dec 17, 2024, 06:08 AM
61 votes
4 answers
64687 views
What's the difference between .local, .home, and .lan?
How can I reliably address different machines on my network? I've always used the `.local` suffix to talk to computers on my local network before. With a new router, though, `.local` rarely (though sometimes) works. I've found that `.home` and `.lan` both *usually* work, but not always. .-------. .-...
How can I reliably address different machines on my network? I've always used the .local suffix to talk to computers on my local network before. With a new router, though, .local rarely (though sometimes) works. I've found that .home and .lan both *usually* work, but not always. .-------. .--------. .-----. | modem |---| router |))))))(wifi))))))| foo | .-------. .--------. v .-----. || | v /_^_^_\ | \))))))).-----. / cloud \ | | bar | \-_-_-/ .-----. .-----. | baz | .-----. So, from a terminal on foo, I can try: ssh bar.local ssh bar.home ssh bar.lan ssh baz.local ssh baz.home ssh baz.lan and sometimes some of those suffixes work and some don't, but I don't know how to predict which or when. foo, bar, and baz are all modern Linux or Android systems and the Linux boxes all have (or can have) avahi-daemon, or other reasonably-available packages, installed (I don't want to set up static IP addresses: I'd like to keep using DHCP (from the router) for each machine, and even if I was okay with static addresses I'd want to be able to enter hostnames in the unrooted Android machines, where I can't edit the hosts file to map a chosen hostname to an IP address.)
user4443
Sep 26, 2013, 07:16 AM • Last activity: Nov 2, 2024, 09:41 PM
26 votes
2 answers
25309 views
What is the difference between resolvconf, systemd-resolve, and avahi?
I'm currently working on a project that has required some DNS troubleshooting. However I am fairly new to the wonderful world of networking and I'm at a bit of a loss as to where to begin. My specific problem probably belongs on the Raspberry Pi Stack Exchange, so I'll avoid crossposting. Just looki...
I'm currently working on a project that has required some DNS troubleshooting. However I am fairly new to the wonderful world of networking and I'm at a bit of a loss as to where to begin. My specific problem probably belongs on the Raspberry Pi Stack Exchange, so I'll avoid crossposting. Just looking for information here. Looking for information, I was lead to the resolv.conf(5) file, resolvconf(8), systemd-resolve(1), and the beast that avahi appears to be. My Raspberry Pi with Raspbian Buster appears to have avahi-daemon running. My Ubuntu 18.04.4 LTS has systemd-resolved AND avahi-daemon. Does resolvconf(8) (man page only on Ubuntu) coordinate the two? When is /etc/resolv.conf used/ignored? *On Ubuntu:*
$ cat /etc/resolv.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.

nameserver 127.0.0.53
search telus
*On Raspbian:*
$ cat /etc/resolv.conf

# Generated by resolvconf
nameserver 192.168.0.1
nameserver 8.8.8.8
nameserver fd51:42f8:caae:d92e::1
Which utilities are responsible for this? I don't really understand enough jargon to sift through the man pages and differentiate all these, and I'd love an explanation of how their roles are related.
Toshi Taperek (363 rep)
Jul 3, 2020, 02:19 AM • Last activity: Sep 20, 2024, 01:47 PM
15 votes
3 answers
43386 views
avahi-daemon and ".local" domain issues
I have a **Ubuntu 16.04** based HTPC/Media Server that's running **24/7**. As far as I can remember using an official Ubuntu distro, I've always had issues with the **avahi-daemon**. The issue is pretty often discussed online. Some people decide to just delete daemon, however, I actually need it as...
I have a **Ubuntu 16.04** based HTPC/Media Server that's running **24/7**. As far as I can remember using an official Ubuntu distro, I've always had issues with the **avahi-daemon**. The issue is pretty often discussed online. Some people decide to just delete daemon, however, I actually need it as I'm running a CUPS server and use Kodi as my AirPlay reciever. The issue --------- > **mDNS/DNS-SD is inherently incompatible with unicast DNS zones .local**. We strongly recommend not to use Avahi or ​nss-mdns in such a network setup. N.B.: nss-mdns is not typically bundled with Avahi and requires a separate download and install. (avahi.org) The symptoms are simple - after around 2-4 days of uptime the **network connection will go down** and this will be logged Mar 17 18:33:27 15 avahi-daemon: Withdrawing address record for 192.168.1.200 on enp3s0. Mar 17 18:33:27 15 avahi-daemon: Leaving mDNS multicast group on interface enp3s0.IPv4 with address 192.168.1.200. Mar 17 18:33:27 15 avahi-daemon: Interface enp3s0.IPv4 no longer relevant for mDNS. The **network will go back up** without issues **if you physically reconnect** the Ethernet plug, or if you reconnect software-side. Possible solutions ------------------ There are three solutions listed on the official wiki, which has been non-functional since what appears to be *June 2016*, so I'm providing a non-direct *archive.org* link 1.) Edit **/etc/nsswitch.conf** from "hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4" to hosts: files dns mdns4 2.) Modify **/etc/avahi/avahi-daemon.conf** from domain-name=.local to domain-name=alocal 3.) *"Ask the administrator to move the .local zone"* (as said on the wiki) ## What I did ## The **first solution** did not appear to work for me - the daemon still works, however, the **network will go down the same way as before** (to be fair, on the wiki it *does say* "**Y**our **M**ileage **M**ay **V**ary") The **second solution** causes the daemon to seemingly function properly (nothing wrong if you look at the logs) but the **iOS devices fail to "see" the machine** as a printer or an AirPlay reciever (as well as iTunes on my Windows machine) The **third solution** is tricky, because I'm not well versed in the *"ins and outs"* of how a network is functioning; and I'm not sure I actually tried it. Here's what I mean: on my **Asus Router** running Asuswrt-Merlin I went into a settings subcategory /LAN/DHCP Server/Basic Config. There I set "**RT-AC68U's Domain Name**" as "lan" (a domain name I saw advised on the web, because it doesn't conflict with anything, unlike "local"). As far as I can understand, that's what "**moving the .local zone**" means. If this is in fact correct, than this solution does not work for me as well. ## Conclusion ## So, what should I do? I've been battling with this problem for over 4 months now, and every answer online comes down to the those I've already tried; frankly, I'm completely lost. Thanks in advance!
halfer (171 rep)
Mar 18, 2017, 01:01 AM • Last activity: Sep 10, 2024, 05:35 AM
1 votes
1 answers
1654 views
Avahi not honoring its own /etc/avahi/hosts on the same machine
# scenario I want to use a mostly relatively light-weight way of associating IP addresses with hostnames. For this, I've installed Avahi and mdns/nss on my Fedora distro. I've like to use the pseudo-tld ".o" as a local domain, and not the default ".local". In `/etc/nsswitch.conf` I've made sure that...
# scenario I want to use a mostly relatively light-weight way of associating IP addresses with hostnames. For this, I've installed Avahi and mdns/nss on my Fedora distro. I've like to use the pseudo-tld ".o" as a local domain, and not the default ".local". In /etc/nsswitch.conf I've made sure that mdns4 is set:
hosts:      files myhostname mdns4 [NOTFOUND=return] resolve [!UNAVAIL=return] dns
In /etc/avahi/avahi-daemon.conf I changed one line and left everything unchaged:
domain-name=o
As my host name is desk this should make the domain desk.o available. That's my understanding, anyway. Finally, in /etc/avahi/hosts, I've set one IP-hostname relation:
192.168.0.1 router.o
# expected behavior Assuming my machine's name is desk, I'd expect the domain desk.o to be available. Furthermore, I have machines in my network, which are unable to have their own Avahi running on them, so I'd use /etc/avahi/hosts to annouce those IP addresses, etc. One reason being, I have a pretty old network printer, which simply can't run Avahi, and I just have to use either the IP or something like Avahi (or just an entry in /etc/hosts). So with the hosts file above, I'd expect router.o to be resolved to 192.168.0.1, etc. # observed behavior I've restarted Avahi after making any changes (systemctl restart avahi-daemon.service), but the way thing work is a little strange: When running getent hosts desk.local I get this:
2a02:xxxx:xxxx:xxxx:xxxx:xxxx:8878:583d desk.local
fe80::f990:519a:4ba5:9f22 desk.local
*(first IP partially obfuscated. Where there's an x, there were just hex digits)* I'm fine with this (mostly), I wouldn't expect to desk.local be still available, but I'm assuming it's some sort of default that I can't get rid of (for now). When running getent hosts desk.o I get:
127.0.0.1       desk.o
This is fine, as long as it's only on this machine, but it's a little odd to me, the FQDN hostname resolved to this. When running getent hosts router.o I get nothing. Just no output. # questions So, apparently Avahi is ignoring /etc/avahi/hosts? I've restarted Avahi after making changes to that file, so I was assuming it'd be re-read. Is Avahi not "publishing" the set hostnames to itself? How to make Avahi and my system behave as I'd expect? Or am I having a fundamental thinking error here? ---- Ideally, an Avahi-hostname file would be somewhere in my $HOME, such that I don't have to adjust a system-wide hostname file for Avahi, if that makes sense. If that won't work, it's fine, since that'd go against the way hostname resolution works in principle, I suppose. What kinda surprised me a little, is that desk.o is getting resolved (not as I'd expect it, really), but at least it resolves to *something* so it's at least partially working.
polemon (11921 rep)
Sep 16, 2022, 12:20 AM • Last activity: Aug 29, 2024, 09:15 AM
3 votes
2 answers
4528 views
Loosing IPv4 and DHCP constantly asking for IP
Using Ubuntu 16.04, almost every day I'm loosing IPv4 address, being dropped by Avahi Daemon. Also, I see the DHCP is not "waiting" for leasing time to finish to request an address again, it does it every some minutes, but I cannot see a pattern. Then, suddenly and without any previous error, Avahi...
Using Ubuntu 16.04, almost every day I'm loosing IPv4 address, being dropped by Avahi Daemon. Also, I see the DHCP is not "waiting" for leasing time to finish to request an address again, it does it every some minutes, but I cannot see a pattern. Then, suddenly and without any previous error, Avahi Daemon withdraws the IP from interface eth0: Aug 11 11:55:14 jorgee avahi-daemon: Withdrawing address record for 192.168.2.94 on eth0. This is the last part of the syslog. Aug 11 11:43:11 jorgee systemd: Started Automatically refresh installed snaps. Aug 11 11:43:11 jorgee systemd: snapd.refresh.timer: Adding 4h 33min 5.892892s random time. Aug 11 11:43:11 jorgee systemd: snapd.refresh.timer: Adding 48min 39.947211s random time. Aug 11 11:43:13 jorgee dbus: [system] Reloaded configuration Aug 11 11:44:04 jorgee dhclient: DHCPREQUEST of 192.168.2.94 on eth0 to 192.168.2.254 port 67 (xid=0x188018e6) Aug 11 11:44:04 jorgee dhclient: DHCPACK of 192.168.2.94 from 192.168.2.254 Aug 11 11:44:04 jorgee root: /etc/dhcp/dhclient-enter-hooks.d/avahi-autoipd returned non-zero exit status 1 Aug 11 11:44:05 jorgee dhclient: bound to 192.168.2.94 -- renewal in 800 seconds. Aug 11 11:46:15 jorgee dhclient: DHCPREQUEST of 192.168.2.94 on eth0 to 192.168.2.254 port 67 (xid=0x51cc22fc) Aug 11 11:46:15 jorgee dhclient: DHCPACK of 192.168.2.94 from 192.168.2.254 Aug 11 11:46:15 jorgee root: /etc/dhcp/dhclient-enter-hooks.d/avahi-autoipd returned non-zero exit status 1 Aug 11 11:46:15 jorgee dhclient: bound to 192.168.2.94 -- renewal in 758 seconds. Aug 11 11:47:33 jorgee dhclient: DHCPREQUEST of 192.168.2.94 on eth0 to 192.168.2.254 port 67 (xid=0x6788bfce) Aug 11 11:47:33 jorgee dhclient: DHCPACK of 192.168.2.94 from 192.168.2.254 Aug 11 11:47:33 jorgee root: /etc/dhcp/dhclient-enter-hooks.d/avahi-autoipd returned non-zero exit status 1 Aug 11 11:47:33 jorgee dhclient: bound to 192.168.2.94 -- renewal in 746 seconds. Aug 11 11:49:08 jorgee systemd-timesyncd: Timed out waiting for reply from 192.168.2.254:123 (192.168.2.254). Aug 11 11:52:42 jorgee dhclient: DHCPREQUEST of 192.168.2.94 on eth0 to 192.168.2.254 port 67 (xid=0x41dfce98) Aug 11 11:52:42 jorgee dhclient: DHCPACK of 192.168.2.94 from 192.168.2.254 Aug 11 11:52:42 jorgee dhclient: bound to 192.168.2.94 -- renewal in 703 seconds. Aug 11 11:54:16 jorgee dhclient: DHCPREQUEST of 192.168.2.94 on eth0 to 192.168.2.254 port 67 (xid=0x7456460e) Aug 11 11:54:16 jorgee dhclient: DHCPACK of 192.168.2.94 from 192.168.2.254 Aug 11 11:54:16 jorgee root: /etc/dhcp/dhclient-enter-hooks.d/avahi-autoipd returned non-zero exit status 1 Aug 11 11:54:17 jorgee dhclient: bound to 192.168.2.94 -- renewal in 770 seconds. Aug 11 11:55:14 jorgee avahi-daemon: Withdrawing address record for 192.168.2.94 on eth0. Aug 11 11:55:14 jorgee avahi-daemon: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.2.94. Aug 11 11:55:14 jorgee avahi-daemon: Interface eth0.IPv4 no longer relevant for mDNS. Aug 11 11:55:16 jorgee whoopsie: [11:55:16] Cannot reach: https://daisy.ubuntu.com Aug 11 11:55:16 jorgee whoopsie: [11:55:16] offline Aug 11 11:56:14 jorgee sudo: pam_ecryptfs: pam_sm_authenticate: /home/jorgee is already mounted Aug 11 11:56:34 jorgee dhclient: DHCPREQUEST of 192.168.2.94 on eth0 to 192.168.2.254 port 67 (xid=0x2894ec32) Aug 11 11:56:34 jorgee dhclient: send_packet: Network is unreachable Aug 11 11:56:34 jorgee dhclient: send_packet: please consult README file regarding broadcast address. Aug 11 11:56:34 jorgee dhclient: dhclient.c:2386: Failed to send 300 byte long packet over fallback interface. Aug 11 11:56:37 jorgee dhclient: DHCPREQUEST of 192.168.2.94 on eth0 to 192.168.2.254 port 67 (xid=0x2894ec32) Aug 11 11:56:37 jorgee dhclient: send_packet: Network is unreachable Aug 11 11:56:37 jorgee dhclient: send_packet: please consult README file regarding broadcast address. Aug 11 11:56:37 jorgee dhclient: dhclient.c:2386: Failed to send 300 byte long packet over fallback interface. Aug 11 11:56:42 jorgee dhclient: DHCPREQUEST of 192.168.2.94 on eth0 to 192.168.2.254 port 67 (xid=0x2894ec32) Aug 11 11:56:42 jorgee dhclient: send_packet: Network is unreachable Aug 11 11:56:42 jorgee dhclient: send_packet: please consult README file regarding broadcast address. Aug 11 11:56:42 jorgee dhclient: dhclient.c:2386: Failed to send 300 byte long packet over fallback interface. Edit: Bind9 config: acl lan { 127.0.0.0/8; 192.168.0.0/16; }; view "lan-dmz" { match-clients { key lan-dmz; !key wan; lan; }; server 192.168.1.24 { keys lan-dmz; }; allow-recursion {lan; }; recursion yes; zone "aaaa.edu.ar" { type master; file "/var/cache/bind/aaaa.edu.ar.lan-dmz"; }; zone "aaaa.local" IN { type forward; forwarders { 192.168.1.123; 192.168.1.124;}; }; }; view "wan" { match-clients { key wan; !key lan-dmz; !lan; any; }; server 192.168.1.24 { keys wan; }; recursion no; zone "aaaa.edu.ar" { type master; allow-transfer { 192.168.1.24; 170.210.44.2; 170.210.44.3; }; allow-query { any; }; also-notify { 192.168.1.24; 170.210.44.2; 170.210.44.3; }; file "/var/cache/bind/aaaa.edu.ar.wan"; }; };
JorgeeFG (735 rep)
Aug 11, 2016, 03:15 PM • Last activity: Jun 27, 2024, 12:03 PM
2 votes
2 answers
2209 views
avahi-resolve works but mdns
I have an updated Debian 11 (bullseye) setup and want to use avahi to connect to locally connected computers. avahi works, for example: avahi-resolve -n4 prag11mono.local gives `prag11mono.local 10.0.0.105` which is correct. However, `ping` (or `ssh`) for the same host ping prag11mono.local PING pra...
I have an updated Debian 11 (bullseye) setup and want to use avahi to connect to locally connected computers. avahi works, for example: avahi-resolve -n4 prag11mono.local gives prag11mono.local 10.0.0.105 which is correct. However, ping (or ssh) for the same host ping prag11mono.local PING prag11mono.local.rpz.GS.local (127.0.0.2) 56(84) bytes of data. 64 bytes from 127.0.0.2 (127.0.0.2): icmp_seq=1 ttl=64 time=0.035 ms Here I do not understand where the rpz.GS.local addition comes from. It is not added to ssh prag11mono.local, but the request goes to 127.0.0.2 as well. In /etc/nsswitch.conf I have hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 but getent hosts bhutan.local returns nothing. I have no /etc/mdns.allow file. The connection between avahi-daeomon and mdns4 is puzzling. I can restart avahi-daemon with systemctl; But how do I restart mdns? I fear that I am missing some installation. I tried to install the package nss-mdns but got unable to locate package -- it should be available for bullseye. I installed libnss-mdns and checked that the required files are in `/lib/libnss_mdns* What is missing? How to debug?
user855443 (153 rep)
Mar 20, 2022, 08:50 PM • Last activity: Mar 16, 2024, 04:38 PM
1 votes
1 answers
646 views
How to check what is blocking my mDNS requests?
This is the situation. I have a home server that publishes multiple domains via avahi. Avahi and resolvectl are installed on the client (ubuntu 22). in the file `/etc/nsswitch.conf` - `hosts: files mdns4_minimal [NOTFOUND=return] dns`. Which seems normal. But, $ avahi-resolve -n whoami.homeserver.lo...
This is the situation. I have a home server that publishes multiple domains via avahi. Avahi and resolvectl are installed on the client (ubuntu 22). in the file /etc/nsswitch.conf - hosts: files mdns4_minimal [NOTFOUND=return] dns. Which seems normal. But, $ avahi-resolve -n whoami.homeserver.local whoami.homeserver.local 192.168.0.4 But when trying to resolve the address via ping or curl $ curl whoami.homeserver.local curl: (6) Could not resolve host: whoami.homeserver.local UPD: Interesing - base name homeserver.local is correctly resolved via ping
Павел Резин (13 rep)
Jan 15, 2024, 09:45 AM • Last activity: Feb 19, 2024, 10:19 AM
0 votes
0 answers
2387 views
WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
I have cross-compiled avahi-0.8 library for the MIPS platform. I am able to run the avahi daemon from the console, but I'm getting the following warning: ```none WARNING: No NSS support for mDNS detected, consider installing nss-mdns! ``` How can I remove the above warning? Screenshot of the logs: [...
I have cross-compiled avahi-0.8 library for the MIPS platform. I am able to run the avahi daemon from the console, but I'm getting the following warning:
WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
How can I remove the above warning? Screenshot of the logs: enter image description here [root@Ingenic:~]# avahi-daemon --file=/system/etc/avahi/avahi-daemon.conf Found user 'root' (UID 0) and group 'root' (GID 0). Successfully dropped root privileges. avahi-daemon 0.8 starting up. WARNING: No NSS support for mDNS detected, consider installing nss-mdns! Loading service file /system/etc/avahi/services/sftp-ssh.service. Loading service file /system/etc/avahi/services/ssh.service. socket() failed: Address family not supported by protocol Failed to create IPv6 socket, proceeding in IPv4 only mode socket() failed: Address family not supported by protocol Joining mDNS multicast group on interface eth0.IPv4 with address 10.42.0.148. New relevant interface eth0.IPv4 for mDNS. Joining mDNS multicast group on interface lo.IPv4 with address 127.0.0.0. New relevant interface lo.IPv4 for mDNS. Network interface enumeration completed. Registering new address record for 10.42.0.148 on eth0.IPv4. Registering new address record for 127.0.0.0 on lo.IPv4. Server startup complete. Host name is Ingenic.local. Local service cookie is 315733776. Service "Ingenic" (/system/etc/avahi/services/ssh.service) successfully established. Service "Ingenic" (/system/etc/avahi/services/sftp-ssh.service) successfully established.
Nirav Patel (1 rep)
Aug 21, 2020, 07:26 AM • Last activity: Feb 13, 2024, 09:49 PM
0 votes
1 answers
142 views
Advertising an HTTP/SOCKS proxy over local network
I have a proxy server running on my home server and I want to advertise it so that any client (mostly phones) can connect. Is it possible to do so? Transparent proxy is not an option for me.
I have a proxy server running on my home server and I want to advertise it so that any client (mostly phones) can connect. Is it possible to do so? Transparent proxy is not an option for me.
mFat (121 rep)
Nov 10, 2023, 07:36 AM • Last activity: Nov 10, 2023, 03:23 PM
2 votes
1 answers
639 views
Are Avahi and Bonjour compatible?
I would like to set up a network printer on my Linux desktop (Parabola GNU/Linux, derivative of Arch) so that my wife can connect to it with her Macbook. I understand that Linux uses Avahi to share printers with a local network, but Apple Macs use Bonjour for printer sharing. They look like similar...
I would like to set up a network printer on my Linux desktop (Parabola GNU/Linux, derivative of Arch) so that my wife can connect to it with her Macbook. I understand that Linux uses Avahi to share printers with a local network, but Apple Macs use Bonjour for printer sharing. They look like similar (zeroconf) technologies - to what extent are they compatible? Is there anything special I need to do, to allow a Mac to connect to a printer I share with Avahi (over wifi)?
Time4Tea (2628 rep)
Mar 20, 2020, 08:51 PM • Last activity: Nov 5, 2023, 09:09 PM
2 votes
0 answers
242 views
avahi-daemon runs with wrong hostname
I have a problem on one device where the `avahi-daemon` is running with the wrong hostname and it is messing up my system. The hostname is `ABC-100001` but when I check the process list it shows that ```text avahi 9243 20.7 0.0 6964 5408 ? Ss 02:39 0:01 avahi-daemon: running [ABC-100002.local] ``` U...
I have a problem on one device where the avahi-daemon is running with the wrong hostname and it is messing up my system. The hostname is ABC-100001 but when I check the process list it shows that
avahi       9243 20.7  0.0   6964  5408 ?        Ss   02:39   0:01 avahi-daemon: running [ABC-100002.local]
Using hostnamectl set-hostname localhost and restarting the avahi-daemon changes the process to:
avahi       9601 11.0  0.0   6652  5148 ?        Ss   02:40   0:00 avahi-daemon: running [linux.local]
Changing it back hostnamectl set-hostname ABC-100001 and restarting the daemon again shows it running as ABC-100002. I have searched high and low but can not figure out where the avahi-daemon gets it hostname from.
uncletall (121 rep)
Sep 29, 2023, 03:12 AM • Last activity: Oct 5, 2023, 03:27 PM
6 votes
3 answers
26911 views
Can't resolve hostname.local on LAN
I used to be able to `ssh user@hostname.local` between machines on my LAN but it is no longer working. I can ssh using the IP of course, but it's DHCP so it may change from time to time. Both machines run Debian 9.12, one is a VM in a Windows host, but still, it DID work ; I haven't fooled around wi...
I used to be able to ssh user@hostname.local between machines on my LAN but it is no longer working. I can ssh using the IP of course, but it's DHCP so it may change from time to time. Both machines run Debian 9.12, one is a VM in a Windows host, but still, it DID work ; I haven't fooled around with the config files, just regular updates.
ping hostname.local
ping: hostname.local: Name or service not known
(it might not be exactly that message as I translate from French)
ssh hostname.local
ssh: Could not resolve hostname hostname.local: Name or service not known
(ssh outputs in English) From avahi.org : > Avahi is a system which facilitates service discovery on a local network via the mDNS/DNS-SD protocol suite I've looked into /etc/resolv.conf, /etc/avahi/avahi-daemon.conf, /etc/nsswitch.conf but it's standard out-of-the-box config. /etc/resolv.conf (reset by network-manager each time it starts)
# Generated by NetworkManager
search lan
nameserver xx.xx.xx.xx # DNS IPs obtained from DHCP
nameserver xx.xx.xx.xx
man resolv.conf says that the search list contains only the local domain name by default (something like that, I translated from man page in French) ; shouldn't it be localinstead of lan ? I tried to change it and ping or ssh another host on my lan right away (without restarting network-manager), it didn't work. And when I restart network-manager, it rewrites /etc/resolv.conf and sets search lan. /etc/nsswitch.conf (default, I haven't made any change)
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the glibc-doc-reference' and info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat
gshadow:        files

hosts:          files mdns4_minimal [NOTFOUND=return] dns myhostname
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis
I've tried to discover hosts and services with avahi-browse and nbtscan, which rely on avahi (zeroconf / Bonjour), but they seem to find only the host on which they run. (I know this is a possible duplicate of other questions, but I didn't find any answer and I don't have enough reputation to do anything)
Manumie (111 rep)
Mar 29, 2020, 12:28 PM • Last activity: Sep 13, 2023, 10:54 AM
1 votes
0 answers
188 views
How to specify which ipv6 address avahi service advertises
I configured a avahi service which I can see with avahi-browse. However I would like to specify which ipv6 address is used in that service advertisement. I would like it to use "2001:db8:1234:1:594b:8731:6f7e:6f5a" however I don't see a way to specify an address in [avahi.service][1] or have the ser...
I configured a avahi service which I can see with avahi-browse. However I would like to specify which ipv6 address is used in that service advertisement. I would like it to use "2001:db8:1234:1:594b:8731:6f7e:6f5a" however I don't see a way to specify an address in avahi.service or have the service advertise that service on all ipv6 addresses. ip -6 a 3: wlan0: mtu 1500 state UP qlen 1000 inet6 2001:db8:1234:1::be48:c89c/128 scope global dynamic noprefixroute valid_lft 33855sec preferred_lft 33855sec inet6 2001:db8:1234:1:594b:8731:6f7e:6f5a/64 scope global dynamic noprefixroute valid_lft 43190sec preferred_lft 43190sec inet6 fe80::609b:458e:7bbb:a183/64 scope link noprefixroute valid_lft forever preferred_lft forever avahi-browse = wlan0 IPv6 fhfs _broker._tcp local hostname = [fhfs.local] address = [2001:db8:1234:1::be48:c89c] port = txt = [] cat /etc/avahi/services/broker.service %h _broker._tcp 8883
Frank Schrijver (111 rep)
Jun 15, 2023, 07:52 AM
2 votes
1 answers
872 views
systemd.networkd: how to set default link-local address?
systemd-networkd: Is it possible to configure default link-local address, which will be tried as the first one? Something like '--start=' parameter for avahi-autoipd.
systemd-networkd: Is it possible to configure default link-local address, which will be tried as the first one? Something like '--start=' parameter for avahi-autoipd.
coulomb (43 rep)
Dec 14, 2018, 10:33 PM • Last activity: Jan 31, 2023, 07:09 PM
6 votes
2 answers
1537 views
Avahi seems to stop publishing/refreshing services after a while
Firstable, I looked up to several Q/A, i can ensure that the following points are fullfiled: - IGMP snooping isn't filtered by switch/router. - Bonjour services (`mDNSResponder.exe`) is granted and allowed on the firewall as well as __UDP port 5353__ (windows side). - Avahi config is correct (plus u...
Firstable, I looked up to several Q/A, i can ensure that the following points are fullfiled: - IGMP snooping isn't filtered by switch/router. - Bonjour services (mDNSResponder.exe) is granted and allowed on the firewall as well as __UDP port 5353__ (windows side). - Avahi config is correct (plus use of ipv6 is disabled) as well as nssitch.conf needed modifications have been done hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 - Avahi-daemon is running as well as bonjour services. - windows side ipv6 is disabled on active network interface, also avahi-daemon is configured not to use ipv6: use-ipv6=no. ## Issue with Pi's mDNS After a while the hostname .local corresponding to the raspberry pi isn't resolved anymore after issuing a ping pi.local from windows, note that on startup it responded perfectly, and a restart of avahi-daemon will fix it temporary before the issue starts again. Just after the mdns resolve fail I executed the following on the rasp avahi-resolve -n pi.local it shows it ipv6 (fe80::xxaa:yybb:zzde:ee) which is weird because as I mentionned I have _disabled ipv6_ in avahi configs, right just after i reexecute the same command this time i get ipv4 as an answer pi.local 192.168.1.7 also ping seems to respond again. ### P.S. - Running Linux pi 4.4.38-v7+ #938 - Using Bonjour Print Services for Windows v2.0.2: https://support.apple.com/kb/DL999 , and it's running as service. - Disabling ipv6 only the return of avahi-resolve -n pi.local command gives 192.168.1.7 instead of ipv6 but issue remains. Nothing in /var/log/messages concerning Avahi. Any thoughts about the root of the problem ? syslog after a while from restarting avahi-daemon and sending resolve command above: 18:21:47 pi systemd: Stopping Avahi mDNS/DNS-SD Stack... 18:21:47 pi avahi-daemon: Got SIGTERM, quitting. 18:21:47 pi avahi-daemon: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.7. 18:21:47 pi avahi-daemon: avahi-daemon 0.6.31 exiting. 18:21:47 pi systemd: Starting Avahi mDNS/DNS-SD Stack... 18:21:47 pi avahi-daemon: Process 427 died: No such process; trying to remove PID file. (/var/run/avahi-daemon//pid) 18:21:47 pi avahi-daemon: Found user 'avahi' (UID 105) and group 'avahi' (GID 110). 18:21:47 pi avahi-daemon: Successfully dropped root privileges. 18:21:47 pi avahi-daemon: avahi-daemon 0.6.31 starting up. 18:21:47 pi avahi-daemon: Successfully called chroot(). 18:21:47 pi avahi-daemon: Successfully dropped remaining capabilities. 18:21:47 pi avahi-daemon: Loading service file /services/multiple.service. 18:21:47 pi avahi-daemon: Loading service file /services/udisks.service. 18:21:47 pi avahi-daemon: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.7. 18:21:47 pi avahi-daemon: New relevant interface wlan0.IPv4 for mDNS. 18:21:47 pi avahi-daemon: Network interface enumeration completed. 18:21:47 pi avahi-daemon: Registering new address record for fe80::f2f:3b5b:ab5b:35c1 on wlan0.*. 18:21:47 pi avahi-daemon: Registering new address record for 192.168.1.7 on wlan0.IPv4. 18:21:47 pi avahi-daemon: Registering HINFO record with values 'ARMV7L'/'LINUX'. 18:21:47 pi systemd: Started Avahi mDNS/DNS-SD Stack. 18:21:48 pi avahi-daemon: Server startup complete. Host name is pi.local. Local service cookie is 2501181696. 18:21:49 pi avahi-daemon: Service "pi" (/services/udisks.service) successfully established. 18:21:49 pi avahi-daemon: Service "pi" (/services/multiple.service) successfully established.
mdns (61 rep)
Mar 6, 2017, 08:41 PM • Last activity: Jan 29, 2023, 09:25 PM
6 votes
1 answers
346 views
Get notified from avahi
After looking for a zero-conf browser valid implementation I realised that inside my linux machine (ubuntu) I already have avahi and typing: avahi-browse -alr I get a complete list of all devices notified by their bonjour conf. **Question:** how to get events from it? I mean, how can I get notificat...
After looking for a zero-conf browser valid implementation I realised that inside my linux machine (ubuntu) I already have avahi and typing: avahi-browse -alr I get a complete list of all devices notified by their bonjour conf. **Question:** how to get events from it? I mean, how can I get notification (execute a script) when a bonjour device is connecting on my network? How to detect when it is switched off?
nkint (305 rep)
Jul 28, 2014, 02:11 PM • Last activity: Jan 24, 2023, 09:12 AM
Showing page 1 of 20 total questions