Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

"Unable to connect" on slow restart (EL7) #249

Open
tequeter opened this issue Feb 25, 2020 · 1 comment
Open

"Unable to connect" on slow restart (EL7) #249

tequeter opened this issue Feb 25, 2020 · 1 comment

Comments

@tequeter
Copy link
Contributor

Given CentOS 7 with Puppet 6.12 and CUPS 1.6.3, and 20+ queues present.

When I apply the manifest

class { 'cups':
  service_ensure => 'running',
}
cups_queue { 'Office':
  ensure => 'printer',
}
include cups::workarounds::systemd_service_restart

In order to manage a CUPS queue.

Then I get the error message:

  Error: Could not prefetch cups_queue provider 'cups': IPP query 'ipptool -c ipp://localhost/ /dev/stdin' failed.
  EXITCODE: 1
  STDIN:
            {
              OPERATION CUPS-Get-Classes
              GROUP operation
              ATTR charset attributes-charset utf-8
              ATTR language attributes-natural-language en
              DISPLAY printer-name
              DISPLAY member-names
            }
  
  STDOUT:
  
  STDERR:
  ipptool: Unable to connect to localhost on port 631 - Transport endpoint is not connected
  Error: Failed to apply catalog: IPP query 'ipptool -c ipp://localhost/ /dev/stdin' failed.

In other words, issue #35 from last year was not really solved.

The workaround we added relies on cups.socket picking up connections until CUPS is ready, but the fix in bc45a96 just installs the systemd dropin without restarting the socket unit, so it does nothing. Also, the socket unit needs to be started before the service unit or it may fail to grab the socket.

tequeter added a commit to tequeter/puppet-cups that referenced this issue Feb 25, 2020
bc45a96 had only half the fix, as demonstrated in the updated
acceptance test.

It is necessary to restart the cups.service and cups.socket services in
that order, for the current Puppet run to work.

Fixes leoarnold#249.
@tynsh
Copy link

tynsh commented Dec 16, 2021

Sorry for updating this old issue. But the problem persists :) Maybe your fix could be merged?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants