Trouble with CUPS

When I use localhost :631 to manage my printers in Debian , I get a list of 2 available printers. One works OK.
The other ( a Brother inkjet printer on an ethernet connection) is listed OK, but when I try to print a test page it says the following


I dont have kerberos turned on , and there is nowhere to enter a username and password?

The same printer in Devuan works fine
I uninstalled and reinstalled CUPS, but it made no difference.
The only thing I can think of is the printer drivers are wrongly installed in Debian … strange because everything used to work? The drivers have to be manually installed from .deb files. Maybe an update corrupted them?

Any ideas welcome.

Maybe @kovacslt will come in. He’s an expert with Debian.

Hello… Someone called my name :smiley:
Actually, I’m no expert, I consider myself a power user of Debian.
@nevj, I’ve never seen this error. What system are you on?

Anyway, I found this:

https://bbs.archlinux.org/viewtopic.php?id=235841

May this be relevant to you?

What does
sudo lpstat -v
output?

I am on Debian 11. It is up to date.
So I have the same CUPS as in your Debian.

Yes that is exactly my error. But it only happens for my Brother inkjet printer when I try to print a testpage. For the other printer, an OKI pageprinter, it behaves normally and I get a test page printed. Both printers are ethernet linked.

I also have Devuan 4. There is no problem with CUPS in Devuan.
I wonder if systemd is involved? That would be the only difference between Debian and Devuan

Thanks
Neville

Are both printers set up using the result of the sudo lpstat -v command? Of course, modified to select the specific printer.

My Canon TR8600 series when queried with the sudo lpstat -v command returns:
ipp://Canon%20TR8600%20series._ipp._tcp.local/

This avoids the difficulties of the ip address changing over time, as you may know.

1 Like

CUPS can be a piece of crap sometimes with it’s bullshit network ACL’s…

I recently did a bunch of work for a customer when they added a new bunch of VLANs that users were accessing it (CUPS web UI) from…

/etc/cups/cupsd.conf :

# Restrict access to the server...
<Location />
  Order allow,deny
  Allow localhost
  Allow 172.22.*.*
  Allow 10.100.*.*
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Encryption IfRequested
  Order allow,deny
  Allow 172.22.*.*
  Allow 10.100.*.*
</Location>

i.e. VPN users from outside 172.22..(/16) VLAN, were on 10.100.. - were unable to access the pages (they didn’t have, or need, “root”).

So I had to add :

Allow 10.100.*.*

to BOTH those stanzas…

1 Like
nevj@trinity:~$ su
Password: 
root@trinity:/home/nevj# lpstat -v
device for MFC210C: lpd://192.168.32.98/binary_p1
device for OKI: socket://192.168.32.99

and in the browser

Description:	MFC210C
Location:	Office
Driver:	Brother MFC-210C CUPS v1.1 (color)
Connection:	lpd://192.168.32.98/binary_p1
Defaults:	job-sheets=none, none media=iso_a4_210x297mm sides=one-sided

That is as in the Brother instructions.

So I am not using IPP

I did apt-get purge cups followed by apt-get install cups. It did not remove the config files. I think I need to wipe the config files and start from scratch

What about to look at some differences between the system it works and doesn’t?
Do you remember how you installed it in Devuan; did you follow the same steps for Debian?

So what tells the same sudo lpstat -v in Devuan?
Is there an obvious difference?
Going forward:
groups
(Without sudo, just as the regular user you try to use the printer with)
Check if driver is installed:
dpkg -l mfc2*
Is the spool directory there?
ls /var/spool/lpd/ -l

See what ‘cups’ related stuff are installed:
dpkg -l cups*
dpkg -l fooma*

I’d look at all those output on both systems, where the printer works and where it doesn’t.
If you find an obvious difference, it may be the culprit.
If not, come back, tell what outputs you’ve got from the above commands, and do head scratching together.

Edit: another question: do you have a firewall on Debian?

Always follow same steps at install

 One can use Brother 32 bit drivers in an amd-64 computer/
Additional steps are required

In Debian
1. Install the standard C library for 32-bit applications (eg lib32stdc++6 in De
bian).
2. Check some directories exist
  /var/spool/lpd
  /usr/lib/cups
  /usr/lib/cups/filter
  /usr/share/cups/model
3. Install the csh shell
  apt-get install csh
4. Install the drivers
  dpkg -i --force-all mfc210clpr-1.0.2-1.i386.deb
  dpkg -i --force-all cupswrapperMFC210C-1.0.2-3.i386.deb
5. Check drivers installed
  dpkg -l | grep Brother
6. Copy brlpdwrapperMFC210C 
  cp /usr/lib/cups/filter/brlpdwrapperMFC210C /usr/lib64/cups/filter/brlpdwrappe
rMFC210C
7. Copy libraries
  cp /usr/lib/libbr* /usr/lib32/
8. Do the CUPS setupd for printer
  LPD/LPR Printer
  lpd://192.168.32.98/binary_p1
  Driver: Brother MFC210C CUPS v1.1
  Paper: A4
9. Try a test print page

Both Debian and Devuan have had an inline upgrade since the install. It survived that. This issue in with MFC210C Debian happened later. The OKI printer is not affected, only the MFC210C

There are also scanner drivers… they work in Debian. The scanner is a separate device, not managed by CUPS.

I did not set up any firewall in Debian, but when I look with iptables -L there is stuff to do with docker?

I will do as you say and make the tedious comparison of Debian and Devuan.
There is no other way.

Thanks
Neville

What does this return?:

lpinfo --include-schemes dnssd -v

On my system, it returns:
network dnssd://Canon%20TR8600%20series._ipp._tcp.local/?uuid=00000000-0000-1000-8000-0018ad2086c1

This becomes “ipp://Canon%20TR8600%20series._ipp._tcp.local/” in the Settings/Device URL under Printer Properties.

No drivers necessary, no problems with changing IP numbers. This printer is plugged directly into the router on my home network.

Slightly off topic, but a FYI. Brother released a driver install tool a little over a year ago. I had problems installing my MFC-7840W last go around. (never had problems in the past) I discovered the install tool had been released and tried it. It worked for me.

https://support.brother.com/g/b/downloadlist.aspx?c=us&lang=en&prod=mfc210c_all&os=128

Thanks @JoelA ,
I have not tried the install tool. Always do it by hand.

Hi Kim,
My printer is a network printer, but it is too old to support IPP.
So I have to install drivers… the drivers work with LPR/LPD.

Regards
Neville

@nevj

I had always done it by hand before also. For some reason the last time, I couldn’t get the scanner to work. After spending a couple of hours trying to figure out what was wrong I decided to give the installer a shot. It basically automated exactly what I had tried by hand. Still never figured out why I couldn’t get it to work correctly initially.

You’ll succeed most likely: Perseverance furthers! Such is life… :wink:

1 Like

I did the comparison… there were slight differences

  1. groups
Debian
nevj@trinity:~$ groups
nevj adm lp cdrom floppy audio dip video plugdev netdev bluetooth lpadmin scanner docker

Devuan
nevj@trinity:~$ groups
nevj cdrom floppy sudo audio dip video plugdev netdev lpadmin scanner docker

So I took nevj out of lp in Debian, and added nevj to sudo in Debian.
That made no difference

  1. packages
    There was one cups related package present on Devuan , but not in Debian
nevj@trinity:~$ dpkg -l | grep cups
......
ii  cups-pk-helper                                 0.2.6-1+b1                             amd64        PolicyKit helper to configure cups with fine-grained privileges

So I added it to Debian.
That made no difference.

So when all else fails look at the logs

error_log
E [07/Dec/2022:20:42:28 +1100] [Client 10] Returning IPP client-error-not-authorized for Print-Job (ipp://localhost:631/printers/MFC210C) from localhost.

access_log
localhost - - [07/Dec/2022:20:42:28 +1100] "POST /printers/MFC210C HTTP/1.1" 200 383 Print-Job client-error-not-authorized

That says there is some lack of authorization, probably for nevj.

So next I look at /etc/cups/cupsd.conf in Debian and Devuan.
Debian has
DefaultAuthType None

Devuan has
DefaultAuthType Basic

So I change cupsd.conf on Debian to DefaultAuthType Basic
Reboot… and it now asks for a name and password when I request a test print for MFC210C.

So is the problem solved? Alas no. It now puts the test print job on the print queue, but it never prints, and eventually disappears from the queue. I suspect this new problem lies with the driver installation.

As @kgwoo said… persistance is needed.

How did my Debian printer setup get into such a mess?

1 Like

https://support.brother.com/g/b/downloadtop.aspx?c=us&lang=en&prod=mfc210c_all
Hi Neville, is that what you have? Try downloading-installing it again, what can you lose?? Maybe something happened in your system when you did your complete printer reset? Who knows?

1 Like

Maybe when the printer shut itself down… If Debian was active at the time, it would have affected Debian only.

Will try first deleting and remaking the cups entry, and second delete and reinstall the drivers.

1 Like

I’m not an expert, but pretty sure it has to do something with the printer being screwed up at the time. Your Debian was probably active. So yes, just delete every damn printer file and install everything back again. IT WILL WORK!!! It’s LINUX!!!
Best of luck! :pray: :penguin: :blush: