Re: System_d biting CUPS

2014-06-07 Thread Brian
On Sat 07 Jun 2014 at 13:23:03 +0200, Siard wrote:

 It's just a locally connected printer. CUPS worked (after booting with
 systemd) until some upgrade, a few weeks ago.

This clarifies matters. 

 After booting with SysVinit:
 
 $ lpstat -a
 HL5240 accepting requests since vr 28 jun 2013 19:08:19 CEST
 PDF accepting requests since ma 05 apr 2010 22:49:03 CEST
 
 HL5240 (Brother) is the connected printer.
 PDF refers to cups-pdf.
 
 However, after booting with systemd:
 
 $ lpstat -a
 lpstat: Bad file descriptor

To make progress I think we might need the outputs of 

   systemctrl status cups

before and after running 'lpstat -a' when the init is systemd. 

Also, please attach your cupsd.conf and cupsd-systemd-listen.conf to any
further post you make.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140607133551.gu17...@copernicus.demon.co.uk



Re: System_d biting CUPS

2014-06-07 Thread Siard
On Sat, 7 Jun 2014 14:35:51 +0100, Brian wrote:
 On Sat 07 Jun 2014 at 13:23:03 +0200, Siard wrote:
  After booting with SysVinit:
  
  $ lpstat -a
  HL5240 accepting requests since vr 28 jun 2013 19:08:19 CEST
  PDF accepting requests since ma 05 apr 2010 22:49:03 CEST
  
  HL5240 (Brother) is the connected printer.
  PDF refers to cups-pdf.
  
  However, after booting with systemd:
  
  $ lpstat -a
  lpstat: Bad file descriptor
 
 To make progress I think we might need the outputs of 
 
systemctrl status cups
 
 before and after running 'lpstat -a' when the init is systemd.

$ systemctrl status cups
bash: systemctrl: command not found
$ systemctl status cups
cups.service - CUPS Printing Service
   Loaded: loaded (/lib/systemd/system/cups.service; enabled)
   Active: inactive (dead)
 Docs: man:cupsd(8)
   man:cupsd.conf(5)
$ lpstat -a
lpstat: Bad file descriptor
$ systemctl status cups
exactly the same as above

 Also, please attach your cupsd.conf and cupsd-systemd-listen.conf to
 any further post you make.

/etc/cups/cupsd.conf:  http://pastebin.com/L8VvsSQ8

/etc/cups/cupsd-systemd-listen.conf:
comments left out
ListenStream=127.0.0.1:631
ListenStream=[::1]:631


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140607192454.c9907764.shiems...@kpnplanet.nl



Re: System_d biting CUPS

2014-06-07 Thread Brian
On Sat 07 Jun 2014 at 19:24:54 +0200, Siard wrote:

 On Sat, 7 Jun 2014 14:35:51 +0100, Brian wrote:
  
  To make progress I think we might need the outputs of 
  
 systemctrl status cups
  
  before and after running 'lpstat -a' when the init is systemd.
 
 $ systemctrl status cups
 bash: systemctrl: command not found

Amazing how an extrrra r or two can creep in.

 $ systemctl status cups
 cups.service - CUPS Printing Service
Loaded: loaded (/lib/systemd/system/cups.service; enabled)
Active: inactive (dead)
  Docs: man:cupsd(8)
man:cupsd.conf(5)

Looks like cups doesn't start up. 'systemctl status cups.socket' might
have been a better command to try. There is also 'systemctl start
cups.socket'

 $ lpstat -a
 lpstat: Bad file descriptor
 $ systemctl status cups
 exactly the same as above
 
  Also, please attach your cupsd.conf and cupsd-systemd-listen.conf to
  any further post you make.
 
 /etc/cups/cupsd.conf:  http://pastebin.com/L8VvsSQ8

This looks like the default file (apart from 'SystemGroup lpadmin',
which should be in another file and which doesn't matter). The list is
very tolerant of a file less than 5 kB in size. Also, in time it doesn't
disappear and is easier to work with.

 /etc/cups/cupsd-systemd-listen.conf:
 comments left out
 ListenStream=127.0.0.1:631
 ListenStream=[::1]:631

The commented line (which you omitted) before these two has some
importance. It's never a good thing to edit when seeking help.

There are a number of ways to get 'lpstat: Bad file descriptor'. Most do
not apply to you. My only guess is that you have disabled ipv6.

   cat /proc/sys/net/ipv6/conf/all/disable_ipv6


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/07062014200443.cdc57e786...@desktop.copernicus.demon.co.uk



[SOLVED] Re: System_d biting CUPS

2014-06-07 Thread Siard
On Sat, 7 Jun 2014 20:26:15 +0100, Brian wrote:
 On Sat 07 Jun 2014 at 19:24:54 +0200, Siard wrote:
 
  /etc/cups/cupsd.conf:  http://pastebin.com/L8VvsSQ8
 
 This looks like the default file (apart from 'SystemGroup lpadmin',
 which should be in another file and which doesn't matter). The list is
 very tolerant of a file less than 5 kB in size. Also, in time it
 doesn't disappear and is easier to work with.

/usr/share/cups/cupsd.conf.default exists as well. A 'diff' shows that the
absence of 'SystemGroup lpadmin' there is the only difference.

  /etc/cups/cupsd-systemd-listen.conf:
  comments left out
  ListenStream=127.0.0.1:631
  ListenStream=[::1]:631
 
 The commented line (which you omitted) before these two has some
 importance. It's never a good thing to edit when seeking help.

Notice taken.

 There are a number of ways to get 'lpstat: Bad file descriptor'. Most
 do not apply to you. My only guess is that you have disabled ipv6.
 
cat /proc/sys/net/ipv6/conf/all/disable_ipv6

/proc/sys does not exist here (jessie) and 'locate disable_ipv6' shows
nothing.  But /etc/sysctl.d/disableipv6.conf does exist and contains
this line:

   net.ipv6.conf.all.disable_ipv6=1

I changed 1 to 0 and wow!!! CUPS with systemd is working again!
Wonderful.
I found that after issuing a print command (e.g. from LibreOffice) CUPS
remains active for 1 min. 2s. That's how systemd apparently works.

Until 1min 2s after printing:

$ systemctl status cups
cups.service - CUPS Printing Service
   Loaded: loaded (/lib/systemd/system/cups.service; enabled)
   Active: active (running) since sat 2014-06-07 22:20:22 CEST; 1min 2s ago
 Docs: man:cupsd(8)
   man:cupsd.conf(5)
 Main PID: 1539 (cupsd)
   CGroup: name=systemd:/system/cups.service
   └─1539 /usr/sbin/cupsd -f

One second later:

$ systemctl status cups
cups.service - CUPS Printing Service
   Loaded: loaded (/lib/systemd/system/cups.service; enabled)
   Active: inactive (dead) since sat 2014-06-07 22:21:25 CEST; 871ms ago
 Docs: man:cupsd(8)
   man:cupsd.conf(5)
  Process: 1539 ExecStart=/usr/sbin/cupsd -f (code=exited, status=0/SUCCESS)

I must say, I am rather impressed with your expertise. Thank you very
much!


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140607231717.2580b212.shiems...@kpnplanet.nl



Re: [SOLVED] Re: System_d biting CUPS

2014-06-07 Thread Siard
I wrote:
 Brian wrote:
  cat /proc/sys/net/ipv6/conf/all/disable_ipv6
 
 /proc/sys does not exist here (jessie) and 'locate disable_ipv6' shows
 nothing.

Correction on a closer look, /proc/sys/net/ipv6/conf/all/disable_ipv6
does appear to exist.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140607234216.2bd9d7c8.shiems...@kpnplanet.nl



Re: [SOLVED] Re: System_d biting CUPS

2014-06-07 Thread Brian
On Sat 07 Jun 2014 at 23:17:17 +0200, Siard wrote:

 I found that after issuing a print command (e.g. from LibreOffice) CUPS
 remains active for 1 min. 2s. That's how systemd apparently works.

It is due to 'socket activation'. The cups daemon activates when it is
called upon instead of running all the time.

 I must say, I am rather impressed with your expertise. Thank you very
 much!

Thank you. Your clear responses helped, as did a post from Stefaan Himpe:

   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742668#76


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140607222138.ga20...@copernicus.demon.co.uk