You are not logged in.

#1 2021-05-30 23:38:39

j@s0n
Member
Registered: 2020-08-15
Posts: 35

Determine the address for a CUPS printer server

I set up my Brother printer via USB on my Arch desktop machine. It works properly on this machine. Under CUPS, I selected "Share printers connected to this system" and "Advertise web interface". When I added the printer, I selected "Share this printer".
On my Arch notebook, I am able to ping and ssh to the desktop. They're both on the 192.168.86.* subnet. When I add a printer using the cups interface, I don't see the Brother under the Discovered Network Printers section (I do see my wife's HP Photo printer, so CUPS is connecting to the network). I tried using ipp, http, and lpr to connect guessing at what the address might be (e.g. "lpd://fry/Brother_MFC-7340", "http://fry:631/ipp/", "http://fry:631/ipp/port1/"), but none of them worked.

Is there a way on the CUPS server to display the connection string I need to use on the client to connect? Or to verify that my sharing attempt was successful?

On the CUPS printer info page, all I have is this:
Brother_MFC-7340 (Idle, Accepting Jobs, Shared, Server Default)
Description:    Brother MFC-7340
Location:    In the corner
Driver:    Brother MFC-7340 for CUPS (grayscale)
Connection:    usb://Brother/MFC-7340?serial=000A0N753325
Defaults:    job-sheets=none, none media=na_letter_8.5x11in sides=one-sided

Offline

#2 2021-05-31 13:46:55

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,982

Re: Determine the address for a CUPS printer server

You need to setup a bit more for sharing to work.

Check https://wiki.archlinux.org/title/CUPS/P … er_sharing


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2021-05-31 18:30:50

j@s0n
Member
Registered: 2020-08-15
Posts: 35

Re: Determine the address for a CUPS printer server

I followed those steps and all the changes it said to make were already there. And I still don't see the printer.

Offline

#4 2021-05-31 20:44:59

seth
Member
Registered: 2012-09-03
Posts: 51,945

Re: Determine the address for a CUPS printer server

Is your "wife's HP Photo printer" also on the "fry" host?
(If not,) Can you open http://fry:631 ?
(If not,) please post your cups.conf - "all the changes it said to make" are partly alternatives (and that already assumes that you're not using eg. smb to share the printer)

Offline

#5 2021-06-03 01:53:55

j@s0n
Member
Registered: 2020-08-15
Posts: 35

Re: Determine the address for a CUPS printer server

The HP printer is not on a host. It's a networked printer.

I was able to connect to fry:631 from my Arch notebook. I get the CUPS Web UI. When I tried to go to the printers tab, I received a "Forbidden" response. I also get that when I connect via the IP address.

Here's my cupsd.conf:

 LogLevel warn
MaxLogSize 1m
ErrorPolicy stop-printer
Port 631
Listen 192.168.86.32:631
Browsing On
BrowseLocalProtocols dnssd
DefaultAuthType Basic
WebInterface Yes
<Location />
  Order allow,deny
  Allow localhost
  Allow 192.168.0.*
</Location>
<Location /admin>
</Location>
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
</Location>
<Location /admin/log>
  AuthType Default
  Require user @SYSTEM
</Location>
<Policy default>
  JobPrivateAccess default
  JobPrivateValues default
  SubscriptionPrivateAccess default
  SubscriptionPrivateValues default
  <Limit Create-Job Print-Job Print-URI Validate-Job>
    Order deny,allow
  </Limit>
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
<Policy authenticated>
  JobPrivateAccess default
  JobPrivateValues default
  SubscriptionPrivateAccess default
  SubscriptionPrivateValues default
  <Limit Create-Job Print-Job Print-URI Validate-Job>
    AuthType Default
    Order deny,allow
  </Limit>
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Cancel-Job CUPS-Authenticate-Job>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
<Policy kerberos>
  JobPrivateAccess default
  JobPrivateValues default
  SubscriptionPrivateAccess default
  SubscriptionPrivateValues default
  <Limit Create-Job Print-Job Print-URI Validate-Job>
    AuthType Negotiate
    Order deny,allow
  </Limit>
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
    AuthType Negotiate
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Cancel-Job CUPS-Authenticate-Job>
    AuthType Negotiate
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
BrowseWebIF Yes

Offline

#6 2021-06-03 05:58:35

seth
Member
Registered: 2012-09-03
Posts: 51,945

Re: Determine the address for a CUPS printer server

Listen 192.168.86.32:631
Browsing On
BrowseLocalProtocols dnssd
DefaultAuthType Basic
WebInterface Yes
<Location />
  Order allow,deny
  Allow localhost
  Allow 192.168.0.*
</Location>

One subnet is not like the other…

Offline

#7 2021-06-03 17:39:27

j@s0n
Member
Registered: 2020-08-15
Posts: 35

Re: Determine the address for a CUPS printer server

I had 192.168.86.* before, which didn't work. The CUPS document has 192.168.0.*, which I thought might be some sort of "match any" value for CUPS, so I tried that.

With either value, I still can't add the printer from my notebook. But when I changed it from 0 to 86, I can see the printer under fry:631/printers from the notebook. But that doesn't allow me to add it on the notebook.

Offline

#8 2021-06-03 19:22:39

seth
Member
Registered: 2012-09-03
Posts: 51,945

Re: Determine the address for a CUPS printer server

thought might be some sort of "match any" value

No. The asterisk is, "0" isn't.

But that doesn't allow me to add it on the notebook.

What does that mean, exactly?
fry:631/printers/whatever_the_printer should list a connection for the printer, can you add the printer to the local cups using this connection?

Offline

#9 2021-06-03 19:59:37

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: Determine the address for a CUPS printer server

Switch to the command line and let's see the output of your attempts. Start by:

lpinfo -v

Turn to https://www.cups.org/doc/admin.html for more info on this and other helpful commands.

Offline

#10 2021-06-03 22:31:11

j@s0n
Member
Registered: 2020-08-15
Posts: 35

Re: Determine the address for a CUPS printer server

But that doesn't allow me to add it on the notebook.

What does that mean, exactly?

From the notebook, I can connect to the CUPS server web UI on the printer host and see jobs, manage the printer, etc. using http://<printer_host>:631/printers/Brother_MFC-7340

fry:631/printers/whatever_the_printer should list a connection for the printer, can you add the printer to the local cups using this connection?

The connection address on the printer host is "usb://Brother/MFC-7340?serial=000A0N753325", because it's a local printer.

lpinfo -v on the printer host:

file cups-brf:/
network beh
network http
network https
network ipps
network socket
network lpd
network ipp
direct usb://Brother/MFC-7340?serial=000A0N753325
network dnssd://HP%20ENVY%20Photo%207800%20series%20%5BFE4F8C%5D._ipp._tcp.local/?uuid=d747f9fc-6b11-5830-ac4a-48b7f1ac837e
network socket://192.168.86.20:9100
network ipps://HP%20ENVY%20Photo%207800%20series%20%5BFE4F8C%5D._ipps._tcp.local/

The HP Envy Printer is also the socket://... printer.

lpinfo -v on the notebook:

network beh
network ipps
network https
file cups-brf:/
network socket
network ipp
network lpd
network http
network smb
network socket://192.168.86.20:9100

Offline

#11 2021-06-04 04:29:39

seth
Member
Registered: 2012-09-03
Posts: 51,945

Re: Determine the address for a CUPS printer server

Does the webpage for the printer say that it's being shared?
https://www.cups.org/doc/admin.html#SHARING

Offline

#12 2021-06-04 04:33:30

j@s0n
Member
Registered: 2020-08-15
Posts: 35

Re: Determine the address for a CUPS printer server

On http://localhost:631/printers/Brother_MFC-7340:

Brother_MFC-7340 (Idle, Accepting Jobs, Shared, Server Default)

Offline

#13 2021-06-04 04:48:33

seth
Member
Registered: 2012-09-03
Posts: 51,945

Re: Determine the address for a CUPS printer server

Wild guess: do you have https://aur.archlinux.org/packages/brother-mfc7340/ on the client as well?

Offline

#14 2021-06-04 05:44:54

j@s0n
Member
Registered: 2020-08-15
Posts: 35

Re: Determine the address for a CUPS printer server

Yes. I had the printer connected to the notebook at one point. I removed it from the CUPS devices there before trying to set it up as a network printer.

Offline

#15 2021-06-04 06:18:24

seth
Member
Registered: 2012-09-03
Posts: 51,945

Re: Determine the address for a CUPS printer server

You probably don't have the avahi-daemon running, can you connect the printer by adding an IPP printer and using

ipp://fry/printers/Brother_MFC-7340

or

http://fry:631/printers/Brother_MFC-7340/.printer

as connection?

Offline

#16 2021-06-04 07:20:55

j@s0n
Member
Registered: 2020-08-15
Posts: 35

Re: Determine the address for a CUPS printer server

I had avahi-daemon running on the print host, but not the notebook. When I started it there, I was able to add the printer on the notebook as a network printer. I tried printing a test page and the job is stuck in the processing state. On the print host's CUPS UI, I don't see any pending jobs.

Offline

#17 2021-06-04 07:26:06

seth
Member
Registered: 2012-09-03
Posts: 51,945

Re: Determine the address for a CUPS printer server

What is it added as (protocol, url)?
Raise the debug level in either cups instance and see what gets logged where for your printing attempt: https://wiki.archlinux.org/title/CUPS/T … #Debug_log

Offline

#18 2021-06-04 18:46:23

j@s0n
Member
Registered: 2020-08-15
Posts: 35

Re: Determine the address for a CUPS printer server

Connection:    dnssd://Brother%20MFC-7340%20%40%20fry._ipps._tcp.local/cups?uuid=8d466b82-ea61-3173-656b-2e303ac1f67a

That's how it connected after auto detection. The status in CUPS now says "Unable to locate printer 'fry.local'".
I didn't see anything in the log that looked out of place I can post the content if that would help.

I tried using the suggest ipp address and printed a test page. The client said it sent the job. The CUPS server showed it under active, then completed, jobs. There were entries in the access and page logs for the job, but nothing showed up on the printer. I also tried printing a PDF from Chrome, with the same results. To make sure the printer didn't suddenly break, I then successfully printed a test page from the print host CUPS UI.

Offline

#19 2021-06-04 20:46:59

seth
Member
Registered: 2012-09-03
Posts: 51,945

Re: Determine the address for a CUPS printer server

I tried using the suggest ipp address and printed a test page. The client said it sent the job. The CUPS server showed it under active, then completed, jobs. There were entries in the access and page logs for the job, but nothing showed up on the printer.

Anything in the logs about that attempt?

Offline

#20 2021-06-04 21:20:54

j@s0n
Member
Registered: 2020-08-15
Posts: 35

Re: Determine the address for a CUPS printer server

There were entries in the access and page logs, but not the error log.

Offline

#21 2021-06-05 06:32:23

seth
Member
Registered: 2012-09-03
Posts: 51,945

Re: Determine the address for a CUPS printer server

On the host?
Can you please post the logs?

Offline

#22 2021-06-05 07:16:21

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: Determine the address for a CUPS printer server

Increase the log level until you see anything and post the logs.

Last edited by tucuxi (2021-06-05 07:16:53)

Offline

Board footer

Powered by FluxBB