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

Re: How long until a deleted printer actually vanishes?



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