LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   CUPS Printing. Client can not connect? (https://www.linuxquestions.org/questions/linux-server-73/cups-printing-client-can-not-connect-4175606897/)

AndersWinthereik 05-29-2017 10:18 AM

CUPS Printing. Client can not connect?
 
I bought a new printer.
The old one was set up on my Mint-server, with cups, and I could print both directly on the server, and also connect and print from my clients(also linux).
Connected the new printer via usb. Installed the correct driver(Brother), and I can print from the server. Fine.

On my laptop: Removed the old printer. Searched for the new. Found it. Correct name and all. But when I try to print, it tells me that I am not connected? The printer just says idle/sleep.

Connecting til [server]:631 (CUPS). It shows the printer, but sees nothing in the print queue.

Can anyone help?

Kind Regards
Anders

ferrari 05-29-2017 08:04 PM

1) Can you tell us which CUPS versions are installed on both server and client? One way to get that info is to run the following on both machines...
Code:

cups-config --version
2) Is the printer shared on the server?

3) On your client, what is reported via
Code:

lpinfo -v
FWIW, I have a CUPS server (v1.7.5) attached to a USB-connected Brother multi-function laser printer. My laptop client (CUPS v 2.1.3) is running 'cups-browsed' to create local queue automatically. I can print from the client machine without issue.

ferrari 05-29-2017 09:38 PM

Please also show us the defined printer URI you have configured explicitly in the client...
Code:

lpstat -t

AndersWinthereik 05-30-2017 12:57 AM

Thanks for your quick reply :cool:!

Code:

[Server]:$ cups-config --version
1.7.2

Code:

[Client]:$ cups-config --version
2.2.0

Sharing: I have not done anything to share the new printer on the server, besides registering it on CUPS (and expecting the configuration for the former printer would work for the new one)

Code:

[Client]:~$ lpinfo -v
network beh
network http
network lpd
network https
network ipp14
network ipps
network ipp
network socket
direct hp
direct hpfax
network dnssd://Brother%20HL-L2340D%20series._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-d80f991a6c6b
network dnssd://Brother%20HL-L2340D%20series%20%40%20MintBox._ipp._tcp.local/cups?uuid=e7699b02-e56e-32bf-5330-61d2da6edf8b
network dnssd://Brother%20HL-L2340D%20series._pdl-datastream._tcp.local/
network lpd://BRWD80F991A6C6B/BINARY_P1

Code:

[Client]:~$ lpstat -t
scheduler is running
system default destination: Brother-HL-L2340D-series
device for Brother-HL-L2340D-series: dnssd://Brother%20HL-L2340D%20series%20%40%20MintBox._ipp._tcp.local/cups?uuid=e7699b02-e56e-32bf-5330-61d2da6edf8b
Brother-HL-L2340D-series accepting requests since Mon 29 May 2017 08:07:58 PM CEST
printer Brother-HL-L2340D-series is idle.  enabled since Mon 29 May 2017 08:07:58 PM CEST


ferrari 05-30-2017 03:20 AM

Ok, so your printer queue for the remote CUPS printer is using the dnssd backend ie using Avahi for printer discovery. The printer state is idle which is a good sign. I'm surprised that this is not working for you though. When you submit a print job, examine /var/log/cups/error_log for errors.

You could try configuring using the the ipp backend to reach the CUPS printer instead...
Code:

ipp://IP address_of_CUPS_server/printers/Brother-HL-L2340D-series

ferrari 05-30-2017 03:40 AM

What I think is the best approach is to use the Avahi-based advertising/discovery (that CUPS now uses) with cups-browsed running on the client. This will create a local print queue automatically when the remote printer when is available. That's what I currently do.

AndersWinthereik 05-30-2017 04:08 AM

Thank you so much, ferrari!
Will try when I get home later.
I have very little experience with this print/cups/network-configuration, and i am quite confused about these different protocols, dnssd/ipp
When searching for the printer on the network, I got 3 suggestions for that single printer. Guess it is the different protocols it offers?
What is cups-browsed? A listening-deamon which is not included in the standard cups-packages?

regards, Anders

ferrari 05-30-2017 04:43 AM

Let me know how you get on. So just to clarify, you have two choices here

1) Manually a local queue for the remote printer using the IPP backend (as explained already)

or

2) Automate the remote discovery/configuration with the use of cups-browsed. This daemon can do a few things as described in 'man cups-browsed'
Quote:

DESCRIPTION
cups-browsed has four independently switchable functions:

1. Browse Bonjour broadcasts of remote printers and create/remove local raw queues pointing to these printers.

2. Browse CUPS broadcasts of remote printers and create/remove local raw queues pointing to these printers.

3. Browse an LDAP server for printers and create/remove local raw queues pointing to these printers.

4. Broadcast local queues with the CUPS protocol.

Note that 2. and 4. are only to allow communication with legacy CUPS servers (1.5.x or older) on the remote machine(s). The standard method
to broadcast for shared/network printers to broadcast their presence is Bonjour. The CUPS broadcasting/browsing protocol is deprecated.
In this case it is function 1 that is of use to you. No configuration should be necessary, just make sure it is enabled/started.

Assuming you're running Mint on your laptop...
https://community.linuxmint.com/soft...w/cups-browsed

If you need further assistance with this let me know which distro version you're using (as systemd changes the commands needed to get it enabled/started).


All times are GMT -5. The time now is 08:19 AM.