Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 505128 - net-print/cups-1.7.1 mangles networked printer hostnames
Summary: net-print/cups-1.7.1 mangles networked printer hostnames
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-20 05:49 UTC by Paramonov Valeriy
Modified: 2021-08-18 06:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,8.71 KB, text/plain)
2014-03-20 05:53 UTC, Paramonov Valeriy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paramonov Valeriy 2014-03-20 05:49:01 UTC
Hello everyone.

There is kps.loc network with DHCP over dnsmasq. Hosts names as sales-1.kps.loc, sales-2.kps.loc etc. Printers names as hosts: sales-1, sales-2 etc. Next I mean connections between two CUPS 1.7.1. I just open firefox on sales-2 host and go to localhost:631/printers. There is no local printers installed, shown only discovered network printers from sales-1 host, but if I move the mouse over the printer, I see such link:

ipps://sales-1.local:631/printers/sales-1	

instead of
	
http://sales-1.kps.loc:631/printers/sales-1	
or
http://<ip address>:631/printers/sales-1	


If I click to link then Firefox says "Unknown address type" (ipps) and I can't administrate it.
If I try to print to, then I got such error in printer status:

Processing - "Unable to locate printer "sales-1.local"	

There is strange errors:
1. Instead of ipps must be https or http.
2. Instead of "sales-1.local" must be "sales-1.kps.loc" or just "sales-1". We have kps.loc network, but not noname ".local"
3. ping sales-1 or sales-1.kps.loc works fine, but ping sales-1.local does not. http://sales-1:631/printers/sales-1 in firefox works fine, but remote server does not receive any jobs, because sales-2 CUPS server does not lookup remote host sales-1.
4. avahi-daemon and cups-browsed running on both sides.

Printing does not work. Then I switched off USE flags avahi and zeroconf and update world but no result. Now network printers not visible anymore.

It is my fault? Or I don't understand something?
How to repair network printing?

Help please! Thanks!

Reproducible: Always
Comment 1 Paramonov Valeriy 2014-03-20 05:53:32 UTC
Created attachment 373076 [details]
emerge --info
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-03-20 14:42:21 UTC
Please post your `emerge -vpq net-print/cups' output in a comment.
Comment 3 Paramonov Valeriy 2014-03-20 14:59:55 UTC
(In reply to Jeroen Roovers from comment #2)
> Please post your `emerge -vpq net-print/cups' output in a comment.

[ebuild   R   ] net-print/cups-1.7.1  USE="X acl dbus gnutls java kerberos pam python ssl threads usb xinetd zeroconf -debug -lprng-compat (-selinux) -static-libs" LINGUAS="ru -ca -es -fr -it -ja" PYTHON_SINGLE_TARGET="python2_7 -python2_6" PYTHON_TARGETS="python2_7 -python2_6"

But I also builded without zeroconf and avahi. In this case network printers was not showed at all.
Comment 4 Paramonov Valeriy 2014-03-20 15:32:38 UTC
Now I return avahi and zeroconf flags. 
If I stop cups-browsed, then I can find printers manually and add them, but printing still not work with the same error:

Processing - "Unable to locate printer "sales-1.local"
Comment 5 Paramonov Valeriy 2014-03-20 15:58:38 UTC
If I add such string 
"<IP> sales-1.local" to /etc/hosts, then printing works well.
Comment 6 Paramonov Valeriy 2014-03-23 18:34:33 UTC
Hello.
Now I have a solution. This actions for both sides with 1.7.1:

1. set on mdnsresponder-compat zeroconf avahi autoipd

2. emerge -av nss-mdns avahi cups cups-filters

3. modify the configuration file /etc/nsswitch.conf
hosts:       files mdns4_minimal [NOTFOUND=return] dns mdns4

4. modify the configuration file /etc/cups/cups-browsed.conf 
BrowseProtocols DNSSD

5. /etc/init.d/cups-browsed restart (will restart cupsd too)

Now links to network printers have true network paths (ip:631/printers/printer), administration and printing works fine.

But if we will stop the cups-browsed, then network printers will not appear at all, even through administration->find new printer.

Thanks.
Comment 7 Andreas K. Hüttel archtester gentoo-dev 2017-02-11 22:49:33 UTC
Does this still apply to current cups (2.1 / 2.2)?