This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 426148

Summary: Cannot share my printer
Product: [Fedora] Fedora Reporter: Dawid Zamirski <dzrudy>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 8   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 1.3.5-2.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-27 02:18:43 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 235704    
Attachments:
Description Flags
CUPS error log.
none
cupsd.conf
none
error_log after performing the steps in comment #7 none

Description Dawid Zamirski 2007-12-18 15:03:52 EST
Description of problem:
My printer is not visible on the local network after sharing it using
system-config-printer on the host machine. I have to restart cups service on the
host machine to make it visible to the client machines. Any changes in
system-config-printer make it disappear until cups service is restarted.

Version-Release number of selected component (if applicable):
cups-1.3.4-4.fc8
system-config-printer-0.7.74.4-3.fc8

How reproducible:
Always

Steps to Reproduce:
1. Open system-config-printer on the host machine and enable printer sharing
2. After pressing Apply button, several "cupsdAuthorize: Local authentication
certificate not found" messages appear in cups error_log.
3. Open system-config-printer on a client machine, and the shared printer is not
visible.
  
Actual results:
The printer does not appear in system-config-printer of a client machine.

Expected results:
The shared printer should be available in Remote Printers section of
system-config-printer on a client machine.

Additional info:
Restarting cups service on the host machine makes the printer visible to client
machines. However, after using the system-config-printer on the host machine and
applying any changes makes shared printer disappear until cups service is
restarted again.
Comment 1 Tim Waugh 2007-12-20 07:11:46 EST
I need some additional files and pieces of information:

1. Please attach the error_log containing the messages
2. Please attach /etc/cups/cupsd.conf
3. Which checkbox are you referring to by "enable printer sharing": is this the
"Share published printers connected to this system" checkbox in the Server
Settings page, or a different one?
Comment 2 Dawid Zamirski 2008-01-07 15:52:12 EST
Created attachment 291009 [details]
CUPS error log.

CUPS error log after disabling and the enabling the 'Share published printers
connected to this system' check box. Notice the cupsdAuthorize errors at the
end of the file.
Comment 3 Dawid Zamirski 2008-01-07 15:56:23 EST
Created attachment 291010 [details]
cupsd.conf

My current cupsd.conf file - it was never edited manually - only through
s-c-printer.
Comment 4 Dawid Zamirski 2008-01-07 16:01:09 EST
Yes, I'm referring to the "Share published printers connected to this system"
checkbox. Everytim I change its state I get cupsdAuthorize errors in the log
file and the printer diappears on the client machine. Only restarting cups
service makes it re-appear. Also, the printer is not visible right after system
reboot - I have to restart cups service manually in s-c-services so that the
printer is visible to client machines.
Comment 5 Dawid Zamirski 2008-01-07 16:05:01 EST
I have just noticed the following lines in my "messages" log after restarting
cups service. I'm not sure if these are related:

Jan  7 15:54:33 athlon64 cupsd[16673]: *** WARNING *** The program 'cupsd' uses
the Apple Bonjour compatibility layer of Avahi.
Jan  7 15:54:33 athlon64 cupsd[16673]: *** WARNING *** Please fix your
application to use the native API of Avahi!
Jan  7 15:54:33 athlon64 cupsd[16673]: *** WARNING *** For more information see
<http://0pointer.de/avahi-compat?s=libdns_sd&e=cupsd>
Comment 6 Tim Waugh 2008-01-10 13:03:42 EST
They are not related.
Comment 7 Tim Waugh 2008-01-11 12:18:01 EST
What does 'ls -l /var/run/cups/certs/' say?

I have to say I cannot get this to happen here.  Please turn *on* the "Save
debugging information for troubleshooting" checkbox and turn *off* the "Share
published printers connected to this system" checkbox, apply the changes and
close system-config-printer.  Then, run a terminal window and become root using
'su -' and:

1. Stop CUPS

/sbin/service cups stop

2. Clear the error log

>/var/log/cups/error_log

3. Start CUPS again

/sbin/service cups start

Please follow the steps you use to cause this problem to occur, and attach the
resulting /var/log/cups/error_log file.  Thanks.
Comment 8 Dawid Zamirski 2008-01-12 18:41:04 EST
[root@athlon64 /]# ls -l /var/run/cups/certs/
total 8
-r--r-----+ 1 root sys 32 2008-01-12 18:28 0
[root@athlon64 /]#
Comment 9 Dawid Zamirski 2008-01-12 18:45:08 EST
Created attachment 291480 [details]
error_log after performing the steps in comment #7
Comment 10 Tim Waugh 2008-01-15 12:47:54 EST
The "Local authentication certificate not found" message is due to the CUPS
server removing all its local certificates when it stops and re-reads its
configuration, and this is harmless.

So we are left with the problem that your shared printers do not show up to clients.

How long have you tried leaving it before checking that the client has
discovered the shared printers?  It may take up to 30 seconds.
Comment 11 Dawid Zamirski 2008-01-17 01:19:57 EST
I have made several tests today and the printer remains invisible even if I wait
for more than 30s. 

What I have found today, is that when using the cups web interface on
localhost:631 changing the state of the checkbox works ok - the printer is made
visible to the clients immediately. When applying changes to the "Share
published printers.." checkbox, in the web interface, there's a message that the
cups server is being restarted - that's probably why it works. Also there's no
"Local authentication certificate not found" messages in the logs.
Comment 12 Tim Waugh 2008-01-18 10:12:59 EST
The 'cups server being restarted' message isn't really different at all -- the
CUPS server restarts when the settings are changed.  Nonetheless, I will make a
test update of system-config-printer that avoids these 'certificate not found'
messages, and we can see if that makes a difference.  You will see a note here
when that update is ready.

In the mean time, starting from printers not being shared, does 'cupsctl
--share-printers' have the same effect as using system-config-printer, or as
using the web interface?
Comment 13 Dawid Zamirski 2008-01-18 14:23:49 EST
Nope, cupsctl --share-printers does not work - the printer remains invisible -
and there's no 'certificate not found' in the logs when using cupctl.
Comment 14 Tim Waugh 2008-01-21 08:10:01 EST
Please try the test update, which I believe should fix this problem:

  yum --enablerepo=updates-testing update 'cups*'
Comment 15 Dawid Zamirski 2008-01-21 14:11:42 EST
Yes, the cups version from updates-testing repo works!  Thank you! :-)
Comment 16 Fedora Update System 2008-01-22 10:31:21 EST
cups-1.3.5-2.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update cups'
Comment 17 Fedora Update System 2008-01-27 02:18:33 EST
cups-1.3.5-2.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.