You are not logged in.

#1 2022-05-24 13:46:40

kashishme
Member
Registered: 2021-01-08
Posts: 154

Printer not getting connected due to some issue in avahi

I posted this before, but i personally wasn't clear with the issue and no one replied on my post after i found out the issue. The problem seems to be in avahi as it even shows up during my startup, here is the journalctl command for avahi, which will explain the issue: http://ix.io/3Yv8.

I wanted to try to try wireless setup but the same issue with avahi pops up. This has started showing up after a system update, i can't find the exact date but i am sure the issue with printer and avahi started at the same time.

Also, here is the link to my last post: https://bbs.archlinux.org/viewtopic.php?id=276473
and also my reddit post: https://www.reddit.com/r/archlinux/comm … r_printer/

I apologize if this isn't allowed but no one has replied to my post even though i cleared out the details (as it wasn't very good at first)

fyi: my printer is brother dcp-t420

Offline

#2 2022-05-24 14:14:17

seth
Member
Registered: 2012-09-03
Posts: 29,717

Re: Printer not getting connected due to some issue in avahi

Please don't ever use "-x", it makes the output an unreadable mess.

systemctl status avahi-daemon
sudo avahi-daemon -s

Offline

#3 2022-05-24 14:25:33

kashishme
Member
Registered: 2021-01-08
Posts: 154

Re: Printer not getting connected due to some issue in avahi

seth wrote:

Please don't ever use "-x", it makes the output an unreadable mess.

systemctl status avahi-daemon
sudo avahi-daemon -s

the output of 'systemctl status avahi-daemon': http://ix.io/3Yvg

and there is no output for 'sudo avahi-daemon -s'

Offline

#4 2022-05-24 14:29:26

seth
Member
Registered: 2012-09-03
Posts: 29,717

Re: Printer not getting connected due to some issue in avahi

Does avahi-demon keep running or does it terminate immediately when you run it manually?

Offline

#5 2022-05-24 14:32:05

kashishme
Member
Registered: 2021-01-08
Posts: 154

Re: Printer not getting connected due to some issue in avahi

seth wrote:

Does avahi-demon keep running or does it terminate immediately when you run it manually?

it just terminates

Offline

#6 2022-05-24 14:37:03

seth
Member
Registered: 2012-09-03
Posts: 29,717

Re: Printer not getting connected due to some issue in avahi

sudo avahi-daemon --debug

Offline

#7 2022-05-24 14:42:07

kashishme
Member
Registered: 2021-01-08
Posts: 154

Re: Printer not getting connected due to some issue in avahi

seth wrote:
sudo avahi-daemon --debug

that is weird, when i put the command, it shows

Failed to find user 'avahi'.

Offline

#8 2022-05-24 14:52:30

seth
Member
Registered: 2012-09-03
Posts: 29,717

Re: Printer not getting connected due to some issue in avahi

pacman -Qikk avahi
cat /usr/lib/sysusers.d/avahi.conf
sudo journalctl -b | grep -i avahi

Offline

#9 2022-05-25 13:23:20

kashishme
Member
Registered: 2021-01-08
Posts: 154

Re: Printer not getting connected due to some issue in avahi

seth wrote:
pacman -Qikk avahi
cat /usr/lib/sysusers.d/avahi.conf
sudo journalctl -b | grep -i avahi

'pacman -Qikk avahi': http://ix.io/3Yz3
'cat /usr/lib/sysusers.d/avahi.conf': http://ix.io/3Yz4
'sudo journalctl -b | grep -i avahi': http://ix.io/3Yz5

Last edited by kashishme (2022-05-25 13:23:33)

Offline

#10 2022-05-25 13:54:34

seth
Member
Registered: 2012-09-03
Posts: 29,717

Re: Printer not getting connected due to some issue in avahi

systemctl status systemd-sysusers.service
systemd-sysusers --cat-config | grep avahi
systemd-sysusers --dry-run

Offline

#11 2022-05-26 13:25:56

kashishme
Member
Registered: 2021-01-08
Posts: 154

Re: Printer not getting connected due to some issue in avahi

seth wrote:
systemctl status systemd-sysusers.service
systemd-sysusers --cat-config | grep avahi
systemd-sysusers --dry-run

'systemctl status systemd-sysusers.service':

● systemd-sysusers.service - Create System Users
     Loaded: loaded (/usr/lib/systemd/system/systemd-sysusers.service; static)
     Active: active (exited) since Thu 2022-05-26 18:43:33 IST; 9min ago
       Docs: man:sysusers.d(5)
             man:systemd-sysusers.service(8)
    Process: 255 ExecStart=systemd-sysusers (code=exited, status=0/SUCCESS)
   Main PID: 255 (code=exited, status=0/SUCCESS)
        CPU: 7ms

Warning: some journal files were not opened due to insufficient permissions.

'systemd-sysusers --cat-config | grep avahi':

# /usr/lib/sysusers.d/avahi.conf
u avahi - "Avahi mDNS/DNS-SD daemon"

'systemd-sysusers --dry-run':

 
Would write /etc/group…
Would write /etc/gshadow…

Offline

#12 2022-05-26 13:32:42

seth
Member
Registered: 2012-09-03
Posts: 29,717

Re: Printer not getting connected due to some issue in avahi

There's no apparent issue whatsoever… sure the user isn't there?

grep avahi /etc/passwd

Offline

#13 2022-05-26 13:41:51

kashishme
Member
Registered: 2021-01-08
Posts: 154

Re: Printer not getting connected due to some issue in avahi

seth wrote:

There's no apparent issue whatsoever… sure the user isn't there?

grep avahi /etc/passwd

here is the output it shows:

avahi:x:975:975:Avahi mDNS/DNS-SD daemon:/:/usr/bin/nologin

Offline

#14 2022-05-26 13:57:34

seth
Member
Registered: 2012-09-03
Posts: 29,717

Re: Printer not getting connected due to some issue in avahi

The user is there, though I don't think this is created by sysusers…
Post the /etc/passwd (there're no passwords in there) - you can obfuscate private information about your user, but nothing else (ideally you'd upload the file in case there's some stray whitespace in there, but let's first see whether there's sth. obvious)

WIld guess

avahi:x:975:975:avahi:/:/usr/bin/nologin

Offline

#15 2022-05-26 14:09:33

kashishme
Member
Registered: 2021-01-08
Posts: 154

Re: Printer not getting connected due to some issue in avahi

seth wrote:

The user is there, though I don't think this is created by sysusers…
Post the /etc/passwd (there're no passwords in there) - you can obfuscate private information about your user, but nothing else (ideally you'd upload the file in case there's some stray whitespace in there, but let's first see whether there's sth. obvious)

WIld guess

avahi:x:975:975:avahi:/:/usr/bin/nologin

here: http://ix.io/3YDn

Offline

#16 2022-05-26 14:21:16

seth
Member
Registered: 2012-09-03
Posts: 29,717

Re: Printer not getting connected due to some issue in avahi

There's nothing wrong and your user (UID 1000) is behind the avahi entry.
However…

/bin/fish

Change the login shell for root to bash and make absolutely sure that /bin/sh doesn't symlink fish.
If after a reboot avahi-daemon still isn't running, log into a console (ctrl+alt+f1) as root (with a bash shell) and try to start "avahi-daemon --debug" there.

Offline

#17 2022-05-26 14:32:28

kashishme
Member
Registered: 2021-01-08
Posts: 154

Re: Printer not getting connected due to some issue in avahi

seth wrote:

There's nothing wrong and your user (UID 1000) is behind the avahi entry.
However…

/bin/fish

Change the login shell for root to bash and make absolutely sure that /bin/sh doesn't symlink fish.
If after a reboot avahi-daemon still isn't running, log into a console (ctrl+alt+f1) as root (with a bash shell) and try to start "avahi-daemon --debug" there.

how do i ensure that symlink doesn't happen?
btw changing the shell didn't work

Offline

#18 2022-05-26 14:33:44

seth
Member
Registered: 2012-09-03
Posts: 29,717

Re: Printer not getting connected due to some issue in avahi

stat /bin/sh

What do you mean by "changing the shell didn't work"? You failed to chsh for root?

Offline

#19 2022-05-26 14:41:58

kashishme
Member
Registered: 2021-01-08
Posts: 154

Re: Printer not getting connected due to some issue in avahi

seth wrote:
stat /bin/sh

What do you mean by "changing the shell didn't work"? You failed to chsh for root?

i mean i changed the shell for root to bash but avahi still gives the same errors

Offline

#20 2022-05-26 16:27:33

progandy
Member
Registered: 2012-05-17
Posts: 4,965

Re: Printer not getting connected due to some issue in avahi

Please also try to check if the user can be found through api calls and not only in the passwd file:

getent passwd avahi

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#21 2022-05-27 07:58:15

kashishme
Member
Registered: 2021-01-08
Posts: 154

Re: Printer not getting connected due to some issue in avahi

progandy wrote:

Please also try to check if the user can be found through api calls and not only in the passwd file:

getent passwd avahi

this is the output:

avahi:x:975:975:Avahi mDNS/DNS-SD daemon:/:/usr/bin/nologin

so i guess the user does get found

Offline

#22 2022-05-27 08:01:31

seth
Member
Registered: 2012-09-03
Posts: 29,717

Re: Printer not getting connected due to some issue in avahi

Can you please post the verbatim input/output from an attempt to start "sudo avahi-daemon --debug"?

Offline

#23 2022-05-27 13:38:20

kashishme
Member
Registered: 2021-01-08
Posts: 154

Re: Printer not getting connected due to some issue in avahi

seth wrote:

Can you please post the verbatim input/output from an attempt to start "sudo avahi-daemon --debug"?

verbatim?

Offline

#24 2022-05-27 14:15:37

seth
Member
Registered: 2012-09-03
Posts: 29,717

Re: Printer not getting connected due to some issue in avahi

Word by word - not sth. like "it says that …"
https://en.wiktionary.org/wiki/verbatim

Offline

#25 2022-05-27 14:18:12

kashishme
Member
Registered: 2021-01-08
Posts: 154

Re: Printer not getting connected due to some issue in avahi

seth wrote:

Word by word - not sth. like "it says that …"
https://en.wiktionary.org/wiki/verbatim

oh alright, just a sec

Offline

Board footer

Powered by FluxBB