cupsd failed to create /var/run/cups/cups.sock, skipping automatic printer configuration

Bug #933308 reported by Steve Langasek
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Fix Released
Medium
Unassigned
upstart (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

With upstart logging enabled, the cups upstart job routinely spits the following error out to /var/log/upstart/cups.log:

  cupsd failed to create /var/run/cups/cups.sock, skipping automatic printer configuration

Indeed, cups seems to get around to creating the socket several seconds after the cups post-start script stops waiting for it.

$ ls -l --full-time /var/log/upstart/cups.log
-rw-r----- 1 root root 90 2012-02-15 22:23:01.937144478 -0800 /var/log/upstart/cups.log
$ ls -l --full-time /var/run/cups/cups.sock
srwxrwxrwx 1 root root 0 2012-02-15 22:23:13.261144768 -0800 /var/run/cups/cups.sock
$

So it doesn't look like a 3 second timeout is realistically long enough here.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: cups 1.5.2-3
ProcVersionSignature: Ubuntu 3.2.0-16.25-generic 3.2.6
Uname: Linux 3.2.0-16-generic x86_64
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
CheckboxSubmission: 017452a27eca3c8b498abbfa5ef91db9
CheckboxSystem: ecaaad6fa1e0799a0aa1126bf620f39e
Date: Thu Feb 16 00:03:35 2012
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
Lpstat:
 device for davidson-printer: smb://WORKGROUP/EXCALIBUR/Printer2
 device for HP-Color-LaserJet-CM1312-MFP: hp:/usb/HP_Color_LaserJet_CM1312_MFP?serial=00CNB882VG58
 device for HP-PSC-750: ipp://207.224.24.210:631/printers/PSC_750
 device for HP-PSC-750-legal: ipp://207.224.24.210:631/printers/PSC_750
MachineType: LENOVO 3249CTO
Papersize: letter
PpdFiles:
 HP-PSC-750: HP PSC 750, hpcups 3.12.2
 davidson-printer: HP Color LaserJet CP3505 Postscript (recommended)
 HP-Color-LaserJet-CM1312-MFP: HP Color LaserJet CM1312 MFP Series Postscript (recommended)
 HP-PSC-750-legal: HP PSC 750, hpcups 3.12.2
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.2.0-16-generic root=/dev/mapper/hostname-root ro pcie_aspm=force i915.i915_enable_rc6=1 quiet splash vt.handoff=7
SourcePackage: cups
UpgradeStatus: Upgraded to precise on 2011-11-08 (99 days ago)
dmi.bios.date: 08/23/2010
dmi.bios.vendor: LENOVO
dmi.bios.version: 6QET52WW (1.22 )
dmi.board.name: 3249CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr6QET52WW(1.22):bd08/23/2010:svnLENOVO:pn3249CTO:pvrThinkPadX201:rvnLENOVO:rn3249CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 3249CTO
dmi.product.version: ThinkPad X201
dmi.sys.vendor: LENOVO
modified.conffile..etc.cups.cupsd.conf: [modified]
modified.conffile..etc.default.cups: [modified]
mtime.conffile..etc.cups.cupsd.conf: 2011-08-09T08:12:10.630009
mtime.conffile..etc.default.cups: 2010-09-25T01:44:40.784776

Revision history for this message
Steve Langasek (vorlon) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cups (Ubuntu):
status: New → Confirmed
Revision history for this message
Stefan Pappalardo (sjuk) wrote :

I can confirm

$ sudo zcat cups.log.*
cupsd failed to create /var/run/cups/cups.sock, skipping automatic printer configuration
cupsd failed to create /var/run/cups/cups.sock, skipping automatic printer configuration
cupsd failed to create /var/run/cups/cups.sock, skipping automatic printer configuration
cupsd failed to create /var/run/cups/cups.sock, skipping automatic printer configuration
cupsd failed to create /var/run/cups/cups.sock, skipping automatic printer configuration
cupsd failed to create /var/run/cups/cups.sock, skipping automatic printer configuration
cupsd failed to create /var/run/cups/cups.sock, skipping automatic printer configuration
cupsd failed to create /var/run/cups/cups.sock, skipping automatic printer configuration

Revision history for this message
dino99 (9d9) wrote :

Still get that error on RR i386, logged inside /var/log/upstart/cups.log

tags: added: i386 raring
Revision history for this message
DmitryKX (alex-custov) wrote :

Confirm this in 13.04

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Can everyone with this problem edit /etc/init/cups.conf replacing the line (near the end)

timeout=6

by

timeout=60

After that, reboot your machine. Check whether no new "cupsd failed to create /var/run/cups/cups.sock, skipping automatic printer configuration" message gets added to /var/log/upstart/cups.log and whether the boot time (BIOS screen to login screen) does not get significantly longer.

Tell us your results here.

Changed in cups (Ubuntu):
status: Confirmed → Incomplete
dino99 (9d9)
tags: added: saucy
Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 933308] Re: cupsd failed to create /var/run/cups/cups.sock, skipping automatic printer configuration

On Fri, Jul 19, 2013 at 10:29:56AM -0000, Till Kamppeter wrote:
> Can everyone with this problem edit /etc/init/cups.conf replacing the
> line (near the end)

> timeout=6

> by

> timeout=60

> After that, reboot your machine. Check whether no new "cupsd failed to
> create /var/run/cups/cups.sock, skipping automatic printer
> configuration" message gets added to /var/log/upstart/cups.log and

I'll let someone else do this. I'm more concerned about fixing the
underlying upstart bug, so that the post-start wait loop can go away
entirely. ;)

> whether the boot time (BIOS screen to login screen) does not get
> significantly longer.

It won't. lightdm does not wait for cups.

Revision history for this message
dino99 (9d9) wrote :

change made on saucy i386 : timeout=60
then rebooted
results:
- does not get a new ../upstart/cups.log; seems to be logged randomly only: does not get with each reboot, nor each day, even the system boot 1 or more times each day.
- ../upstart/avahi-cups-reload.log : reload: Not running

note: the printer (hp photosmart 4850) is powered off while booting; and only powered on when needed (wired connected)

Changed in cups (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

In the next CUPS package release in Saucy the timeout will be increased to 60 (= 30 sec). Then this problem should go away. But note that the real fix needs to get done in Upstart.

Changed in upstart (Ubuntu):
status: New → Confirmed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Adding upstart task as Steve Langasek tells in comment #7 that an Upstart bug needs to get fixed to eliminate the need of a wait loop.

Revision history for this message
Steve Langasek (vorlon) wrote :

However, there are other bug reports open already for tracking the upstart issue, and this bug is not a duplicate of those. So closing the upstart task anyway.

Changed in upstart (Ubuntu):
status: Confirmed → Invalid
Changed in cups (Ubuntu):
importance: Undecided → Medium
Changed in upstart (Ubuntu):
importance: Undecided → Medium
Changed in cups (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 1.7.0~rc1-0ubuntu3

---------------
cups (1.7.0~rc1-0ubuntu3) saucy; urgency=low

  * debian/local/cups-daemon.cups.upstart: Increased timeout for waiting for
    the CUPS daemon to get ready before automatically configuring printers
    from 3 sec to 30 sec, on slower systems CUPS often needs more than 3
    seconds and so the automatic printer configuration does not get done
    (LP: #933308).
  * debian/cups.dirs: Create empty /etc/cups/interfaces directory
    (LP: #499585).
 -- Till Kamppeter <email address hidden> Wed, 18 Sep 2013 18:51:01 +0200

Changed in cups (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers