cups is unable to listen on network

Bug #303927 reported by Fridtjof Busse
6
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Fix Released
Undecided
Martin Pitt

Bug Description

Binary package hint: cupsys

On hardy, CUPS (cupsys 1.3.7-1ubuntu3.1) is unable to listen on the network.
With the cupsd.conf.default used as cupsd.conf, the errors is this:
E [01/Dec/2008:09:53:21 +0100] Unable to open listen socket for address 127.0.0.1:631 - Permission denied.
E [01/Dec/2008:09:53:21 +0100] Unable to create broadcast socket - Permission denied.

With a modified cupsd.conf (Listen *:631), the error is a bit different:
E [01/Dec/2008:10:31:29 +0100] Unable to open listen socket for address :::631 - Permission denied.
E [01/Dec/2008:10:31:29 +0100] Unable to open listen socket for address 0.0.0.0:631 - Permission denied.
E [01/Dec/2008:10:31:29 +0100] Unable to create broadcast socket - Permission denied.

In both cases, nothing else is bound to port 631. This problem also seems to cause CUPS being unable to detect printers on the network (I'd guess it uses broadcast for this, which does not work).
Please let me know if you need additional information.

Revision history for this message
Fridtjof Busse (fbusse-deactivatedaccount-deactivatedaccount) wrote :

Removing AppArmor from the system seems to have solved the problem. Broken profile?

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

For detecting network printers CUPS uses SNMP and DNS-SD. The error messages you are showing are about IPP (which CUPS uses for communication between clients and the CUPS daemon and also between the local and remote CUPS daemons).

As all this seems to not work for you, your machine seems to have a general networking problem. Can you access the internet? Can you ssh to another machine? Can you ssh from another machine to your machine?

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

Please make sure you have all updates installed. There were probably bugs fixed after the release.

Can you re-install AppArmor and then do

sudo aa-complain cupsd

This way AppArmor does not block anything but it logs what it would block. Can you attach your /var/log/syslog then (or at least all lines containing "audit" in it?

Changed in cupsys:
status: New → Incomplete
assignee: nobody → pitti
Revision history for this message
Fridtjof Busse (fbusse-deactivatedaccount-deactivatedaccount) wrote :

I have all updates installed. Networking is just fine, otherwise I wouldn't have opened a bug.
I can offer SNMP errors as well:

$ sudo grep SNMP /var/log/cups/error_log
....
E [01/Dec/2008:10:18:45 +0100] [CGI] Unable to create SNMP socket - Permission denied
E [01/Dec/2008:10:19:45 +0100] [CGI] Unable to create SNMP socket - Permission denied
E [01/Dec/2008:10:32:40 +0100] [CGI] Unable to create SNMP socket - Permission denied

Avahi is deactivated on my system, as the name of the local network unfortunatly ends in ".local" (thanks to Microsoft best practice documentation).
But after removing AppArmor, autodetection and printing works again.

Revision history for this message
Fridtjof Busse (fbusse-deactivatedaccount-deactivatedaccount) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

For your interest, you don't need to uninstall apparmor completely, merely disabling it for cups with "sudo aa-complain cups" should be enough.

Anyway, can you please give me the output of "uname -a"? This looks a bit like running the 8.10 kernel under Ubuntu 8.04.

Revision history for this message
Fridtjof Busse (fbusse-deactivatedaccount-deactivatedaccount) wrote :

Linux pc195 2.6.24-22-generic #1 SMP Mon Nov 24 18:32:42 UTC 2008 i686 GNU/Linux
I'm not really familiar with AppArmor, so removing it seemed like the best way to get rid of it :)

Revision history for this message
Martin Pitt (pitti) wrote :

OK, thanks. I'll try to reproduce this.

Changed in cupsys:
status: Incomplete → In Progress
Revision history for this message
Gerald Carter (coffeedude.jerry) wrote :

I'll confirm the same bug. Prevented enabling a network printer via socket connections.
Same workaround with apparmor.

elm:/root# uname -a
Linux elm 2.6.24-22-server #1 SMP Mon Nov 24 20:06:28 UTC 2008 x86_64 GNU/Linux
elm:/root# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04.1"

# dpkg -l | grep cups
ii cupsys 1.3.7-1ubuntu3.2 Common UNIX Printing System(tm) - server
ii cupsys-bsd 1.3.7-1ubuntu3.2 Common UNIX Printing System(tm) - BSD comman
ii cupsys-client 1.3.7-1ubuntu3.2 Common UNIX Printing System(tm) - client pro
ii cupsys-common 1.3.7-1ubuntu3.2 Common UNIX Printing System(tm) - common fil
ii libcupsimage2 1.3.7-1ubuntu3.2 Common UNIX Printing System(tm) - image libs
ii libcupsys2 1.3.7-1ubuntu3.2 Common UNIX Printing System(tm) - libs
ii libcupsys2-dev 1.3.7-1ubuntu3.2 Common UNIX Printing System(tm) - developmen

Revision history for this message
lilbudda (cory-meisch-gmail) wrote :

Confirming bug and workaround. Running "sudo aa-complain cups" worked for me.

Revision history for this message
dovik (dovik-martin) wrote :

Same bug here, same workaround (sudo aa-complain cups) using Intrepid.

$ uname -a
Linux pc546 2.6.27-11-generic #1 SMP Thu Jan 29 19:24:39 UTC 2009 i686 GNU/Linux

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.10
DISTRIB_CODENAME=intrepid
DISTRIB_DESCRIPTION="Ubuntu 8.10"

$ dpkg -l | grep cups
ii bluez-cups 4.12-0ubuntu5 Bluetooth printer driver for CUPS
ii cups 1.3.9-2ubuntu6.1 Common UNIX Printing System(tm) - server
ii cups-bsd 1.3.9-2ubuntu6.1 Common UNIX Printing System(tm) - BSD comman
ii cups-client 1.3.9-2ubuntu6.1 Common UNIX Printing System(tm) - client pro
ii cups-common 1.3.9-2ubuntu6.1 Common UNIX Printing System(tm) - common fil
ii cups-driver-gutenprint 5.2.0~rc1-0ubuntu1 printer drivers for CUPS
ii cupsddk 1.2.3-3 CUPS Driver Development Kit
ii cupsddk-drivers 1.2.3-3 CUPS Driver Development Kit - Driver files
ii hal-cups-utils 0.6.17+git20080728-0ubuntu2 CUPS integration with HAL
ii libcups2 1.3.9-2ubuntu6.1 Common UNIX Printing System(tm) - libs
ii libcupsimage2 1.3.9-2ubuntu6.1 Common UNIX Printing System(tm) - image libs
ii libgnomecups1.0-1 0.2.3-2build1 GNOME library for CUPS interaction
ii python-cups 1.9.41-0ubuntu1 Python bindings for CUPS
ii python-cupshelpers 1.0.5+git20080819-0ubuntu6 Python modules for printer configuration wit

Revision history for this message
Martin Pitt (pitti) wrote :

Dec 1 09:37:20 pc195 kernel: [ 6471.007667] audit(1228120640.693:18): type=1503 operation="inode_permission" requested_mask="r::" denied_mask="r::" name="/etc/likewise/lsassd.conf" pid=6120 profile="/usr/sbin/cupsd" namespace="default"

That's the only relevant violation I can find. I'll update the cups profile to allow access to likewise.

Changed in cups:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 1.3.9-15

---------------
cups (1.3.9-15) unstable; urgency=low

  * Add debian/local/apport-hook.py: Apport package hook, thanks to
    Brian Murray! Install it in debian/rules if we build for Ubuntu.
    (LP: #334080)
  * debian/rules: Move init script priority to 50, so that cups starts later
    in the boot sequence. There is no reason why it should start so early
    (before e. g. gdm). Do the transition on upgrades in debian/cups.postinst.
  * debian/control: Promote ttf-freefont from Recommends to Depends, since the
    PDF filter chain needs it. (Closes: #516335)
  * debian/control: Add "Breaks: foomatic-filters (<< 4.0)", and bump
    Recommends: version. Earlier foomatic-filters do not support the PDF
    filter chain. (Closes: #511009)
  * debian/local/apparmor-profile: Add a few missing rules for Kerberos
    authentication. (LP: #324645)
  * Add bzr-builddeb configuration (merge mode).
  * debian/watch: Update so that it works again.
  * debian/local/apparmor-profile: Allow cups to read /etc/likewise, for
    authentication. (LP: #303927)
  * Add testsuite-increase-wait-timeout.dpatch: Increase test suite's timeout
    for waiting for jobs to 10 minutes, for slower architectures like arm and
    m68k. (Closes: #518787)

 -- Martin Pitt <email address hidden> Tue, 10 Mar 2009 13:46:19 +0100

Changed in cups:
status: Fix Committed → Fix Released
Revision history for this message
DG Turner (d-turner) wrote :

This has reoccurred in 10.04 sometime since Monday ,19 March 2012. What I find most interesting is that app-armor is re-installed. Are updates not tested for the LTS editions when the next one is close?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.