FS#31618 - [cups] cupsd doesnt start / avahi_client_get_hostname (2)

Attached to Project: Arch Linux
Opened by Stefan Förster (HotblackDesiato) - Thursday, 20 September 2012, 16:45 GMT
Last edited by Andreas Radke (AndyRTR) - Saturday, 20 October 2012, 17:27 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No



This bug seems to be similar to #31009.

It concerns the current version of cupsd (1.6.1-6) on two different machines (x86_64 and 686).

In my home network, one of my printers is connected to my living room PC (x86_64, Arch Linux). The option "Share printers connected to this system" in the web interface was set before the latest cups update. After the update my wife complained that she "no longer sees the printer" on her notebook (686, Arch Linux). I went in the Administration tab of the web interface and the tickmark was gone (which btw. would also be a bug that an update changes the config file...). So I ticked the box and received the message "please stand by while the server restarts", but it fails. After a few seconds I get the browser message that there is no connection to localhost:631.

Comparing the new config file with the original one is cumbersome, since cupsd strips all the comments etc. I don't see where the mistake in the config file written by cupsd is. Attached are the original, working config file ("cupsd.conf.bak") and the corrupt one written by cupsd ("cupsd.conf").

When I start cupsd manually, I get the same error message, as in error message  FS#31009 , but adding "Allow @LOCAL" options don't help.

[root@wozi cups]# cupsd -f
Unknown directive DefaultAuthType on line 86.
cupsd: client.c:757: avahi_client_get_host_name: Assertion `client' failed.

Removing the Unknown Directive DefaultAuthType (that btw. cups wrote this unkown directive into the config file, I had deleted it in the original, working config file...), doesn't help.

Steps to reproduce:
1. Install cups
2. Use my cupsd.config.bak config file
3. start the server: /etc/rc.d/cupsd start
4. open browser with http://localhost:631
5. switch to Administration Tab
6. click the check box "Share printers connected to the system"
7. click on save configuration
8. see that the server fails to restart
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Saturday, 20 October 2012, 17:27 GMT
Reason for closing:  Not a bug
Comment by Stefan Förster (HotblackDesiato) - Thursday, 20 September 2012, 16:49 GMT
... and here are the files.
Comment by Stefan Förster (HotblackDesiato) - Thursday, 20 September 2012, 16:51 GMT
2nd try for the file "cupsd.conf.bak"
Comment by Stefan Förster (HotblackDesiato) - Thursday, 20 September 2012, 16:53 GMT
Sorry for the mess, but it the file "cupsd.con.bak" doesn't get stored. I renamed it now to config-file. Maybe that helps.

config-file: this is the file that works
cupsd.conf: this is the corrup file written after saving of configuration via the web interface
Comment by Stefan Förster (HotblackDesiato) - Saturday, 22 September 2012, 03:49 GMT
Additional remark: On my desktop PC I have the same cups version 1.6.1 under Gentoo Linux. This installation doesn't show this bug! I can change the "share printer" setting in the web interface, click on the "save configuration" and cupsd restarts. It seems that this bug is Arch Linux specific.

I even tried to use the cupsd.conf file of my Gentoo installation on one of my Arch Linux machines (I only changed SystemGroup from "lpadmin" to "sys root" as used by Arch Linux), but cupsd still failed with the above error message.
Comment by Victor Aurélio (hotvic) - Tuesday, 16 October 2012, 04:50 GMT
your avahi-daemon is started ?
# rc.d start avahi-daemon

cups not start if "Share printers connected to the system" enabled and avahi-daemon is stoped
Comment by Stefan Förster (HotblackDesiato) - Saturday, 20 October 2012, 14:32 GMT
Sorry for my very belated reply, but I had been very busy in the last weeks and I had recently been on a longer business trip... thanks for reopening the bug.

I have checked and actually avahi-daemon wasn't running! I started it and I could change the settings now, thanks.

But how come can cupsd start without the avahi daemon during boot? Printing is also possible w/o a running avahi daemon, but it isn't possible to change the settings with the web frontend.

The bug report can be closed now. Thanks for your patience.