How long until a deleted printer actually vanishes?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

How long until a deleted printer actually vanishes?

Marc Haber-22
Hi,

in my overengineered home network, I have

- a VLAN with my Laser Printer and an Inkjet.
- another VLAN with my CUPS server, parada, running Debian stable
- another VLAN with my desktop workstation, fan, running Debian
  unstable and KDE.
- a router/firewall, barrida, running a packet filter and avahi-daemon
  in reflector configuration.

The printer is configured to do avahi/zeroconf, parada and fan both have
avahi-daemon installed and running, and both also have cups-browsed
installed and running. The ultimate goal is to be able to print from
Linux, from Windows and from iOS devices. Unfortunately, this has not
been successful so far, sometimes part of the functions work, sometimes
not.

For debugging, I have deleted all printer definitions from fan's CUPS
server and all but the Inkjet definition from parada's CUPS server.

As I read on the wiki, GTK applications get their printer list from
avahi, so I'd have expected the printer list presented by evince to be
empty but the Inkjet. However, it shows the Inkjet and one old entry for
the Laser Printer ("c534-ka51 Lexmark C534-KA51 on parada"). I guess
that one is a leftvoer from the deleting procedure.

Which daemons (cups? cups-browsed? avahi?) on which hosts do I restart
to have the old printer entry vanish? Or, alternatively, how long do I
have to wait until those entries time out eventually?

Another question, will my Lexmark C534 (it can do Postscript, prints PDF
uploaded via ftp and alot more, but does not do AirPrint by itself) be
eligible for driverless printing?

Would it be helpful in any way to upgrade parada to buster? Usually I
keep my infrastructure systems on Debian stable, but I can make an
exception here if that is actually helpful.

Any hints will be appreciated.

Greetings
Marc

--
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421

Reply | Threaded
Open this post in threaded view
|

Re: How long until a deleted printer actually vanishes?

Brian Potkin-2
On Fri 25 Jan 2019 at 16:27:36 +0100, Marc Haber wrote:

> Hi,

Hello Marc.
 
> in my overengineered home network, I have
>
> - a VLAN with my Laser Printer and an Inkjet.
> - another VLAN with my CUPS server, parada, running Debian stable
> - another VLAN with my desktop workstation, fan, running Debian
>   unstable and KDE.
> - a router/firewall, barrida, running a packet filter and avahi-daemon
>   in reflector configuration.

I have no knowledge or experience of VLANs or reflectors but I will
give my interpretation of what the setup does. Please correct it if
necessary.

The Lexmark and Inkjet have queues configured on parada. These queues
are advertised and seen by fan. They get enumerated by print dialogs
on fan. Essentially, parada is the server and fan the client.
 
> The printer is configured to do avahi/zeroconf, parada and fan both have
> avahi-daemon installed and running, and both also have cups-browsed
> installed and running. The ultimate goal is to be able to print from
> Linux, from Windows and from iOS devices. Unfortunately, this has not
> been successful so far, sometimes part of the functions work, sometimes
> not.

parada doesn't need cups-browsed unless you want it to do the old CUPS
broadcasting (which I suspect you don't). Employing it on fan is
optional; please see the wiki.

> For debugging, I have deleted all printer definitions from fan's CUPS
> server and all but the Inkjet definition from parada's CUPS server.
>
> As I read on the wiki, GTK applications get their printer list from
> avahi, so I'd have expected the printer list presented by evince to be
> empty but the Inkjet. However, it shows the Inkjet and one old entry for
> the Laser Printer ("c534-ka51 Lexmark C534-KA51 on parada"). I guess
> that one is a leftvoer from the deleting procedure.

You have cups-browsed running, so I would expect two Inkjet entries. One
due to direct interaction with the DNS-SD broadcasts from parada and the
other because cups-browsed automatically sets up a local queue.
 
> Which daemons (cups? cups-browsed? avahi?) on which hosts do I restart
> to have the old printer entry vanish? Or, alternatively, how long do I
> have to wait until those entries time out eventually?

Stop CUPS on parada; the Inkjet entry(ies) should disappear from Evince.
What happens to c534-ka51 Lexmark C534-KA51 on parada? Restarting CUPS
should see Inkjet reappear almost instantaneously in Evince.

Now stop CUPS on fan (this also stops cups-browsed). What happens in
Evince?
 
> Another question, will my Lexmark C534 (it can do Postscript, prints PDF
> uploaded via ftp and alot more, but does not do AirPrint by itself) be
> eligible for driverless printing?

No. It doesn't use DNS-SD broadcasting.
 
> Would it be helpful in any way to upgrade parada to buster? Usually I
> keep my infrastructure systems on Debian stable, but I can make an
> exception here if that is actually helpful

Not that I can think of immediately.

Regards,

Brian.

Reply | Threaded
Open this post in threaded view
|

Re: How long until a deleted printer actually vanishes?

Marc Haber-22
Hi Brian,

thanks for your help, I really appreciate that!

On Fri, Jan 25, 2019 at 06:42:25PM +0000, Brian Potkin wrote:

> On Fri 25 Jan 2019 at 16:27:36 +0100, Marc Haber wrote:
> > in my overengineered home network, I have
> >
> > - a VLAN with my Laser Printer and an Inkjet.
> > - another VLAN with my CUPS server, parada, running Debian stable
> > - another VLAN with my desktop workstation, fan, running Debian
> >   unstable and KDE.
> > - a router/firewall, barrida, running a packet filter and avahi-daemon
> >   in reflector configuration.
>
> I have no knowledge or experience of VLANs or reflectors but I will
> give my interpretation of what the setup does. Please correct it if
> necessary.

This is very helpful anyway. I am an experienced networker, so we can
probably together make sense from that. I am especially interested in
learning about what avahi does and how to debug it.

> The Lexmark and Inkjet have queues configured on parada. These queues
> are advertised and seen by fan. They get enumerated by print dialogs
> on fan. Essentially, parada is the server and fan the client.

Yes. That is the case.

> > The printer is configured to do avahi/zeroconf, parada and fan both have
> > avahi-daemon installed and running, and both also have cups-browsed
> > installed and running. The ultimate goal is to be able to print from
> > Linux, from Windows and from iOS devices. Unfortunately, this has not
> > been successful so far, sometimes part of the functions work, sometimes
> > not.
>
> parada doesn't need cups-browsed unless you want it to do the old CUPS
> broadcasting (which I suspect you don't). Employing it on fan is
> optional; please see the wiki.

I removed cups-browsed on both machines for the time being.

> > For debugging, I have deleted all printer definitions from fan's CUPS
> > server and all but the Inkjet definition from parada's CUPS server.
> >
> > As I read on the wiki, GTK applications get their printer list from
> > avahi, so I'd have expected the printer list presented by evince to be
> > empty but the Inkjet. However, it shows the Inkjet and one old entry for
> > the Laser Printer ("c534-ka51 Lexmark C534-KA51 on parada"). I guess
> > that one is a leftvoer from the deleting procedure.
>
> You have cups-browsed running, so I would expect two Inkjet entries. One
> due to direct interaction with the DNS-SD broadcasts from parada and the
> other because cups-browsed automatically sets up a local queue.

So cups-browsed is the magic entity that keeps setting up local queues
on fan like:

AirPrint_c534_ka51_parada (Paused, Rejecting Jobs, Not Shared)
Description: AirPrint_c534_ka51_parada
Location:
Driver: Local Raw Printer (grayscale, 2-sided printing)
Connection: file:///dev/null
Defaults: job-sheets=none, none media=unknown

After cleaning up, fan now has zero queues visible in fan:631/printers,
and parada:631/printers only shows the Inkjet:

mx420-ka51 (Idle, Accepting Jobs, Shared)
Description: Canon MX420 series
Location: KA51 KE
Driver: Canon PIXMA-MX426 Foomatic/gutenprint-ijs-simplified.5.2 (color)
Connection: dnssd://MX420-KA51._printer._tcp.local/
Defaults: job-sheets=none, none media=iso_a4_210x297mm
sides=one-sided

evince on fan shows
c534-ka51  Lexmark C534-KA51 on parada
mx420-ka51 KA51 KE

> > Which daemons (cups? cups-browsed? avahi?) on which hosts do I restart
> > to have the old printer entry vanish? Or, alternatively, how long do I
> > have to wait until those entries time out eventually?
>
> Stop CUPS on parada; the Inkjet entry(ies) should disappear from Evince.
> What happens to c534-ka51 Lexmark C534-KA51 on parada? Restarting CUPS
> should see Inkjet reappear almost instantaneously in Evince.

Stopping cups on parada made both entries vanish, starting cups on
parada again made the inkjet reappear.

> Now stop CUPS on fan (this also stops cups-browsed). What happens in
> Evince?

cups-browsed on fan was already gone when I did those experiments, so
stopping and starting CUPS on fan didn't have any effect. Do I see
correctly that CUPS on fan is not needed to access the printers served
by parada from applications running on fan?

> > Another question, will my Lexmark C534 (it can do Postscript, prints PDF
> > uploaded via ftp and alot more, but does not do AirPrint by itself) be
> > eligible for driverless printing?
>
> No. It doesn't use DNS-SD broadcasting.

Ok. So I recreated a queue ("Lexmark C534") on parada, and I can print
from fan now.  Thanks. That was painless.

c534-ka51 (Idle, Accepting Jobs, Shared)
Description: Lexmark C534
Location: KA51 KE
Driver: Lexmark C534dtn Foomatic/Postscript (recommended) (color, 2-sided printing)
Connection: dnssd://c534-ka51._pdl-datastream._tcp.local/
Defaults: job-sheets=none, none media=iso_a4_210x297mm sides=one-sided

Now my wife's iPad. The iPad sees the Lexmark C534 queue, and printing
there works. Glacially slow, but it works, and the iPad gives an
unspecific error message ("Error while printing" in German), before the
print job prints OK. She doesn't see the mx420-ka51 queue.

There is clearly something going wrong here. How can I influence this?

KDE applications such as okular see historical printer queues that have
been deleted from CUPS long ago, "AirPrint_c534_ka51_parada",
"Canon_MX420_series_parada" and "Lexmark_C534_parada". none of which
seem to work. For example, the Lexmark_C534_parada printer entries does
not allow me to set values for Duplex (grey) or nup (not present in the
dialogs) printing.

When I tell okular to actually print, it says on the console
"/usr/bin/lpr: No such file or directory", but that file is present,
from cups-bsd, and invoking it manually from the same shell says "lpr:
Error - No default destination." stracing okular for hints why this
fails makes me end up without available printers at all.

This is going forward rapidly, and I really appreciate your help.

Greetings
Marc

--
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421

Reply | Threaded
Open this post in threaded view
|

Re: How long until a deleted printer actually vanishes?

Brian Potkin-2
On Sat 26 Jan 2019 at 15:51:51 +0100, Marc Haber wrote:

> Hi Brian,
>
> thanks for your help, I really appreciate that!

As I appreciated the help I got from you and Andreas Metzler via Exim's
Debian documentation.

> On Fri, Jan 25, 2019 at 06:42:25PM +0000, Brian Potkin wrote:
> > On Fri 25 Jan 2019 at 16:27:36 +0100, Marc Haber wrote:
> > > in my overengineered home network, I have
> > >
> > > - a VLAN with my Laser Printer and an Inkjet.
> > > - another VLAN with my CUPS server, parada, running Debian stable
> > > - another VLAN with my desktop workstation, fan, running Debian
> > >   unstable and KDE.
> > > - a router/firewall, barrida, running a packet filter and avahi-daemon
> > >   in reflector configuration.
> >
> > I have no knowledge or experience of VLANs or reflectors but I will
> > give my interpretation of what the setup does. Please correct it if
> > necessary.
>
> This is very helpful anyway. I am an experienced networker, so we can
> probably together make sense from that. I am especially interested in
> learning about what avahi does and how to debug it.

My main debugging tool is avahi-browse, but on occasion I have used a
.service file in /etc/avahi/services/. See message #7 at

https://bugs.launchpad.net/hplip/+bug/1797501

> > The Lexmark and Inkjet have queues configured on parada. These queues
> > are advertised and seen by fan. They get enumerated by print dialogs
> > on fan. Essentially, parada is the server and fan the client.
>
> Yes. That is the case.
>
> > > The printer is configured to do avahi/zeroconf, parada and fan both have
> > > avahi-daemon installed and running, and both also have cups-browsed
> > > installed and running. The ultimate goal is to be able to print from
> > > Linux, from Windows and from iOS devices. Unfortunately, this has not
> > > been successful so far, sometimes part of the functions work, sometimes
> > > not.
> >
> > parada doesn't need cups-browsed unless you want it to do the old CUPS
> > broadcasting (which I suspect you don't). Employing it on fan is
> > optional; please see the wiki.
>
> I removed cups-browsed on both machines for the time being.
>
> > > For debugging, I have deleted all printer definitions from fan's CUPS
> > > server and all but the Inkjet definition from parada's CUPS server.
> > >
> > > As I read on the wiki, GTK applications get their printer list from
> > > avahi, so I'd have expected the printer list presented by evince to be
> > > empty but the Inkjet. However, it shows the Inkjet and one old entry for
> > > the Laser Printer ("c534-ka51 Lexmark C534-KA51 on parada"). I guess
> > > that one is a leftvoer from the deleting procedure.
> >
> > You have cups-browsed running, so I would expect two Inkjet entries. One
> > due to direct interaction with the DNS-SD broadcasts from parada and the
> > other because cups-browsed automatically sets up a local queue.
>
> So cups-browsed is the magic entity that keeps setting up local queues
> on fan like:

Yes. There will be times you will be glad to have it available on fan
(see later).
>
> AirPrint_c534_ka51_parada (Paused, Rejecting Jobs, Not Shared)
> Description: AirPrint_c534_ka51_parada
> Location:
> Driver: Local Raw Printer (grayscale, 2-sided printing)
> Connection: file:///dev/null
> Defaults: job-sheets=none, none media=unknown
>
> After cleaning up, fan now has zero queues visible in fan:631/printers,

That's ok. You have no local queues set up by you or cups-browsed.

> and parada:631/printers only shows the Inkjet:

Am I missing something? Where is the Lexmark?

> mx420-ka51 (Idle, Accepting Jobs, Shared)
> Description: Canon MX420 series
> Location: KA51 KE
> Driver: Canon PIXMA-MX426 Foomatic/gutenprint-ijs-simplified.5.2 (color)
> Connection: dnssd://MX420-KA51._printer._tcp.local/
> Defaults: job-sheets=none, none media=iso_a4_210x297mm
> sides=one-sided
>
> evince on fan shows
> c534-ka51  Lexmark C534-KA51 on parada
> mx420-ka51 KA51 KE

And both can be printed to?
 

> > > Which daemons (cups? cups-browsed? avahi?) on which hosts do I restart
> > > to have the old printer entry vanish? Or, alternatively, how long do I
> > > have to wait until those entries time out eventually?
> >
> > Stop CUPS on parada; the Inkjet entry(ies) should disappear from Evince.
> > What happens to c534-ka51 Lexmark C534-KA51 on parada? Restarting CUPS
> > should see Inkjet reappear almost instantaneously in Evince.
>
> Stopping cups on parada made both entries vanish, starting cups on
> parada again made the inkjet reappear.

So parada was responsible for the Lexmark queue. It's gone now, so we
will not worry about it.
 
> > Now stop CUPS on fan (this also stops cups-browsed). What happens in
> > Evince?
>
> cups-browsed on fan was already gone when I did those experiments, so
> stopping and starting CUPS on fan didn't have any effect. Do I see
> correctly that CUPS on fan is not needed to access the printers served
> by parada from applications running on fan?

Not quite. Correct for the GTK print dialog but not for the LibreOffice
and Qt ones. On buster, the later two enumerate remote queues and IPP
printers using CUPS' temporary queue mechanism (see the wiki Glossary
and Index).
 

> > > Another question, will my Lexmark C534 (it can do Postscript, prints PDF
> > > uploaded via ftp and alot more, but does not do AirPrint by itself) be
> > > eligible for driverless printing?
> >
> > No. It doesn't use DNS-SD broadcasting.
>
> Ok. So I recreated a queue ("Lexmark C534") on parada, and I can print
> from fan now.  Thanks. That was painless.
>
> c534-ka51 (Idle, Accepting Jobs, Shared)
> Description: Lexmark C534
> Location: KA51 KE
> Driver: Lexmark C534dtn Foomatic/Postscript (recommended) (color, 2-sided printing)
> Connection: dnssd://c534-ka51._pdl-datastream._tcp.local/
> Defaults: job-sheets=none, none media=iso_a4_210x297mm sides=one-sided
>
> Now my wife's iPad. The iPad sees the Lexmark C534 queue, and printing
> there works. Glacially slow, but it works, and the iPad gives an
> unspecific error message ("Error while printing" in German), before the
> print job prints OK. She doesn't see the mx420-ka51 queue.
>
> There is clearly something going wrong here. How can I influence this?

You would have to look at an error_log (how to get one is on the wiki)
to track if the printing system is responsible for the slowness.

I am unfamiliar with iDevices but I wouldn't have thought that mattered,
(maybe). fan can see the mx420-ka51 queue (on parada,we assume), so why
not the iPad? I'll have a think. You could try setting the queues on fan
to shared.

> KDE applications such as okular see historical printer queues that have
> been deleted from CUPS long ago, "AirPrint_c534_ka51_parada",
> "Canon_MX420_series_parada" and "Lexmark_C534_parada". none of which
> seem to work. For example, the Lexmark_C534_parada printer entries does
> not allow me to set values for Duplex (grey) or nup (not present in the
> dialogs) printing.

Do you see the same three queues with 'lpstat -l -e'?
 
> When I tell okular to actually print, it says on the console
> "/usr/bin/lpr: No such file or directory", but that file is present,
> from cups-bsd, and invoking it manually from the same shell says "lpr:
> Error - No default destination." stracing okular for hints why this
> fails makes me end up without available printers at all.

You have confirmed Bug #911702. Do you fancy having a go at #911844?
Installing cups-browsed on fan is necessary to avoid both bugs.

> This is going forward rapidly, and I really appreciate your help.
>
> Greetings
> Marc
>
> --
> -----------------------------------------------------------------------------
> Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
> Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
> Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421
>

Reply | Threaded
Open this post in threaded view
|

Re: How long until a deleted printer actually vanishes?

Brian Potkin-2
In reply to this post by Marc Haber-22
On Sat 26 Jan 2019 at 15:51:51 +0100, Marc Haber wrote:

> Now my wife's iPad. The iPad sees the Lexmark C534 queue, and printing
> there works. Glacially slow, but it works, and the iPad gives an
> unspecific error message ("Error while printing" in German), before the
> print job prints OK. She doesn't see the mx420-ka51 queue.
>
> There is clearly something going wrong here. How can I influence this?

Thinking on, how does this sound, Marc?

fan sees the Lexmark and the  MX426. They would also be picked up by
'avahi-browse -art'. This implies that all three are on the same subnet.

The iPad sees the Lexmark, which again implies the two are on the same
subnet. The iPad does not see the MX426. Is it possible they are on
different subnets.

The Lexmark has a queue set up on parada. Suppose the same was done for
the MX426. 'lpinfo -v' should give the URI. Searching the output of
'lpinfo -m' should give a PPD. Then

lpadmin -p testmx426 -v <URI> -E -o printer-is-shared -m <PPD>

(I am not sure if printer-is-shared is needed).

Regards,

Brian.

Reply | Threaded
Open this post in threaded view
|

Re: How long until a deleted printer actually vanishes?

Marc Haber-22
In reply to this post by Brian Potkin-2
On Sat, Jan 26, 2019 at 07:02:21PM +0000, Brian Potkin wrote:

> On Sat 26 Jan 2019 at 15:51:51 +0100, Marc Haber wrote:
> > On Fri, Jan 25, 2019 at 06:42:25PM +0000, Brian Potkin wrote:
> > > On Fri 25 Jan 2019 at 16:27:36 +0100, Marc Haber wrote:
> > > > in my overengineered home network, I have
> > > >
> > > > - a VLAN with my Laser Printer and an Inkjet.
> > > > - another VLAN with my CUPS server, parada, running Debian stable
> > > > - another VLAN with my desktop workstation, fan, running Debian
> > > >   unstable and KDE.
> > > > - a router/firewall, barrida, running a packet filter and avahi-daemon
> > > >   in reflector configuration.
> > >
> > > I have no knowledge or experience of VLANs or reflectors but I will
> > > give my interpretation of what the setup does. Please correct it if
> > > necessary.
> >
> > This is very helpful anyway. I am an experienced networker, so we can
> > probably together make sense from that. I am especially interested in
> > learning about what avahi does and how to debug it.
>
> My main debugging tool is avahi-browse,

In avahi-browse, I fail to make the connection between the service type
such as _http._tcp and the output. For example:

[11/5292]mh@drop:~ $ sudo avahi-browse --all --terminate | grep parada
+  lanw0 IPv6 Lexmark C534 @ parada                         Internet Printer     local
+  lanw0 IPv6 Canon MX420 series @ parada                   Internet Printer     local
+  lanw0 IPv6 AirPrint c534-ka51 @ parada                   Internet Printer     local
+  lanw0 IPv4 AirPrint c534-ka51 @ parada                   Internet Printer     local
+  lanw0 IPv4 Lexmark C534 @ parada                         Internet Printer     local
+  lanw0 IPv4 Canon MX420 series @ parada                   Internet Printer     local
+  lanw0 IPv6 Lexmark C534 @ parada                         Secure Internet Printer local
+  lanw0 IPv6 Canon MX420 series @ parada                   Secure Internet Printer local
+  lanw0 IPv4 Lexmark C534 @ parada                         Secure Internet Printer local
+  lanw0 IPv4 Canon MX420 series @ parada                   Secure Internet Printer local
+  lanw0 IPv6 Canon MX420 series @ parada                   UNIX Printer         local
+  lanw0 IPv6 Lexmark C534 @ parada                         UNIX Printer         local
+  lanw0 IPv4 Canon MX420 series @ parada                   UNIX Printer         local
+  lanw0 IPv4 Lexmark C534 @ parada                         UNIX Printer         local
+  lanw0 IPv6 CUPS @ parada                                 Web Site             local
+  lanw0 IPv4 CUPS @ parada                                 Web Site             local
[12/5293]mh@drop:~ $

I would assume that each of this lines has a pseudo "host name" under the .local domain?

Also, avahi-browse --all --terminate --resolve gives me a truckload of messages like
Failed to resolve service 'Lexmark C534 @ parada' of type '_ipp._tcp' in domain 'local': Timeout reached
that I cannot make sense from.

When the Lexmark printer is on, avahi-browse on parada also sees it:
[15/3715]mh@parada:~ $ sudo avahi-browse --all --terminate | grep -iE '(534|lexmark)' | grep -v parada
+   eth0 IPv4 c534-ka51                                     FTP File Transfer    local
+   eth0 IPv4 c534-ka51                                     UNIX Printer         local
+   eth0 IPv4 c534-ka51                                     Internet Printer     local
+   eth0 IPv4 c534-ka51                                     Web Site             local
[16/3716]mh@parada:~ $

And I _think_ that the printer prints PDFs uploaded via ftp just fine,
although CUPS seems to access it via _printer._tcp:
[21/3721]mh@parada:~ $ sudo lpinfo -v | grep c534
network dnssd://c534-ka51._printer._tcp.local/
[22/3722]mh@parada:~ $


> but on occasion I have used a
> .service file in /etc/avahi/services/. See message #7 at
>
> https://bugs.launchpad.net/hplip/+bug/1797501

So you basically created a test service in your avahi that _should_ look
identical to the one you were expecting?

> > AirPrint_c534_ka51_parada (Paused, Rejecting Jobs, Not Shared)
> > Description: AirPrint_c534_ka51_parada
> > Location:
> > Driver: Local Raw Printer (grayscale, 2-sided printing)
> > Connection: file:///dev/null
> > Defaults: job-sheets=none, none media=unknown
> >
> > After cleaning up, fan now has zero queues visible in fan:631/printers,
>
> That's ok. You have no local queues set up by you or cups-browsed.

That was my intention for debugging purposes.

> > and parada:631/printers only shows the Inkjet:
>
> Am I missing something? Where is the Lexmark?

That one was not present at the time of this try. The
"AirPrint_c534_ka51_parada" definition was a phantom that vanished with
restarting CUPS on parada. I cannot reproduce this and thus would not
investigate this any further unless this behavior keeps showing up

> > mx420-ka51 (Idle, Accepting Jobs, Shared)
> > Description: Canon MX420 series
> > Location: KA51 KE
> > Driver: Canon PIXMA-MX426 Foomatic/gutenprint-ijs-simplified.5.2 (color)
> > Connection: dnssd://MX420-KA51._printer._tcp.local/
> > Defaults: job-sheets=none, none media=iso_a4_210x297mm
> > sides=one-sided
> >
> > evince on fan shows
> > c534-ka51  Lexmark C534-KA51 on parada
> > mx420-ka51 KA51 KE
>
> And both can be printed to?

No, the "c534-ka51  Lexmark C534-KA51 on parada" didn't work, and I
don't remember the message I received when trying to print. I guess that
there was no error message and the print job just vanished in tht
darkness.

> > > > Which daemons (cups? cups-browsed? avahi?) on which hosts do I restart
> > > > to have the old printer entry vanish? Or, alternatively, how long do I
> > > > have to wait until those entries time out eventually?
> > >
> > > Stop CUPS on parada; the Inkjet entry(ies) should disappear from Evince.
> > > What happens to c534-ka51 Lexmark C534-KA51 on parada? Restarting CUPS
> > > should see Inkjet reappear almost instantaneously in Evince.
> >
> > Stopping cups on parada made both entries vanish, starting cups on
> > parada again made the inkjet reappear.
>
> So parada was responsible for the Lexmark queue. It's gone now, so we
> will not worry about it.

Right.

>
> > > Now stop CUPS on fan (this also stops cups-browsed). What happens in
> > > Evince?
> >
> > cups-browsed on fan was already gone when I did those experiments, so
> > stopping and starting CUPS on fan didn't have any effect. Do I see
> > correctly that CUPS on fan is not needed to access the printers served
> > by parada from applications running on fan?
>
> Not quite. Correct for the GTK print dialog but not for the LibreOffice
> and Qt ones. On buster, the later two enumerate remote queues and IPP
> printers using CUPS' temporary queue mechanism (see the wiki Glossary
> and Index).

Without cups-browsed, lpstat gives me the following:
[5/3708]mh@parada:~ $ lpstat -a
c534-ka51 accepting requests since Sa 26 Jan 2019 15:36:04 CET
mx420-ka51 accepting requests since So 23 Sep 2018 17:06:38 CEST
[6/3709]mh@parada:~ $ lpstat -l -e
lpstat: Error - unknown option "e".
[7/3710]mh@parada:~ $

[6/4999]mh@fan:~ $ lpstat -a
lpstat: No destinations added.
1 [7/5000]mh@fan:~ $ lpstat -l -e
AirPrint_c534_ka51_parada network none ipp://AirPrint%20c534-ka51%20%40%20parada._ipp._tcp.local/cups
Canon_MX420_series_parada network none ipps://Canon%20MX420%20series%20%40%20parada._ipps._tcp.local/cups
Lexmark_C534_parada network none ipps://Lexmark%20C534%20%40%20parada._ipps._tcp.local/cups
[8/5001]mh@fan:~ $

So, CUPS 2.2.10 on fan will create those temporary queues automatically
even without cups-browsed, right?

> > > > Another question, will my Lexmark C534 (it can do Postscript, prints PDF
> > > > uploaded via ftp and alot more, but does not do AirPrint by itself) be
> > > > eligible for driverless printing?
> > >
> > > No. It doesn't use DNS-SD broadcasting.
> >
> > Ok. So I recreated a queue ("Lexmark C534") on parada, and I can print
> > from fan now.  Thanks. That was painless.
> >
> > c534-ka51 (Idle, Accepting Jobs, Shared)
> > Description: Lexmark C534
> > Location: KA51 KE
> > Driver: Lexmark C534dtn Foomatic/Postscript (recommended) (color, 2-sided printing)
> > Connection: dnssd://c534-ka51._pdl-datastream._tcp.local/
> > Defaults: job-sheets=none, none media=iso_a4_210x297mm sides=one-sided
> >
> > Now my wife's iPad. The iPad sees the Lexmark C534 queue, and printing
> > there works. Glacially slow, but it works, and the iPad gives an
> > unspecific error message ("Error while printing" in German), before the
> > print job prints OK. She doesn't see the mx420-ka51 queue.
> >
> > There is clearly something going wrong here. How can I influence this?
>
> You would have to look at an error_log (how to get one is on the wiki)
> to track if the printing system is responsible for the slowness.

Will the hints given in
https://wiki.debian.org/DissectingandDebuggingtheCUPSPrintingSystem also
apply to buster? The wiki page only mentions jessie and stretch.

Oh, btw, the work you guys have done on the Wiki starting
https://wiki.debian.org/Printing is just great. I love it.

Don't get me started about the CUPS error_log though. Uncounted the
times where stracing the CUPS daemon immediately showed a clear error
message from auxillary proceses such as "ghostscript: unable to write to
/var/tmp, permission denied" but that never showed up in the CUPS
error_log even in the higest debug setting. A horrible mess.

> I am unfamiliar with iDevices but I wouldn't have thought that mattered,
> (maybe). fan can see the mx420-ka51 queue (on parada,we assume), so why
> not the iPad? I'll have a think. You could try setting the queues on fan
> to shared.

The iPad now sees all three queues, and printing on the Lexmark queue
works in reasonable time (now that I have given my wife a simple PDF to
print). The one that was so slow was in color, with color gradients, so
it might have been legitimate to take ages to render. I also have a bank
that keeps sending statement PDFs that literally take five minutes to
render, maybe their (monochrome) logo is sent as a 30.000 dpi bitmap or
so.

> > KDE applications such as okular see historical printer queues that have
> > been deleted from CUPS long ago, "AirPrint_c534_ka51_parada",
> > "Canon_MX420_series_parada" and "Lexmark_C534_parada". none of which
> > seem to work. For example, the Lexmark_C534_parada printer entries does
> > not allow me to set values for Duplex (grey) or nup (not present in the
> > dialogs) printing.
>
> Do you see the same three queues with 'lpstat -l -e'?

Yes, I do, see above. But they don't seem to work, and not all features
of the printer such as duplex printing and not all features of CUPS such
as n-up printing seem to be handed through.

Where does the AirPrint queue come from? It seems to be gratuitous, both
Linux and the iDevices print to the regular "Lexmark_C534_parada" queue
just fine.

> > When I tell okular to actually print, it says on the console
> > "/usr/bin/lpr: No such file or directory", but that file is present,
> > from cups-bsd, and invoking it manually from the same shell says "lpr:
> > Error - No default destination." stracing okular for hints why this
> > fails makes me end up without available printers at all.
>
> You have confirmed Bug #911702. Do you fancy having a go at #911844?

Ouch. Those two, and the upstream bug, and the lack of any
maintainer/upstream reaction looks very very frustrating.

> Installing cups-browsed on fan is necessary to avoid both bugs.

And okular will immediately and happily print once cups-browsed is
installed on fan despite it having CUPS 2.2.10?

After installing cups-browsed on fan I now have:
AirPrint_c534_ka51_parada accepting requests since So 27 Jan 2019 18:50:14 CET
Canon_MX420_series_parada accepting requests since So 27 Jan 2019 18:50:14 CET
Lexmark_C534_parada accepting requests since So 27 Jan 2019 18:50:13 CET
[18/5010]mh@fan:~ $ lpstat -l -e
AirPrint_c534_ka51_parada network none ipp://AirPrint%20c534-ka51%20%40%20parada._ipp._tcp.local/cups
Canon_MX420_series_parada network none ipps://Canon%20MX420%20series%20%40%20parada._ipps._tcp.local/cups
Lexmark_C534_parada network none ipps://Lexmark%20C534%20%40%20parada._ipps._tcp.local/cups
[19/5011]mh@fan:~ $

And, indeed, okular prints just fine to the Lexmark_C534_parada queue, I
can now see and activate all features of the printer, same goes for
LibreOffice. I cannot think of any other use case that I need urgently.

I think that all of my real problems have been solved with your help,
with the only real changes that were done were removing cups-browsed
from parada, deleting all queues on fan and recreating the Lexmark queue
on parada.

Btw, I have been wondering for years whether there is a mechanism
cleaning up temporary spool files from past print jobs on the CUPS
server. /var/*/cups on parada is surprisingly clean in these days, so
there must be some (rather new?) mechanism.

And, also btw, when I print sensitive stuff like passwords etc, would it
be sufficient to temporarily mount a tmpfs over /var/spool/cups and
restart the daemon to avoid this sensitive data staying on disk? Since
the system must always be ready to lose /var/spool, maybe having a LUKS
device mounted with a random key on /var/spool/cups would be a good idea
for parada? Probably also /var/tmp, right (/tmp is a tmpfs anyway).

Greetings
Marc

--
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421

Reply | Threaded
Open this post in threaded view
|

Re: How long until a deleted printer actually vanishes?

Marc Haber-22
In reply to this post by Brian Potkin-2
Hi,

the iPad issue seems to have solved itself by just waiting for a while.
I suspect the iDevice does some caching. I am therefore only replying to
this mail for completeness of archives.

On Sun, Jan 27, 2019 at 05:20:38PM +0000, Brian Potkin wrote:

> On Sat 26 Jan 2019 at 15:51:51 +0100, Marc Haber wrote:
> > Now my wife's iPad. The iPad sees the Lexmark C534 queue, and printing
> > there works. Glacially slow, but it works, and the iPad gives an
> > unspecific error message ("Error while printing" in German), before the
> > print job prints OK. She doesn't see the mx420-ka51 queue.
> >
> > There is clearly something going wrong here. How can I influence this?
>
> Thinking on, how does this sound, Marc?
>
> fan sees the Lexmark and the  MX426. They would also be picked up by
> 'avahi-browse -art'.

Yes, they're visible.

> This implies that all three are on the same subnet.

No, they aren't. The printers, parada, fan, and the iPad are on four
separate VLANs, with my Debian router/firewall, barrida[1], being the
hub. This has the advantage of being able to see the complete traffic of
all machines by tcpdumping on barrida. Both printers are on the same
VLANs.

barrida is also running avahi-daemon in reflector mode:
[2/3341]mh@barrida:~ $ grep -vE '^(#.*|)$' /etc/avahi/avahi-daemon.conf
[server]
use-ipv4=yes
use-ipv6=yes
ratelimit-interval-usec=1000000
ratelimit-burst=1000
[wide-area]
enable-wide-area=yes
[publish]
[reflector]
enable-reflector=yes
[rlimits]
rlimit-core=0
rlimit-data=8388608
rlimit-fsize=0
rlimit-nofile=768
rlimit-stack=8388608
rlimit-nproc=3

which seems to do a good-enough job.

Since the iPad now sees both printers, this case can be closed as well
;-)

Greetings
Marc


[1] just in case if somebody is wondering about the host names, those
are all dance moves

--
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421

Reply | Threaded
Open this post in threaded view
|

Re: How long until a deleted printer actually vanishes?

Brian Potkin-2
In reply to this post by Marc Haber-22
On Sun 27 Jan 2019 at 19:08:22 +0100, Marc Haber wrote:

> On Sat, Jan 26, 2019 at 07:02:21PM +0000, Brian Potkin wrote:
> >
> > My main debugging tool is avahi-browse,
>
> In avahi-browse, I fail to make the connection between the service type
> such as _http._tcp and the output. For example:
>
> [11/5292]mh@drop:~ $ sudo avahi-browse --all --terminate | grep parada
> +  lanw0 IPv6 Lexmark C534 @ parada                         Internet Printer     local
> +  lanw0 IPv6 Canon MX420 series @ parada                   Internet Printer     local
> +  lanw0 IPv6 AirPrint c534-ka51 @ parada                   Internet Printer     local
> +  lanw0 IPv4 AirPrint c534-ka51 @ parada                   Internet Printer     local
> +  lanw0 IPv4 Lexmark C534 @ parada                         Internet Printer     local
> +  lanw0 IPv4 Canon MX420 series @ parada                   Internet Printer     local
> +  lanw0 IPv6 Lexmark C534 @ parada                         Secure Internet Printer local
> +  lanw0 IPv6 Canon MX420 series @ parada                   Secure Internet Printer local
> +  lanw0 IPv4 Lexmark C534 @ parada                         Secure Internet Printer local
> +  lanw0 IPv4 Canon MX420 series @ parada                   Secure Internet Printer local
> +  lanw0 IPv6 Canon MX420 series @ parada                   UNIX Printer         local
> +  lanw0 IPv6 Lexmark C534 @ parada                         UNIX Printer         local
> +  lanw0 IPv4 Canon MX420 series @ parada                   UNIX Printer         local
> +  lanw0 IPv4 Lexmark C534 @ parada                         UNIX Printer         local
> +  lanw0 IPv6 CUPS @ parada                                 Web Site             local
> +  lanw0 IPv4 CUPS @ parada                                 Web Site             local
> [12/5293]mh@drop:~ $

https://developer.apple.com/bonjour/printing-specification/bonjourprinting-1.2.1.pdf

could help.
 

> I would assume that each of this lines has a pseudo "host name" under the .local domain?
>
> Also, avahi-browse --all --terminate --resolve gives me a truckload of messages like
> Failed to resolve service 'Lexmark C534 @ parada' of type '_ipp._tcp' in domain 'local': Timeout reached
> that I cannot make sense from.
>
> When the Lexmark printer is on, avahi-browse on parada also sees it:
> [15/3715]mh@parada:~ $ sudo avahi-browse --all --terminate | grep -iE '(534|lexmark)' | grep -v parada
> +   eth0 IPv4 c534-ka51                                     FTP File Transfer    local
> +   eth0 IPv4 c534-ka51                                     UNIX Printer         local
> +   eth0 IPv4 c534-ka51                                     Internet Printer     local
> +   eth0 IPv4 c534-ka51                                     Web Site             local
> [16/3716]mh@parada:~ $
>
> And I _think_ that the printer prints PDFs uploaded via ftp just fine,
> although CUPS seems to access it via _printer._tcp:
> [21/3721]mh@parada:~ $ sudo lpinfo -v | grep c534
> network dnssd://c534-ka51._printer._tcp.local/
> [22/3722]mh@parada:~ $
>
>
> > but on occasion I have used a
> > .service file in /etc/avahi/services/. See message #7 at
> >
> > https://bugs.launchpad.net/hplip/+bug/1797501
>
> So you basically created a test service in your avahi that _should_ look
> identical to the one you were expecting?

Yes.
 

> > That's ok. You have no local queues set up by you or cups-browsed.
>
> That was my intention for debugging purposes.
>
> > Am I missing something? Where is the Lexmark?
>
> That one was not present at the time of this try. The
> "AirPrint_c534_ka51_parada" definition was a phantom that vanished with
> restarting CUPS on parada. I cannot reproduce this and thus would not
> investigate this any further unless this behavior keeps showing up
>
> > And both can be printed to?
>
> No, the "c534-ka51  Lexmark C534-KA51 on parada" didn't work, and I
> don't remember the message I received when trying to print. I guess that
> there was no error message and the print job just vanished in tht
> darkness.
>
> > So parada was responsible for the Lexmark queue. It's gone now, so we
> > will not worry about it.
>
> Right.
>
> > Not quite. Correct for the GTK print dialog but not for the LibreOffice
> > and Qt ones. On buster, the later two enumerate remote queues and IPP
> > printers using CUPS' temporary queue mechanism (see the wiki Glossary
> > and Index).
>
> Without cups-browsed, lpstat gives me the following:
> [5/3708]mh@parada:~ $ lpstat -a
> c534-ka51 accepting requests since Sa 26 Jan 2019 15:36:04 CET
> mx420-ka51 accepting requests since So 23 Sep 2018 17:06:38 CEST

'lpstat -a' only shows local queues. You have set these two up.

> [6/3709]mh@parada:~ $ lpstat -l -e
> lpstat: Error - unknown option "e".
> [7/3710]mh@parada:~ $

'-e' is a new option to lpstat. buster only.

> [6/4999]mh@fan:~ $ lpstat -a
> lpstat: No destinations added.

Destinations are added when a dialog entry (not GTK) is printed to.

> 1 [7/5000]mh@fan:~ $ lpstat -l -e
> AirPrint_c534_ka51_parada network none ipp://AirPrint%20c534-ka51%20%40%20parada._ipp._tcp.local/cups
> Canon_MX420_series_parada network none ipps://Canon%20MX420%20series%20%40%20parada._ipps._tcp.local/cups
> Lexmark_C534_parada network none ipps://Lexmark%20C534%20%40%20parada._ipps._tcp.local/cups
> [8/5001]mh@fan:~ $
>
> So, CUPS 2.2.10 on fan will create those temporary queues automatically
> even without cups-browsed, right?

Yes. But note that a queue is only created (a PPD appears and stays in
/etc/cups/ppd for a minute) when the dialog entry is printed to. Queues
created by cups-browsed are permanent queues.

> > You would have to look at an error_log (how to get one is on the wiki)
> > to track if the printing system is responsible for the slowness.
>
> Will the hints given in
> https://wiki.debian.org/DissectingandDebuggingtheCUPSPrintingSystem also
> apply to buster? The wiki page only mentions jessie and stretch.

Yes. The page will be reviewed and  readjusted in the near future. Its
general thrust and most of the detail is unchanged by what buster brings
to the table.

> Oh, btw, the work you guys have done on the Wiki starting
> https://wiki.debian.org/Printing is just great. I love it.

Thank you.

> Don't get me started about the CUPS error_log though. Uncounted the
> times where stracing the CUPS daemon immediately showed a clear error
> message from auxillary proceses such as "ghostscript: unable to write to
> /var/tmp, permission denied" but that never showed up in the CUPS
> error_log even in the higest debug setting. A horrible mess.
>
> > I am unfamiliar with iDevices but I wouldn't have thought that mattered,
> > (maybe). fan can see the mx420-ka51 queue (on parada,we assume), so why
> > not the iPad? I'll have a think. You could try setting the queues on fan
> > to shared.
>
> The iPad now sees all three queues, and printing on the Lexmark queue

That's a win, isn't it? Very pleasing because I think it was one of your
main objectives.

> works in reasonable time (now that I have given my wife a simple PDF to
> print). The one that was so slow was in color, with color gradients, so
> it might have been legitimate to take ages to render. I also have a bank
> that keeps sending statement PDFs that literally take five minutes to
> render, maybe their (monochrome) logo is sent as a 30.000 dpi bitmap or
> so.

In many ways the printing system is at the mercy of PDF it has to deal
with. This crops up from time to time; I generally try to avoid dealing
with a user's "bad" PDF issues.

> > > KDE applications such as okular see historical printer queues that have
> > > been deleted from CUPS long ago, "AirPrint_c534_ka51_parada",
> > > "Canon_MX420_series_parada" and "Lexmark_C534_parada". none of which
> > > seem to work. For example, the Lexmark_C534_parada printer entries does
> > > not allow me to set values for Duplex (grey) or nup (not present in the
> > > dialogs) printing.
> >
> > Do you see the same three queues with 'lpstat -l -e'?
>
> Yes, I do, see above. But they don't seem to work, and not all features
> of the printer such as duplex printing and not all features of CUPS such
> as n-up printing seem to be handed through.
>
> Where does the AirPrint queue come from? It seems to be gratuitous, both
> Linux and the iDevices print to the regular "Lexmark_C534_parada" queue
> just fine.
>
> > > When I tell okular to actually print, it says on the console
> > > "/usr/bin/lpr: No such file or directory", but that file is present,
> > > from cups-bsd, and invoking it manually from the same shell says "lpr:
> > > Error - No default destination." stracing okular for hints why this
> > > fails makes me end up without available printers at all.
> >
> > You have confirmed Bug #911702. Do you fancy having a go at #911844?
>
> Ouch. Those two, and the upstream bug, and the lack of any
> maintainer/upstream reaction looks very very frustrating.

A little. But, in time, someone in a position to take action will
notice and act. For the time being, cups-browsed, which will be on
most Linux systems, saves the day. It's best to be pragmatic.
 
> > Installing cups-browsed on fan is necessary to avoid both bugs.
>
> And okular will immediately and happily print once cups-browsed is
> installed on fan despite it having CUPS 2.2.10?

I told you you would be glad to have cups-browsed around. Essentially,
cups-browsed takes over the temporary queue name allotted by CUPS to
create permanent, local queues it can manipulate. For example, CUPS
does not allow filtering of print queues to display, but cups-browsed
does.

> After installing cups-browsed on fan I now have:
> AirPrint_c534_ka51_parada accepting requests since So 27 Jan 2019 18:50:14 CET
> Canon_MX420_series_parada accepting requests since So 27 Jan 2019 18:50:14 CET
> Lexmark_C534_parada accepting requests since So 27 Jan 2019 18:50:13 CET
> [18/5010]mh@fan:~ $ lpstat -l -e
> AirPrint_c534_ka51_parada network none ipp://AirPrint%20c534-ka51%20%40%20parada._ipp._tcp.local/cups
> Canon_MX420_series_parada network none ipps://Canon%20MX420%20series%20%40%20parada._ipps._tcp.local/cups
> Lexmark_C534_parada network none ipps://Lexmark%20C534%20%40%20parada._ipps._tcp.local/cups
> [19/5011]mh@fan:~ $

That's as it should be. In practice (barring bugs) a user would see no
difference, with or without cups-browsed, and printing should "just
work". As I have mentioned above, cups-browsed comes into its own for
things CUPS does not handle. Another example: it can deal with raw
queues being shared by parada.
 
> And, indeed, okular prints just fine to the Lexmark_C534_parada queue, I
> can now see and activate all features of the printer, same goes for
> LibreOffice. I cannot think of any other use case that I need urgently.
>
> I think that all of my real problems have been solved with your help,
> with the only real changes that were done were removing cups-browsed
> from parada, deleting all queues on fan and recreating the Lexmark queue
> on parada.

Splendid.
 
> Btw, I have been wondering for years whether there is a mechanism
> cleaning up temporary spool files from past print jobs on the CUPS
> server. /var/*/cups on parada is surprisingly clean in these days, so
> there must be some (rather new?) mechanism.

I think that is the PreserveJobFiles option. It can go in cups.conf.
The default is 24 hours.

> And, also btw, when I print sensitive stuff like passwords etc, would it
> be sufficient to temporarily mount a tmpfs over /var/spool/cups and
> restart the daemon to avoid this sensitive data staying on disk? Since
> the system must always be ready to lose /var/spool, maybe having a LUKS
> device mounted with a random key on /var/spool/cups would be a good idea
> for parada? Probably also /var/tmp, right (/tmp is a tmpfs anyway).

Sorry, I cannot help with that.

Regards,

Brian.

Reply | Threaded
Open this post in threaded view
|

Re: How long until a deleted printer actually vanishes?

Marc Haber-22
Hi,

On Mon, Jan 28, 2019 at 04:42:13PM +0000, Brian Potkin wrote:
> https://developer.apple.com/bonjour/printing-specification/bonjourprinting-1.2.1.pdf

Ok, that's a bit too much to read between two train stops.

> > Without cups-browsed, lpstat gives me the following:
> > [5/3708]mh@parada:~ $ lpstat -a
> > c534-ka51 accepting requests since Sa 26 Jan 2019 15:36:04 CET
> > mx420-ka51 accepting requests since So 23 Sep 2018 17:06:38 CEST
>
> 'lpstat -a' only shows local queues. You have set these two up.
>
> > [6/3709]mh@parada:~ $ lpstat -l -e
> > lpstat: Error - unknown option "e".
> > [7/3710]mh@parada:~ $
>
> '-e' is a new option to lpstat. buster only.
>
> > [6/4999]mh@fan:~ $ lpstat -a
> > lpstat: No destinations added.
>
> Destinations are added when a dialog entry (not GTK) is printed to.

Ah! There they are.

> > So, CUPS 2.2.10 on fan will create those temporary queues automatically
> > even without cups-browsed, right?
>
> Yes. But note that a queue is only created (a PPD appears and stays in
> /etc/cups/ppd for a minute) when the dialog entry is printed to. Queues
> created by cups-browsed are permanent queues.

And my original issue most probably was that those permanent queues
generated by cups-browsed got broken during some update. That can happen
on Unstable, and I now know to simply delete them.

> > The iPad now sees all three queues, and printing on the Lexmark queue
>
> That's a win, isn't it? Very pleasing because I think it was one of your
> main objectives.

Absolutely!

> > works in reasonable time (now that I have given my wife a simple PDF to
> > print). The one that was so slow was in color, with color gradients, so
> > it might have been legitimate to take ages to render. I also have a bank
> > that keeps sending statement PDFs that literally take five minutes to
> > render, maybe their (monochrome) logo is sent as a 30.000 dpi bitmap or
> > so.
>
> In many ways the printing system is at the mercy of PDF it has to deal
> with. This crops up from time to time; I generally try to avoid dealing
> with a user's "bad" PDF issues.

Wise decision.

> > Ouch. Those two, and the upstream bug, and the lack of any
> > maintainer/upstream reaction looks very very frustrating.
>
> A little. But, in time, someone in a position to take action will
> notice and act.

I surely hope so. Hope dies last. Debian has way too little
knowledgeable people working on KDE, the people working on KDE barely
get it to compile and don't have much time for bug handling.

> > And okular will immediately and happily print once cups-browsed is
> > installed on fan despite it having CUPS 2.2.10?
>
> I told you you would be glad to have cups-browsed around.

Of course, but it was probably better for my understanding to first
simplify, then get the simple variant to work and then to add complexity
again.

> > Btw, I have been wondering for years whether there is a mechanism
> > cleaning up temporary spool files from past print jobs on the CUPS
> > server. /var/*/cups on parada is surprisingly clean in these days, so
> > there must be some (rather new?) mechanism.
>
> I think that is the PreserveJobFiles option. It can go in cups.conf.
> The default is 24 hours.

Looks like the issue is no longer here.

> > And, also btw, when I print sensitive stuff like passwords etc, would it
> > be sufficient to temporarily mount a tmpfs over /var/spool/cups and
> > restart the daemon to avoid this sensitive data staying on disk? Since
> > the system must always be ready to lose /var/spool, maybe having a LUKS
> > device mounted with a random key on /var/spool/cups would be a good idea
> > for parada? Probably also /var/tmp, right (/tmp is a tmpfs anyway).
>
> Sorry, I cannot help with that.

No problem, I'll do some experiments with that. Printing sensitive data
is seldomly a good idea, but having a hard copy backup of key material
in a bank locker sometimes needs to do things that might look stupid in
the first place.

Greetings
Marc


--
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421

Reply | Threaded
Open this post in threaded view
|

Re: How long until a deleted printer actually vanishes?

Brian Potkin-2
In reply to this post by Brian Potkin-2
On Mon 28 Jan 2019 at 16:42:13 +0000, Brian Potkin wrote:

> On Sun 27 Jan 2019 at 19:08:22 +0100, Marc Haber wrote:
>
> > On Sat, Jan 26, 2019 at 07:02:21PM +0000, Brian Potkin wrote:
> >
> > > > When I tell okular to actually print, it says on the console
> > > > "/usr/bin/lpr: No such file or directory", but that file is present,
> > > > from cups-bsd, and invoking it manually from the same shell says "lpr:
> > > > Error - No default destination." stracing okular for hints why this
> > > > fails makes me end up without available printers at all.
> > >
> > > You have confirmed Bug #911702. Do you fancy having a go at #911844?
> >
> > Ouch. Those two, and the upstream bug, and the lack of any
> > maintainer/upstream reaction looks very very frustrating.
>
> A little. But, in time, someone in a position to take action will
> notice and act. For the time being, cups-browsed, which will be on
> most Linux systems, saves the day. It's best to be pragmatic.

I suppose Good Things happen all the time. This is one of those times:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911844#146

This mail is being sent because Marc experienced the Okular issue and
expressed an interest in it.

I do not use Okular but am glad it fits into the printing system more
sensibly now.

Regards,

Brian.