Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1144780 - cups starts before networking, therefore is not available
cups starts before networking, therefore is not available
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cups (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Tim Waugh
qe-baseos-daemons
: Patch
Depends On: 1153660
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-20 13:20 EDT by spamers
Modified: 2015-03-05 04:09 EST (History)
5 users (show)

See Also:
Fixed In Version: cups-1.6.3-17.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1153660 (view as bug list)
Environment:
Last Closed: 2015-03-05 04:09:18 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0386 normal SHIPPED_LIVE cups bug fix and enhancement update 2015-03-05 09:06:04 EST

  None (edit)
Description spamers 2014-09-20 13:20:02 EDT
Description of problem:
Systemd starts cups before networking is ready, therefore cups doesn't want to start. More info in Steps to reproduce.
CUPS will try to start, but will throw error (from /var/log/cups/error_log:
Unable to bind socket for address 192.168.1.X:631 - Cannot assign requested address.)

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
!. Install cups from official repo and configure to listen for network connections.
2. enable cups in systemd (systemctl enable cups)
3. Configure networking in NetworkManager, e.g. like static ip address.
4. restart pc


Actual results:
5. CUPS is not working!

Expected results:
CUPS available through network.

Additional info:
Comment 2 Jiri Popelka 2014-09-24 04:51:40 EDT
(In reply to spamers from comment #0)
> Steps to Reproduce:
> ... configure to listen for network connections.

Did you change the default configuration (cupsd.conf) somehow ?

note: Fedora's bug #756550 seems similar.
Comment 3 spamers 2014-09-24 08:58:15 EDT
Yes, I added:
Listen 192.168.1.3:631
instead of
Listen localhost:631

As I wrote earlier, CUPS is unable to bind socket for address, because network is not ready.

What is more, dding
Wants=network.target
to
/etc/systemd/system/printer.target.wants/cups.service
solves problem. It's my suggestion.
Comment 4 Jiri Popelka 2014-09-25 05:30:19 EDT
(In reply to spamers from comment #3)
> Yes, I added:
> Listen 192.168.1.3:631
> instead of
> Listen localhost:631
> 
> As I wrote earlier, CUPS is unable to bind socket for address, because
> network is not ready.

Thanks.
I haven't been able to reproduce it because in my case the network interfaces are always (regardless if I use NetworkManager or only legacy 'network') configured prior to systemd starting CUPS.

> What is more, adding
> Wants=network.target
> to /etc/systemd/system/printer.target.wants/cups.service
> solves problem. It's my suggestion.

I think
After=network.target
not
Wants=network.target
is what we want here.

http://www.freedesktop.org/software/systemd/man/systemd.unit.html
Comment 5 spamers 2014-09-25 06:24:48 EDT
`After` sounds good. I'm glad my feedback and bug report was useful.
Comment 10 Shane 2015-02-26 16:28:35 EST
I've also encountered this bug and, as above, fixed it by adding After=network.target to the cups.service Systemd unit file.

I came here to report this bug, only to find that it's been known about for nearly six months. I'm disappointed that no update has been released, given the fix is a simple one-line change to a configuration file. I wasted hours diagnosing this, thinking I must have been doing something wrong.
Comment 12 errata-xmlrpc 2015-03-05 04:09:18 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0386.html

Note You need to log in before you can comment on or make changes to this bug.