[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#759348: cups-browsed: May hang for 90 seconds when restarted



retitle 759348 cups-browsed: May hang for 90 seconds when restarted
thanks



On Tue 26 Aug 2014 at 16:46:33 +0100, Brian Potkin wrote:

>  systemctl restart cups.service cups-browsed.service
>    Aug 26 15:51:18 unstable systemd[1]: Stopping CUPS Printing Service...
>    Aug 26 15:51:18 unstable systemd[1]: Stopping Make remote CUPS printers available locally...
>    Aug 26 15:52:48 unstable systemd[1]: cups-browsed.service stopping timed out. Killing.
>    Aug 26 15:52:48 unstable systemd[1]: cups-browsed.service: main process exited, code=killed, status=9/KILL
>    Aug 26 15:52:48 unstable systemd[1]: Unit cups-browsed.service entered failed state.
>    Aug 26 15:52:48 unstable systemd[1]: Starting CUPS Printing Service...
>    Aug 26 15:52:48 unstable systemd[1]: Started CUPS Printing Service.
>    Aug 26 15:52:48 unstable systemd[1]: Starting Make remote CUPS printers available locally...
>    Aug 26 15:52:48 unstable systemd[1]: Started Make remote CUPS printers available locally.

The 90 second timeout is systemd's default.

I changed cups-browsed.service to

  Description=Make remote CUPS printers available locally
  After=cups.service avahi-daemon.service
  Wants=cups.service avahi-daemon.service

  [Service]
  ExecStart=/usr/sbin/cups-browsed
  TimeoutStopSec=20

  [Install]
  WantedBy=multi-user.target

because I got bored waiting for a command to complete.

Then

   systemctl stop cups.service cups-browsed.service

or
 
   systemctl stop cups.service ; systemctl stop cups-browsed.service

The result was as described previously and as recorded by journalctl
above.

Some further observations:

1. With "BrowseRemoteProtocols dnssd" this does not happen.

2. "lpstat -a" still shows print queues discovered by CUPS browsing
   after cups-browsed.service enters a failed state.

A solution is to have cups-browsed.service as

  [Unit]
  Description=Make remote CUPS printers available locally
  Requires=cups.service avahi-daemon.service
  After=cups.service avahi-daemon.service

  [Service]
  ExecStart=/usr/sbin/cups-browsed
  TimeoutStopSec=20

  [Install]
  WantedBy=multi-user.target

But please bear in mind that over nearly 20 years this user has never
concerned himself with Debian's init system, so it is quite likely his
suggestion is based on a position of complete ignorance when it comes to
what will be the default for Jessie.

Regards,

Brian.


Reply to: