View previous topic :: View next topic |
Author |
Message |
cavernico n00b
Joined: 27 Dec 2020 Posts: 71
|
Posted: Thu Mar 14, 2024 2:16 am Post subject: [SOLVED] avahi not running but it is |
|
|
Hi everybody, i have trouble getting avahi-daemon to run, when i check rc-service avahi-daemon status it say it's running Code: | rc-service avahi-daemon status
* status: started |
but when i try to avahi-browse -a
Code: | avahi-browse -a
Failed to create client object: Daemon not running
|
So i try manualy: Code: | sudo rc-service avahi-daemon start
* WARNING: avahi-daemon has already been started |
or Code: | avahi-discover
Failed to connect to Avahi Server (Is it running?): org.freedesktop.DBus.Error.Spawn.FileInvalid: Cannot do system-bus activation with no user |
my info https://bpa.st/F2JA
I have another gentoo machine, and avahi just works fine. Just don't know where to look after hours and hours finding info in the net.
thanks.
Last edited by cavernico on Wed Mar 20, 2024 2:15 pm; edited 1 time in total |
|
Back to top |
|
|
flexibeast Guru
Joined: 04 Apr 2022 Posts: 452 Location: Naarm/Melbourne, Australia
|
Posted: Fri Mar 15, 2024 1:05 am Post subject: |
|
|
Can you please confirm that the `dbus` service, which provides the D-Bus system bus, is actually running? |
|
Back to top |
|
|
cavernico n00b
Joined: 27 Dec 2020 Posts: 71
|
Posted: Fri Mar 15, 2024 3:07 am Post subject: |
|
|
flexibeast wrote: | Can you please confirm that the `dbus` service, which provides the D-Bus system bus, is actually running? |
yes, was the firsrt thing i check.
Code: | rc-service dbus status
* status: started
|
|
|
Back to top |
|
|
flexibeast Guru
Joined: 04 Apr 2022 Posts: 452 Location: Naarm/Melbourne, Australia
|
Posted: Fri Mar 15, 2024 3:38 am Post subject: |
|
|
Okay, great. It's good that you checked that; in future, when you post questions about a problem, could you please make sure to say what checks you've already done?
Have you also checked that there's actually an `avahi-daemon` process running, e.g. by doing `pgrep -a avahi-daemon`? The service might be immediately crashing after OpenRC considers it to have been successfully started, which will leave OpenRC thinking it's still running when it's not. |
|
Back to top |
|
|
cavernico n00b
Joined: 27 Dec 2020 Posts: 71
|
Posted: Fri Mar 15, 2024 7:38 pm Post subject: |
|
|
flexibeast wrote: | Okay, great. It's good that you checked that; in future, when you post questions about a problem, could you please make sure to say what checks you've already done?
Have you also checked that there's actually an `avahi-daemon` process running, e.g. by doing `pgrep -a avahi-daemon`? The service might be immediately crashing after OpenRC considers it to have been successfully started, which will leave OpenRC thinking it's still running when it's not. |
Thanks for the reply, i don't know why dbus is so important for avahi to work, i didn't say anything about dbus because it's beyond my knowledge. I also check my rc.conf but nothing that i can tell if is off or not.
Code: | pgrep -a avahi-daemon
1874 avahi-daemon: running [Gent-msi.local]
1875 avahi-daemon: chroot helper |
This is what i already try and search over the internet, also some tweeks in nnsswitch.conf. "hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4"
Code: | avahi-browse -a
Failed to create client object: Daemon not running |
Code: | avahi-discover
Failed to connect to Avahi Server (Is it running?): org.freedesktop.DBus.Error.Spawn.FileInvalid: Cannot do system-bus activation with no user |
|
|
Back to top |
|
|
flexibeast Guru
Joined: 04 Apr 2022 Posts: 452 Location: Naarm/Melbourne, Australia
|
Posted: Sat Mar 16, 2024 1:08 am Post subject: |
|
|
cavernico wrote: | i don't know why dbus is so important for avahi to work, i didn't say anything about dbus because it's beyond my knowledge. |
D-Bus provides a standard interface for software to query and control various aspects of the system, e.g. hardware and services, without being tied to any particular user environment (GUI / WM / DE etc.). Prior to moving from Void to Gentoo, i wrote a quick introduction to why D-Bus exists and what it does: https://github.com/flexibeast/guides/blob/master/dbus.md
i've just done some experiments on my own system, and i too get this:
Code: | avahi-browse -a
Failed to create client object: Daemon not running |
when there's no socket "/var/run/dbus/system_bus_socket". Does that file exist on your system? |
|
Back to top |
|
|
cavernico n00b
Joined: 27 Dec 2020 Posts: 71
|
Posted: Wed Mar 20, 2024 2:19 pm Post subject: |
|
|
Well, in fact in avahi-daemon.conf i had i changed to yes and avahi is back to work and discover printers.
Thanks for your help flexibeast |
|
Back to top |
|
|
|