Hi all,
Been having problems figuring out how to print to a remote CUPS server. Followed a couple of "tutorials" [1] and spoke to people in #cups but nothing seems to help.
Environment: - Fedora Core 6 machine "A" (CUPS server, CUPS 1.4.x) - Fedora Core 6 machine "B" (CUPS client, CUPS 1.2.x) - USB printer
ASCII Art: [B]--------[A]-----[Printer]
Goal: Enable machine B to print to the Printer, using the CUPS server on A.
Guides tell me to run lpstat -t on both A and B to verify that the printers are detected.
lpstat -t on A: scheduler is running system default destination: Brother_QL-1050 device for Brother_QL-1050: usb://Brother/QL-1050 Brother_QL-1050 accepting requests since Wed 09 Dec 2009 04:50:22 PM GMT printer Brother_QL-1050 is idle. enabled since Wed 09 Dec 2009 04:50:22 PM GMT lpstat: No printer-uri in request!
lpstat -t on B:
scheduler is running no system default destination lpstat: No printer-uri in request!
Looking at the logs (with debug2 enabled) on machine A, it seems that it never returns sensible values in return to a CUPS-Get-Printers command when requested by machine B.
The logs are very long, so I paste-binned them at: http://pastebin.com/Han6qXkv
Server (host A) config after web interface was used: http://pastebin.com/g9aqUr4b
Client (host B) has lines ServerName and BrowsePoll with the appropriate host names for the server A, and host B can resolve and ping it.
When lptstat is run on machine A, the correct output seems to be:
D [03/Jun/2010:08:48:00 +0100] cupsdReadClient: 11 1.1 CUPS-Get-Printers 1 d [03/Jun/2010:08:48:00 +0100] cupsdProcessIPPRequest(0x80b4b1c0[11]): operation_id = 4002 D [03/Jun/2010:08:48:00 +0100] CUPS-Get-Printers d [03/Jun/2010:08:48:00 +0100] get_printers(0x80b4b1c0[11], 0) d [03/Jun/2010:08:48:00 +0100] cupsdFindPolicyOp(p=0x80aed258, op=4002(CUPS-Get-Printers)) d [03/Jun/2010:08:48:00 +0100] cupsdFindPolicyOp: Found wildcard match... d [03/Jun/2010:08:48:00 +0100] cupsdIsAuthorized: con->uri="/", con->best=0x80b35648((null)) d [03/Jun/2010:08:48:00 +0100] cupsdIsAuthorized: level=CUPSD_AUTH_ANON, type=None, satisfy=CUPSD_AUTH_SATISFY_ALL, num_names=0 d [03/Jun/2010:08:48:00 +0100] cupsdIsAuthorized: op=0(unknown-0000) d [03/Jun/2010:08:48:00 +0100] cupsdIsAuthorized: auth=CUPSD_AUTH_ALLOW... d [03/Jun/2010:08:48:00 +0100] add_printer_state_reasons(0x80b4b1c0[11], 0x80aed3c8[Brother_QL-1050]) d [03/Jun/2010:08:48:00 +0100] copy_attrs(to=0x80b2dc90, from=0x80b36208, ra=0x80b2e390, group=0, quickcopy=0) d [03/Jun/2010:08:48:00 +0100] copy_attribute(0x80b2dc90, 0x80af28e0[printer-name,4,42]) d [03/Jun/2010:08:48:00 +0100] copy_attribute(0x80b2dc90, 0x80aeeb70[printer-info,4,41]) d [03/Jun/2010:08:48:00 +0100] copy_attribute(0x80b2dc90, 0x80afa838[job-sheets-default,4,42]) d [03/Jun/2010:08:48:00 +0100] copy_attrs(to=0x80b2dc90, from=0x80aebe90, ra=0x80b2e390, group=0, quickcopy=0) d [03/Jun/2010:08:48:00 +0100] copy_attribute(0x80b2dc90, 0x80b36040[printer-make-and-model,4,41]) d [03/Jun/2010:08:48:00 +0100] copy_attrs(to=0x80b2dc90, from=0x80aebe08, ra=0x80b2e390, group=0, quickcopy=-2147483648) D [03/Jun/2010:08:48:00 +0100] Returning IPP successful-ok for CUPS-Get-Printers (no URI) from localhost
I have also used elinks and set the printer sharing option, and allow from Internet is enabled.
Is anyone able to offer any hints please?
Thanks very kindly, Srdjan
[1] - http://www.tjansson.dk/?p=54 - http://www.gentoo.org/doc/en/printing-howto.xml - http://webcache.googleusercontent.com/search?q=cache:Y9-bp2ok5uUJ:avasys.jp/... - http://ubuntuforums.org/showthread.php?t=93328
On 03/06/10 10:17, Srdjan Todorovic wrote:
Hi all,
Been having problems figuring out how to print to a remote CUPS server. Followed a couple of "tutorials" [1] and spoke to people in #cups but nothing seems to help.
Environment: - Fedora Core 6 machine "A" (CUPS server, CUPS 1.4.x) - Fedora Core 6 machine "B" (CUPS client, CUPS 1.2.x) - USB printer
ASCII Art: [B]--------[A]-----[Printer]
Goal: Enable machine B to print to the Printer, using the CUPS server on A.
This is almost what I have.
ASCII Art:
[B] --------[A]-----[lp1] [C] ----/ --[lp2]
All I had to do to make it work was define the printers to CUPS on server [A] and run the command:
sudo iptables -A INPUT -p tcp --dport 631 -j ACCEPT
to open the firewalls on the server and both clients.
Hi,
On 3 June 2010 11:51, nev young nev@nevilley.demon.co.uk wrote:
On 03/06/10 10:17, Srdjan Todorovic wrote:
Been having problems figuring out how to print to a remote CUPS server. Followed a couple of "tutorials" [1] and spoke to people in #cups but nothing seems to help.
Environment: - Fedora Core 6 machine "A" (CUPS server, CUPS 1.4.x) - Fedora Core 6 machine "B" (CUPS client, CUPS 1.2.x) - USB printer
ASCII Art: [B]--------[A]-----[Printer]
Goal: Enable machine B to print to the Printer, using the CUPS server on A.
This is almost what I have.
ASCII Art:
[B] --------[A]-----[lp1] [C] ----/ --[lp2]
All I had to do to make it work was define the printers to CUPS on server [A] and run the command:
sudo iptables -A INPUT -p tcp --dport 631 -j ACCEPT
to open the firewalls on the server and both clients.
I dont think it's a firewall issue. I have straced lpstat and can see that it connects ok to the remote CUPS server.
Could you please email me your cups server config file? I think that could be very useful to determine if I've got a configuration error.
Another thing I have thought of trying was to get the same version of CUPS on both machines - but I find it hard to believe that the CUPS developers would have released a newer version of CUPS in the same major release that would have broken the inter-CUPS protocols.
Thanks, Srdjan
On 03 Jun 12:05, Srdjan Todorovic wrote:
Hi,
On 3 June 2010 11:51, nev young nev@nevilley.demon.co.uk wrote:
On 03/06/10 10:17, Srdjan Todorovic wrote:
Been having problems figuring out how to print to a remote CUPS server. Followed a couple of "tutorials" [1] and spoke to people in #cups but nothing seems to help.
Environment: - Fedora Core 6 machine "A" (CUPS server, CUPS 1.4.x) - Fedora Core 6 machine "B" (CUPS client, CUPS 1.2.x) - USB printer
ASCII Art: [B]--------[A]-----[Printer]
Goal: Enable machine B to print to the Printer, using the CUPS server on A.
This is almost what I have.
ASCII Art:
[B] --------[A]-----[lp1] [C] ----/ --[lp2]
All I had to do to make it work was define the printers to CUPS on server [A] and run the command:
sudo iptables -A INPUT -p tcp --dport 631 -j ACCEPT
to open the firewalls on the server and both clients.
I dont think it's a firewall issue. I have straced lpstat and can see that it connects ok to the remote CUPS server.
Could you please email me your cups server config file? I think that could be very useful to determine if I've got a configuration error.
Another thing I have thought of trying was to get the same version of CUPS on both machines - but I find it hard to believe that the CUPS developers would have released a newer version of CUPS in the same major release that would have broken the inter-CUPS protocols.
Have you remembered to tick the box to share the printer... if you don't share it, it'll not appear... if you do share it, then you should be able to avahi-browse it...
avahi-browse -t _ipp._tcp
Should list it in it's output... e.g.
brettp@erwin:~$ avahi-browse -t _ipp._tcp + vpn6 IPv6 Xerox Phaser 6110 @ fleur.catnip.org.uk Internet Printer local + vpn6 IPv6 laserjet @ fleur.catnip.org.uk Internet Printer local brettp@erwin:~$
If that's done, then you should be able to just do a Find Printers in cups on the client and it'll just work...
(I would point out that peversely those 2 printers are sitting in my flat at home in Brighton, and I'm sitting in Port Solent... and that I configured those in to the setup on my laptop this morning, but people might think me a little odd... I have a tunnel'd ipv6 setup and the laptop and the desktop at home are on the same subnet, hence being able to browse them from, erm, basically anywhere :)
Cheers,
On 3 June 2010 12:21, Brett Parker iDunno@sommitrealweird.co.uk wrote:
avahi-browse -t _ipp._tcp
Should list it in it's output... e.g.
brettp@erwin:~$ avahi-browse -t _ipp._tcp
- vpn6 IPv6 Xerox Phaser 6110 @ fleur.catnip.org.uk Internet Printer local
- vpn6 IPv6 laserjet @ fleur.catnip.org.uk Internet Printer local
brettp@erwin:~$
If that's done, then you should be able to just do a Find Printers in cups on the client and it'll just work...
Brett has very kindly walked me through the steps to set this up, and now lpstat -t shows the printer as detected.
For those that are interested, it was a per-printer share checkbox that I missed (I blame the ncurses interface :P ).
Also of note, the avahi-browse command did not pick up the relevant printer - though it did pick up a different printer altogether.
Much thanks again, Brett - let me know if you are ever in the area so I can buy you a pint.
Srdjan
On 03/06/10 12:05, Srdjan Todorovic wrote:
Hi,
to open the firewalls on the server and both clients.
I dont think it's a firewall issue. I have straced lpstat and can see that it connects ok to the remote CUPS server.
Could you please email me your cups server config file? I think that could be very useful to determine if I've got a configuration error.
mailed direct cos it's a bit big.