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

Re: How long until a deleted printer actually vanishes?



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 to: