[SOLVED] - CUPS mess. No printer - no connection to printing service

Forum rules
Before you post please read this
Post Reply
harisano
Level 1
Level 1
Posts: 10
Joined: Mon Oct 15, 2018 6:14 pm

[SOLVED] - CUPS mess. No printer - no connection to printing service

Post by harisano »

Hi,

I am very new to Linux so please forgive me if I ask very stupid questions.
Also, I would like to say that I did search for possible answers online, and I still can't get the damn thing to work. Therefore this post.

OK, so this is the config:

Linux: Linux Mint 19.3 Tricia
Printer: Brother DCP-L3550CDW
Connection: WLAN

Let me start off by saying that everything did work when I first installed it. And then *something* happened (I am definitely not ruling out human error), and now it doesn't.

So, in the beginning; I got this printer --> went online (here: https://support.brother.com/g/b/downloa ... _eu&os=128) --> got the driver package --> did the whole unpack and install thing --> specified printer's IP during the install --> everything installed beautifully! :D

Then I was doing something a couple of days later, and now when I open the "Printers" config, my printer is gone. Instead there is "Printing service not available. Start the service on this computer or connect to other server."

If I try and click "server" --> "connect" --> "Connect to CUPS server: /run/cups/cups.sock", I get a CUPS server error: There was an error during the CUPS operation: 'failed to connect to server'.

First thing I did was try and do a reinstall. I uninstalled the existing printing and scanning drivers, then tried to re-install. That didn't go well. The installation did finish, but with - what I believe to be - error messages during the install.
For example, there are these lines that don't sound too good:

Code: Select all

dpkg -i --force-all dcpl3550cdwpdrv-1.0.2-0a.i386.deb
Selecting previously unselected package dcpl3550cdwpdrv:i386.
(Reading database ... 319369 files and directories currently installed.)
Preparing to unpack dcpl3550cdwpdrv-1.0.2-0a.i386.deb ...
Unpacking dcpl3550cdwpdrv:i386 (1.0.2-0) ...
Setting up dcpl3550cdwpdrv:i386 (1.0.2-0) ...
Restarting cups (via systemctl): cups.service.
lpinfo: Bad file descriptor
lpadmin -p DCPL3550CDW -E -v usb://dev/usb/lp0 -P /usr/share/cups/model/Brother/brother_dcpl3550cdw_printer_en.ppd
lpadmin: Unable to connect to server: Bad file descriptor
Restarting cups (via systemctl): cups.serviceJob for cups.service failed.
See "systemctl status cups.service" and "journalctl -xe" for details.
 failed!
Also, when it comes to the step where I am to specify the printer's IP address, it shows this:

Code: Select all

lpadmin -p DCPL3550CDW -v socket://192.168.0.105 -E
lpadmin: Unable to connect to server: Bad file descriptor
OK. So that didn't work.
Next idea I had was to remove and purge cups, re-install, the re-install the printer driver, and then everything would be great.
So that's what I did. I did both a

Code: Select all

sudo apt-get remove cups
and a

Code: Select all

sudo apt-get purge cups
on the cups package, re-installed it, re-installed the printer drivers - still nothing.

And I kinda had an idea that it wouldn't work, bc right after I ran the remove and purge commands on cups, I checked the /etc/cups folder - the printers.config file looked the same as before, which is kinda funny, coz I thought that purge was supposed to - well, purge - the config files as well?

Anyways, now I'm kinda stuck.
I guess it's because I don't really understand the cups service and what it does? I have a strange feeling that all the pieces are there, I just can't put them together.
So yeah, would really appreciate some help. :)

Cheers,
- h
Last edited by harisano on Fri Feb 14, 2020 12:22 pm, edited 1 time in total.

User avatar
LanceM
Level 9
Level 9
Posts: 2807
Joined: Sun Jul 08, 2018 11:50 pm

Re: CUPS mess. No printer - no connection to printing service

Post by LanceM »

Did you use the terminal to uninstall? viewtopic.php?p=1752268#p1752268
Once uninstalled, you can try installing again. Before you were asked about URI, did you select the number for Auto? Did you get the ip address from making the printer print the network sheet?
To mark this issue solved, go to your original 1st post and click the edit pencil and add [Solved] at the beginning of the title and click Submit.
Mint accepts donations: https://linuxmint.com/donors.php

harisano
Level 1
Level 1
Posts: 10
Joined: Mon Oct 15, 2018 6:14 pm

Re: CUPS mess. No printer - no connection to printing service

Post by harisano »

Hi LanceM,

Thanks for your reply.

LanceM wrote:
Wed Feb 12, 2020 6:31 pm
Did you use the terminal to uninstall? viewtopic.php?p=1752268#p1752268
Well, yes, but not quite like that. I just ran the brother uninstall files.
But after seeing your post, I did as described there too.
Once uninstalled, you can try installing again.

And so I did. Again; the same errors:

Code: Select all

The following packages have unmet dependencies:
 ia32-libs : Depends: libasound2-plugins:i386
             Depends: libpulse-mainloop-glib0:i386
             Depends: libpulsedsp:i386
             Depends: libsdl-image1.2:i386
             Depends: libsdl-mixer1.2:i386
             Depends: libsdl-net1.2:i386
             Depends: libsdl-ttf2.0-0:i386
             Depends: libsdl1.2debian:i386
E: Unable to correct problems, you have held broken packages.
dpkg -x dcpl3550cdwpdrv-1.0.2-0.i386.deb /
dpkg-deb: building package 'dcpl3550cdwpdrv' in 'dcpl3550cdwpdrv-1.0.2-0a.i386.deb'.
dpkg -b ./brother_driver_packdir dcpl3550cdwpdrv-1.0.2-0a.i386.deb
dpkg -i --force-all dcpl3550cdwpdrv-1.0.2-0a.i386.deb
Selecting previously unselected package dcpl3550cdwpdrv:i386.
(Reading database ... 319356 files and directories currently installed.)
Preparing to unpack dcpl3550cdwpdrv-1.0.2-0a.i386.deb ...
Unpacking dcpl3550cdwpdrv:i386 (1.0.2-0) ...
Setting up dcpl3550cdwpdrv:i386 (1.0.2-0) ...
Restarting cups (via systemctl): cups.service.
lpinfo: Bad file descriptor
lpadmin -p DCPL3550CDW -E -v usb://dev/usb/lp0 -P /usr/share/cups/model/Brother/brother_dcpl3550cdw_printer_en.ppd
lpadmin: Unable to connect to server: Bad file descriptor
Restarting cups (via systemctl): cups.serviceJob for cups.service failed.
See "systemctl status cups.service" and "journalctl -xe" for details.
 failed!
#
Before you were asked about URI, did you select the number for Auto?

No, I did not. I chose 0 for "Specify IP address". That's what Brother says on their website!
Did you get the ip address from making the printer print the network sheet?
Exactly! :) And the address is 100% correct, since I used the same IP address before when it worked. Also, my phone finds the printer at that very address.

Cheers,
- h

User avatar
LanceM
Level 9
Level 9
Posts: 2807
Joined: Sun Jul 08, 2018 11:50 pm

Re: CUPS mess. No printer - no connection to printing service

Post by LanceM »

Try Auto, but you have to uninstall again first. My Brother requires Auto, as did the several others I've installed for friends. Yours may be different, but it's worth a try. Do you have a Timeshift snapshot from before this all started?
To mark this issue solved, go to your original 1st post and click the edit pencil and add [Solved] at the beginning of the title and click Submit.
Mint accepts donations: https://linuxmint.com/donors.php

harisano
Level 1
Level 1
Posts: 10
Joined: Mon Oct 15, 2018 6:14 pm

Re: CUPS mess. No printer - no connection to printing service

Post by harisano »

LanceM wrote:
Wed Feb 12, 2020 6:59 pm
Try Auto, but you have to uninstall again first. My Brother requires Auto. Yours may be different, but it's worth a try. Do you have a Timeshift snapshot from before this all started?
I also did auto - no joy. :(
Yeah I've got a timeshift snapshot form a while back. I'm just like, really, stubborn. Like, there is something fixable here, and I really wanna fix it. :lol: :lol:

- h

User avatar
LanceM
Level 9
Level 9
Posts: 2807
Joined: Sun Jul 08, 2018 11:50 pm

Re: CUPS mess. No printer - no connection to printing service

Post by LanceM »

I have had to go to the printer menu and have it search for networks, then press the WPS button on the router while it's searching, so it can connect.
To mark this issue solved, go to your original 1st post and click the edit pencil and add [Solved] at the beginning of the title and click Submit.
Mint accepts donations: https://linuxmint.com/donors.php

brian_p
Level 6
Level 6
Posts: 1231
Joined: Thu Jan 17, 2019 9:20 am

Re: CUPS mess. No printer - no connection to printing service

Post by brian_p »

Please let us have what is given by

Code: Select all

avahi-browse -rt _ipp._tcp
and

Code: Select all

avahi-browse -rt _uscan._tcp
--
Brian.

harisano
Level 1
Level 1
Posts: 10
Joined: Mon Oct 15, 2018 6:14 pm

Re: CUPS mess. No printer - no connection to printing service

Post by harisano »

brian_p wrote:
Wed Feb 12, 2020 7:13 pm
Please let us have what is given by

Code: Select all

avahi-browse -rt _ipp._tcp
and

Code: Select all

avahi-browse -rt _uscan._tcp
By avahi-browse -rt _ipp._tcp (some stuff redacted [XXX] as it seemed like private information):

Code: Select all

+ wlp4s0 IPv6 Brother DCP-L3550CDW series                   Internet Printer     local
+ wlp4s0 IPv4 Brother DCP-L3550CDW series                   Internet Printer     local
= wlp4s0 IPv6 Brother DCP-L3550CDW series                   Internet Printer     local
   hostname = [XXXXXXXXXX.local]
   address = [192.168.0.105]
   port = [XXX]
   txt = ["mopria-certified=1.3" "print_wfds=T" "UUID=e3248000-80ce-11db-8000-3c2af4ab8641" "PaperMax=legal-A4" "kind=document,envelope,label,postcard" "URF=SRGB24,W8,CP1,IS4-1,MT1-3-4-5-8-11,OB10,PQ4,RS600,V1.4,DM1" "TBCP=F" "Transparent=T" "Binary=T" "PaperCustom=T" "Scan=T" "Fax=F" "Duplex=T" "Copies=T" "Color=T" "usb_CMD=PJL,PCL,PCLXL,URF" "usb_MDL=DCP-L3550CDW series" "usb_MFG=Brother" "priority=25" "adminurl=XXXXXXXXXXXXXXXXXXX.html" "product=(Brother DCP-L3550CDW series)" "ty=Brother DCP-L3550CDW series" "note=" "rp=ipp/print" "pdl=application/octet-stream,image/urf,image/jpeg,image/pwg-raster" "qtotal=1" "txtvers=1"]
= wlp4s0 IPv4 Brother DCP-L3550CDW series                   Internet Printer     local
   hostname = [XXXXXXXXXX.local]
   address = [192.168.0.105]
   port = [XXX]
   txt = ["mopria-certified=1.3" "print_wfds=T" "UUID=e3248000-80ce-11db-8000-3c2af4ab8641" "PaperMax=legal-A4" "kind=document,envelope,label,postcard" "URF=SRGB24,W8,CP1,IS4-1,MT1-3-4-5-8-11,OB10,PQ4,RS600,V1.4,DM1" "TBCP=F" "Transparent=T" "Binary=T" "PaperCustom=T" "Scan=T" "Fax=F" "Duplex=T" "Copies=T" "Color=T" "usb_CMD=PJL,PCL,PCLXL,URF" "usb_MDL=DCP-L3550CDW series" "usb_MFG=Brother" "priority=25" "adminurl=XXXXXXXXXXXXXXXXXXX.html" "product=(Brother DCP-L3550CDW series)" "ty=Brother DCP-L3550CDW series" "note=" "rp=ipp/print" "pdl=application/octet-stream,image/urf,image/jpeg,image/pwg-raster" "qtotal=1" "txtvers=1"]
and avahi-browse -rt _uscan._tcp :

Code: Select all

+ wlp4s0 IPv4 Brother DCP-L3550CDW series                   _uscan._tcp          local
= wlp4s0 IPv4 Brother DCP-L3550CDW series                   _uscan._tcp          local
   hostname = [XXXXXXXXXX.local]
   address = [192.168.0.105]
   port = [XXX]
   txt = ["duplex=F" "is=adf,platen" "cs=binary,grayscale,color" "UUID=e3248000-80ce-11db-8000-3c2af4ab8641" "pdl=application/pdf,image/jpeg" "note=" "ty=Brother DCP-L3550CDW series" "rs=eSCL" "representation=[XXXXXXXXXX.local]./icons/device-icons-128.png" "adminurl=[XXXXXXXXXX.local]./net/net/airprint.html" "vers=2.63" "txtvers=1"]

harisano
Level 1
Level 1
Posts: 10
Joined: Mon Oct 15, 2018 6:14 pm

Re: CUPS mess. No printer - no connection to printing service

Post by harisano »

Also I get this when I run systemctl --failed

Code: Select all

systemctl --failed
  UNIT         LOAD   ACTIVE SUB    DESCRIPTION                                                                                                                                 
● cups.path    loaded failed failed CUPS Scheduler                                                                                                                              
● cups.service loaded failed failed CUPS Scheduler                                                                                                                              
● cups.socket  loaded failed failed CUPS Scheduler                                                                                                                              

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

3 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
cheers,
- h

brian_p
Level 6
Level 6
Posts: 1231
Joined: Thu Jan 17, 2019 9:20 am

Re: CUPS mess. No printer - no connection to printing service

Post by brian_p »

Thank you for the two outputs. We will put them on one side for the time being because it is now clear that your cups service is not starting. This was also (as we now see) indictated in a previous post of yours. It is obvious that this needs to be fixed for you to print.
lpinfo: Bad file descriptor
lpadmin -p DCPL3550CDW -E -v usb://dev/usb/lp0 -P /usr/share/cups/model/Brother/brother_dcpl3550cdw_printer_en.ppd
lpadmin: Unable to connect to server: Bad file descriptor
Restarting cups (via systemctl): cups.serviceJob for cups.service failed.
See "systemctl status cups.service" and "journalctl -xe" for details.
failed!
See if the journal provides any more useful detail. My experience is that it often doesn't.

Also try backing up /etc/cups/cupsd.conf and replacing it:

Code: Select all

cp /usr/share/cups/cupsd.conf.default /etc/cups/cupsd.conf
Restart the service:

Code: Select all

systemctl start cups
--
Brian.

harisano
Level 1
Level 1
Posts: 10
Joined: Mon Oct 15, 2018 6:14 pm

Re: CUPS mess. No printer - no connection to printing service

Post by harisano »

Brian, this is amazing! In the sense that it worked! Thank you so much! :) :)
brian_p wrote:
Thu Feb 13, 2020 9:46 am
Thank you for the two outputs. We will put them on one side for the time being because it is now clear that your cups service is not starting. This was also (as we now see) indictated in a previous post of yours. It is obvious that this needs to be fixed for you to print.
lpinfo: Bad file descriptor
lpadmin -p DCPL3550CDW -E -v usb://dev/usb/lp0 -P /usr/share/cups/model/Brother/brother_dcpl3550cdw_printer_en.ppd
lpadmin: Unable to connect to server: Bad file descriptor
Restarting cups (via systemctl): cups.serviceJob for cups.service failed.
See "systemctl status cups.service" and "journalctl -xe" for details.
failed!
See if the journal provides any more useful detail. My experience is that it often doesn't.

Also try backing up /etc/cups/cupsd.conf and replacing it:

Code: Select all

cp /usr/share/cups/cupsd.conf.default /etc/cups/cupsd.conf
Restart the service:

Code: Select all

systemctl start cups
However, if you don't mind, explaining why exactly this worked?

I did exactly like you wrote:

Code: Select all

root@tabby:/# cp /usr/share/cups/cupsd.conf.default /etc/cups/cupsd.conf
root@tabby:/# systemctl start cups
I can now see that the CUPS service started, partly for two reasons:
  • 1. When I open up "Printers", I can see my printer there.
  • 2. When I run systemctl --failed
, there are only 2 failed units, instead of the 3 before:

Code: Select all

systemctl --failed
  UNIT        LOAD   ACTIVE SUB    DESCRIPTION                                                                                                                                  
● cups.path   loaded failed failed CUPS Scheduler                                                                                                                               
● cups.socket loaded failed failed CUPS Scheduler                                                                                                                               

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

2 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
Can you explain what just happened with those 2 lines of code you helped me with. And why are there still 2 failed units?
Or point me to some literature that I could read myself, to understand this? :D

All in all; thanks a lot! I can print again! :)

cheers,
- h

brian_p
Level 6
Level 6
Posts: 1231
Joined: Thu Jan 17, 2019 9:20 am

Re: CUPS mess. No printer - no connection to printing service

Post by brian_p »

All in all; thanks a lot! I can print again! :)
Splendid.
Can you explain what just happened with those 2 lines of code you helped me with.
Do you mean the two avahi-browse commands?
And why are there still 2 failed units?
Pass. I think they should be started when the cups service starts. Try

Code: Select all

systemctl start cups.socket

Code: Select all

systemctl start cups.path
Or do stop followed by start.
Or point me to some literature that I could read myself, to understand this? :D
Perhaps

Code: Select all

man systemctl
--
Brian.

harisano
Level 1
Level 1
Posts: 10
Joined: Mon Oct 15, 2018 6:14 pm

Re: CUPS mess. No printer - no connection to printing service

Post by harisano »

Thanks a lot - I'm gonna educate myself some more on this as soon as I can get around to it. The important thing is that printing works now. :)

Marking issue as solved now.

cheers,
- h
brian_p wrote:
Thu Feb 13, 2020 10:21 am
All in all; thanks a lot! I can print again! :)
Splendid.
Can you explain what just happened with those 2 lines of code you helped me with.
Do you mean the two avahi-browse commands?
And why are there still 2 failed units?
Pass. I think they should be started when the cups service starts. Try

Code: Select all

systemctl start cups.socket

Code: Select all

systemctl start cups.path
Or do stop followed by start.
Or point me to some literature that I could read myself, to understand this? :D
Perhaps

Code: Select all

man systemctl

brian_p
Level 6
Level 6
Posts: 1231
Joined: Thu Jan 17, 2019 9:20 am

Re: CUPS mess. No printer - no connection to printing service

Post by brian_p »

harisano wrote:
Fri Feb 14, 2020 12:22 pm
Thanks a lot - I'm gonna educate myself some more on this as soon as I can get around to it. The important thing is that printing works now. :)
I am pleased things worked out for you. :D

As part of your education, you may be interested to know that you can do driverless printing with your DCP-L3550CDW: https://wiki.debian.org/CUPSDriverlessPrinting.

You can also do driverless scanning: https://github.com/alexpevzner/sane-airscan.

Both can be done without interfering with or removing your present software setup. If you ever decided to test sane-airscan (a 30 minute job), I would be very interested in the outcome.
--
Brian.

Post Reply

Return to “Printers & Scanners”