japtar
October 9th, 2022, 05:57 AM
Hello. Dunno if this is the best place to ask this question, but I've recently installed Ubuntu 22.04.1 LTS server edition to my Mac Mini (I think it's circa 2012 model, very old) to hopefully host some home network services like NextCloud on Kubernetes. I installed avahi-daemon yesterday, and was able to ping+ssh to the server at hostname.local, both via ethernet and wifi after installing bcmwl-kernel-source drivers. Today, I'm unable to ping to hostname.local, and am currently using IP address instead, which is rather cumbersome. I've searched online for some solutions without much avail, so I figured I'd ask here to tackle some potential solutions I may have missed in my search.
$ ping hostname.local
ping: hostname.local: Name or service not known
$ ping -c 3 10.0.0.170
PING 10.0.0.170 (10.0.0.170) 56(84) bytes of data.
64 bytes from 10.0.0.170: icmp_seq=1 ttl=64 time=0.452 ms
64 bytes from 10.0.0.170: icmp_seq=2 ttl=64 time=0.357 ms
64 bytes from 10.0.0.170: icmp_seq=3 ttl=64 time=0.429 ms
--- 10.0.0.170 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2037ms
rtt min/avg/max/mdev = 0.357/0.412/0.452/0.040 ms
I dunno if this helps, but here's the avahi-daemon status:
$ sudo systemctl status avahi-daemon.service
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2022-10-09 03:48:58 UTC; 2s ago
TriggeredBy: ● avahi-daemon.socket
Main PID: 193153 (avahi-daemon)
Status: "avahi-daemon 0.8 starting up."
Tasks: 2 (limit: 4426)
Memory: 832.0K
CPU: 8ms
CGroup: /system.slice/avahi-daemon.service
├─193153 "avahi-daemon: running [hostname.local]"
└─193154 "avahi-daemon: chroot helper"
Oct 09 03:48:58 hostname avahi-daemon[193153]: Successfully dropped remaining capabilities.
Oct 09 03:48:58 hostname avahi-daemon[193153]: No service file found in /etc/avahi/services.
Oct 09 03:48:58 hostname avahi-daemon[193153]: Joining mDNS multicast group on interface enp3s0f0.IPv6 with address 2601:249:8300:cc30::4ff1.
Oct 09 03:48:58 hostname avahi-daemon[193153]: New relevant interface enp3s0f0.IPv6 for mDNS.
Oct 09 03:48:58 hostname avahi-daemon[193153]: Joining mDNS multicast group on interface enp3s0f0.IPv4 with address 10.0.0.170.
Oct 09 03:48:58 hostname avahi-daemon[193153]: New relevant interface enp3s0f0.IPv4 for mDNS.
Oct 09 03:48:58 hostname avahi-daemon[193153]: Network interface enumeration completed.
Oct 09 03:48:58 hostname avahi-daemon[193153]: Registering new address record for 2601:249:8300:cc30::4ff1 on enp3s0f0.*.
Oct 09 03:48:58 hostname avahi-daemon[193153]: Registering new address record for 10.0.0.170 on enp3s0f0.IPv4.
Oct 09 03:48:59 hostname avahi-daemon[193153]: Server startup complete. Host name is hostname.local. Local service cookie is 66651886.
I did try editing /etc/avahi/avahi-daemon.conf:
[server]
use-ipv4=yes
use-ipv6=yes
allow-interfaces=enp3s0f0, wlp2s0
ratelimit-interval-usec=1000000
ratelimit-burst=1000
[wide-area]
enable-wide-area=yes
[publish]
publish-addresses=yes
publish-hinfo=no
publish-workstation=no
[reflector]
[rlimits]
I don't see avahi in netstat, which I'm not sure what that means:
$ netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 localhost:49674 localhost:9099 TIME_WAIT
tcp 0 0 localhost:55944 localhost:19001 ESTABLISHED
tcp 0 0 hostname:36420 10.1.111.201:http-alt TIME_WAIT
tcp 0 0 hostname:35074 10.1.111.193:8000 TIME_WAIT
tcp 0 0 localhost:35836 localhost:9099 TIME_WAIT
tcp 0 0 hostname:40492 10.152.183.1:https ESTABLISHED
tcp 0 0 hostname:57582 10.1.111.193:8000 ESTABLISHED
tcp 0 0 localhost:60220 localhost:9099 TIME_WAIT
tcp 0 0 localhost:42660 localhost:9099 TIME_WAIT
tcp 0 0 localhost:54596 localhost:9099 TIME_WAIT
tcp 0 0 localhost:60208 localhost:9099 TIME_WAIT
tcp 0 0 localhost:42676 localhost:9099 TIME_WAIT
tcp 0 0 hostname:40456 10.152.183.1:https ESTABLISHED
tcp 0 0 localhost:47928 localhost:9099 TIME_WAIT
tcp 0 164 hostname:ssh 10.0.0.92:34076 ESTABLISHED
tcp 0 0 hostname:41170 10.152.183.181:https ESTABLISHED
tcp 0 0 localhost:43154 localhost:9099 TIME_WAIT
tcp 0 0 hostname:59192 10.1.111.201:8181 TIME_WAIT
tcp 0 0 localhost:47920 localhost:9099 TIME_WAIT
tcp 0 0 localhost:54594 localhost:9099 TIME_WAIT
tcp 0 0 localhost:19001 localhost:55944 ESTABLISHED
tcp 0 0 localhost:40980 localhost:16443 ESTABLISHED
tcp 0 0 localhost:43168 localhost:9099 TIME_WAIT
tcp 0 0 hostname:40446 10.152.183.1:https ESTABLISHED
tcp 0 0 hostname:46220 10.1.111.201:8181 TIME_WAIT
tcp 0 0 hostname:59232 10.152.183.181:https ESTABLISHED
tcp 0 0 localhost:40972 localhost:16443 ESTABLISHED
tcp 0 0 localhost:40972 localhost:16443 ESTABLISHED
tcp6 0 0 hostname:16443 10.1.111.198:56934 ESTABLISHED
tcp6 0 0 hostname:16443 10.1.111.200:59272 ESTABLISHED
tcp6 0 0 hostname:16443 hostname:60130 ESTABLISHED
tcp6 0 0 hostname:16443 10.1.111.203:46234 ESTABLISHED
tcp6 0 0 hostname:16443 10.1.111.195:49638 ESTABLISHED
tcp6 0 0 ip6-localhost:45726 ip6-localhost:16443 ESTABLISHED
tcp6 0 0 ip6-localhost:16443 ip6-localhost:45726 ESTABLISHED
tcp6 0 0 localhost:16443 localhost:40980 ESTABLISHED
tcp6 0 0 hostname:16443 hostname:50753 ESTABLISHED
tcp6 0 0 hostname:16443 10.1.111.201:43348 ESTABLISHED
tcp6 0 0 localhost:16443 localhost:40972 ESTABLISHED
tcp6 0 0 hostname:16443 10.1.111.193:42800 ESTABLISHED
tcp6 0 0 hostname:10250 10.1.111.198:48616 ESTABLISHED
tcp6 0 0 hostname:16443 hostname:56562 ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags Type State I-Node Path
<snipping here, avahi doesn't appear in this list, either>
hosts looks...fine to me?
$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 hostname
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
$ ping hostname.local
ping: hostname.local: Name or service not known
$ ping -c 3 10.0.0.170
PING 10.0.0.170 (10.0.0.170) 56(84) bytes of data.
64 bytes from 10.0.0.170: icmp_seq=1 ttl=64 time=0.452 ms
64 bytes from 10.0.0.170: icmp_seq=2 ttl=64 time=0.357 ms
64 bytes from 10.0.0.170: icmp_seq=3 ttl=64 time=0.429 ms
--- 10.0.0.170 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2037ms
rtt min/avg/max/mdev = 0.357/0.412/0.452/0.040 ms
I dunno if this helps, but here's the avahi-daemon status:
$ sudo systemctl status avahi-daemon.service
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2022-10-09 03:48:58 UTC; 2s ago
TriggeredBy: ● avahi-daemon.socket
Main PID: 193153 (avahi-daemon)
Status: "avahi-daemon 0.8 starting up."
Tasks: 2 (limit: 4426)
Memory: 832.0K
CPU: 8ms
CGroup: /system.slice/avahi-daemon.service
├─193153 "avahi-daemon: running [hostname.local]"
└─193154 "avahi-daemon: chroot helper"
Oct 09 03:48:58 hostname avahi-daemon[193153]: Successfully dropped remaining capabilities.
Oct 09 03:48:58 hostname avahi-daemon[193153]: No service file found in /etc/avahi/services.
Oct 09 03:48:58 hostname avahi-daemon[193153]: Joining mDNS multicast group on interface enp3s0f0.IPv6 with address 2601:249:8300:cc30::4ff1.
Oct 09 03:48:58 hostname avahi-daemon[193153]: New relevant interface enp3s0f0.IPv6 for mDNS.
Oct 09 03:48:58 hostname avahi-daemon[193153]: Joining mDNS multicast group on interface enp3s0f0.IPv4 with address 10.0.0.170.
Oct 09 03:48:58 hostname avahi-daemon[193153]: New relevant interface enp3s0f0.IPv4 for mDNS.
Oct 09 03:48:58 hostname avahi-daemon[193153]: Network interface enumeration completed.
Oct 09 03:48:58 hostname avahi-daemon[193153]: Registering new address record for 2601:249:8300:cc30::4ff1 on enp3s0f0.*.
Oct 09 03:48:58 hostname avahi-daemon[193153]: Registering new address record for 10.0.0.170 on enp3s0f0.IPv4.
Oct 09 03:48:59 hostname avahi-daemon[193153]: Server startup complete. Host name is hostname.local. Local service cookie is 66651886.
I did try editing /etc/avahi/avahi-daemon.conf:
[server]
use-ipv4=yes
use-ipv6=yes
allow-interfaces=enp3s0f0, wlp2s0
ratelimit-interval-usec=1000000
ratelimit-burst=1000
[wide-area]
enable-wide-area=yes
[publish]
publish-addresses=yes
publish-hinfo=no
publish-workstation=no
[reflector]
[rlimits]
I don't see avahi in netstat, which I'm not sure what that means:
$ netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 localhost:49674 localhost:9099 TIME_WAIT
tcp 0 0 localhost:55944 localhost:19001 ESTABLISHED
tcp 0 0 hostname:36420 10.1.111.201:http-alt TIME_WAIT
tcp 0 0 hostname:35074 10.1.111.193:8000 TIME_WAIT
tcp 0 0 localhost:35836 localhost:9099 TIME_WAIT
tcp 0 0 hostname:40492 10.152.183.1:https ESTABLISHED
tcp 0 0 hostname:57582 10.1.111.193:8000 ESTABLISHED
tcp 0 0 localhost:60220 localhost:9099 TIME_WAIT
tcp 0 0 localhost:42660 localhost:9099 TIME_WAIT
tcp 0 0 localhost:54596 localhost:9099 TIME_WAIT
tcp 0 0 localhost:60208 localhost:9099 TIME_WAIT
tcp 0 0 localhost:42676 localhost:9099 TIME_WAIT
tcp 0 0 hostname:40456 10.152.183.1:https ESTABLISHED
tcp 0 0 localhost:47928 localhost:9099 TIME_WAIT
tcp 0 164 hostname:ssh 10.0.0.92:34076 ESTABLISHED
tcp 0 0 hostname:41170 10.152.183.181:https ESTABLISHED
tcp 0 0 localhost:43154 localhost:9099 TIME_WAIT
tcp 0 0 hostname:59192 10.1.111.201:8181 TIME_WAIT
tcp 0 0 localhost:47920 localhost:9099 TIME_WAIT
tcp 0 0 localhost:54594 localhost:9099 TIME_WAIT
tcp 0 0 localhost:19001 localhost:55944 ESTABLISHED
tcp 0 0 localhost:40980 localhost:16443 ESTABLISHED
tcp 0 0 localhost:43168 localhost:9099 TIME_WAIT
tcp 0 0 hostname:40446 10.152.183.1:https ESTABLISHED
tcp 0 0 hostname:46220 10.1.111.201:8181 TIME_WAIT
tcp 0 0 hostname:59232 10.152.183.181:https ESTABLISHED
tcp 0 0 localhost:40972 localhost:16443 ESTABLISHED
tcp 0 0 localhost:40972 localhost:16443 ESTABLISHED
tcp6 0 0 hostname:16443 10.1.111.198:56934 ESTABLISHED
tcp6 0 0 hostname:16443 10.1.111.200:59272 ESTABLISHED
tcp6 0 0 hostname:16443 hostname:60130 ESTABLISHED
tcp6 0 0 hostname:16443 10.1.111.203:46234 ESTABLISHED
tcp6 0 0 hostname:16443 10.1.111.195:49638 ESTABLISHED
tcp6 0 0 ip6-localhost:45726 ip6-localhost:16443 ESTABLISHED
tcp6 0 0 ip6-localhost:16443 ip6-localhost:45726 ESTABLISHED
tcp6 0 0 localhost:16443 localhost:40980 ESTABLISHED
tcp6 0 0 hostname:16443 hostname:50753 ESTABLISHED
tcp6 0 0 hostname:16443 10.1.111.201:43348 ESTABLISHED
tcp6 0 0 localhost:16443 localhost:40972 ESTABLISHED
tcp6 0 0 hostname:16443 10.1.111.193:42800 ESTABLISHED
tcp6 0 0 hostname:10250 10.1.111.198:48616 ESTABLISHED
tcp6 0 0 hostname:16443 hostname:56562 ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags Type State I-Node Path
<snipping here, avahi doesn't appear in this list, either>
hosts looks...fine to me?
$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 hostname
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters