Canon printer failed to connect with CUPS

Bug #1661287 reported by SunBear
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

My canon printer has been working with Ubuntu 16.04 for quite sometime. Presently, for no reason, it now cannot be recognised. I have checked that the USB connections are working fine. When I unplug and replug the printer usb connection to my computer the syslog reflects it's present. However, it shows that it failed to connect with CUPS. udev-configure-printer[5761]: failed to connect to CUPS server; giving up I have provide the results to my printer checks below.

Appreciate help to reestablish the proper connection of my printer and get it working with Ubuntu 16.04.

tail -f /var/log/syslog
Feb 2 22:36:38 Eliot kernel: [95807.581378] usb 1-14: New USB device found, idVendor=04a9, idProduct=1754
Feb 2 22:36:38 Eliot kernel: [95807.581387] usb 1-14: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 2 22:36:38 Eliot kernel: [95807.581391] usb 1-14: Product: MG5300 series
Feb 2 22:36:38 Eliot kernel: [95807.581395] usb 1-14: Manufacturer: Canon
Feb 2 22:36:38 Eliot kernel: [95807.581399] usb 1-14: SerialNumber: 20EE62
Feb 2 22:36:38 Eliot kernel: [95807.591385] usblp 1-14:1.1: usblp0: USB Bidirectional printer dev 42 if 1 alt 0 proto 2 vid 0x04A9 pid 0x1754
Feb 2 22:36:38 Eliot kernel: [95807.591527] usb-storage 1-14:1.2: USB Mass Storage device detected
Feb 2 22:36:38 Eliot kernel: [95807.593328] scsi host13: usb-storage 1-14:1.2
Feb 2 22:36:38 Eliot systemd[1]: Starting Automatic USB/Bluetooth printer setup (-devices-pci0000:00-0000:00:14.0-usb1-1\x2d14)...
Feb 2 22:36:38 Eliot udev-configure-printer[5761]: add /devices/pci0000:00/0000:00:14.0/usb1/1-14
Feb 2 22:36:38 Eliot udev-configure-printer[5761]: device devpath is /devices/pci0000:00/0000:00:14.0/usb1/1-14
Feb 2 22:36:38 Eliot udev-configure-printer[5761]: MFG:Canon MDL:MG5300 series SERN:- serial:20EE62
Feb 2 22:36:39 Eliot kernel: [95808.591918] scsi 13:0:0:0: Direct-Access Canon MG5300 series 0103 PQ: 0 ANSI: 2
Feb 2 22:36:39 Eliot kernel: [95808.592839] sd 13:0:0:0: Attached scsi generic sg6 type 0
Feb 2 22:36:39 Eliot kernel: [95808.597229] sd 13:0:0:0: [sdf] Attached SCSI removable disk
Feb 2 22:36:43 Eliot udev-configure-printer[5761]: failed to connect to CUPS server; giving up
Feb 2 22:36:43 Eliot systemd[1]: udev-configure-printer@-devices-pci0000:00-0000:00:14.0-usb1-1\x2d14.service: Control process exited, code=exited status=1
Feb 2 22:36:43 Eliot systemd[1]: Failed to start Automatic USB/Bluetooth printer setup (-devices-pci0000:00-0000:00:14.0-usb1-1\x2d14).
Feb 2 22:36:43 Eliot systemd[1]: udev-configure-printer@-devices-pci0000:00-0000:00:14.0-usb1-1\x2d14.service: Unit entered failed state.
Feb 2 22:36:43 Eliot systemd[1]: udev-configure-printer@-devices-pci0000:00-0000:00:14.0-usb1-1\x2d14.service: Failed with result 'exit-code'.

@Eliot:~$ lsusb
Bus 001 Device 043: ID 04a9:1754 Canon, Inc.

@Eliot:~$ ls -l /dev/usb/lp* /dev/bus/usb/*/*
crw-rw-r--+ 1 root lp 189, 42 Feb 2 22:40 /dev/bus/usb/001/043
crw-rw---- 1 root lp 180, 0 Feb 2 22:39 /dev/usb/lp0

@Eliot:~$ sudo usb_printerid /dev/usb/lp0
GET_DEVICE_ID string:
MFG:Canon;CMD:BJL,BJRaster3,BSCCe,NCCe,IVEC,IVECPLI;SOJ:BJNP2,BJNPe;MDL:MG5300 series;CLS:PRINTER;DES:Canon MG5300 series;VER:1.030;STA:10;FSI:03;HRI:7;MSI:B030,DAT,E3,HFSF,JON,K21000700;PDR:6;PSE:ACFJ03117;

@Eliot:~$ sudo usb_printerid /dev/bus/usb/001/043
Error: Inappropriate ioctl for device: GET_DEVICE_ID on '/dev/bus/usb/001/043'

@Eliot:~$ lpinfo -v
lpinfo: Bad file descriptor

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: cups (not installed)
ProcVersionSignature: Ubuntu 4.4.0-59.80-generic 4.4.35
Uname: Linux 4.4.0-59-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Feb 2 23:17:01 2017
InstallationDate: Installed on 2016-05-01 (277 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
SourcePackage: cups
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
SunBear (sunbear-c22) wrote :
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Your syslog contains:

Feb 2 22:36:43 Eliot udev-configure-printer[5761]: failed to connect to CUPS server; giving up

and you also get

@Eliot:~$ lpinfo -v
lpinfo: Bad file descriptor

Seems that there is a problem with the CUPS daemon not starting.

Please run the command

ls -l /var/run/cups/cups.sock

and post the output here.

Also attach your files /etc/cups/cupsd.conf and /etc/cups/cups-files.conf.

Go to

https://wiki.ubuntu.com/DebuggingPrintingProblems

and follow the instructions of the "CUPS error_log" section.

Please attach the files one by one, do not compress them and do not package them together, thanks.

Changed in cups (Ubuntu):
status: New → Incomplete
Revision history for this message
SunBear (sunbear-c22) wrote : Re: [Bug 1661287] Re: Canon printer failed to connect with CUPS

@Eliot:/media$ ls -l /var/run/cups/cups.sock
ls: cannot access '/var/run/cups/cups.sock': No such file or directory

However, I found

/etc/systemd/system/cups.socket

/var/lib/systemd/deb-systemd-helper-masked/cups.socket

/etc/systemd/system/sockets.target.wants/cups.socket

/var/lib/systemd/deb-systemd-helper-enabled/cups.socket.dsh-also

/var/lib/systemd/deb-systemd-helper-enabled/sockets.target.wants/cups.socket

On 03/02/2017 05:32, Till Kamppeter wrote:
> Your syslog contains:
>
> Feb 2 22:36:43 Eliot udev-configure-printer[5761]: failed to connect to
> CUPS server; giving up
>
> and you also get
>
> @Eliot:~$ lpinfo -v
> lpinfo: Bad file descriptor
>
> Seems that there is a problem with the CUPS daemon not starting.
>
> Please run the command
>
> ls -l /var/run/cups/cups.sock
>
> and post the output here.
>
> Also attach your files /etc/cups/cupsd.conf and /etc/cups/cups-
> files.conf.
>
> Go to
>
> https://wiki.ubuntu.com/DebuggingPrintingProblems
>
> and follow the instructions of the "CUPS error_log" section.
>
> Please attach the files one by one, do not compress them and do not
> package them together, thanks.
>
> ** Changed in: cups (Ubuntu)
> Status: New => Incomplete
>

Revision history for this message
SunBear (sunbear-c22) wrote :
  • cupsd.conf Edit (4.5 KiB, text/plain; charset=UTF-8; name="cupsd.conf")

/etc/cups/cupsd.conf attached.

On 03/02/2017 05:32, Till Kamppeter wrote:
> Your syslog contains:
>
> Feb 2 22:36:43 Eliot udev-configure-printer[5761]: failed to connect to
> CUPS server; giving up
>
> and you also get
>
> @Eliot:~$ lpinfo -v
> lpinfo: Bad file descriptor
>
> Seems that there is a problem with the CUPS daemon not starting.
>
> Please run the command
>
> ls -l /var/run/cups/cups.sock
>
> and post the output here.
>
> Also attach your files /etc/cups/cupsd.conf and /etc/cups/cups-
> files.conf.
>
> Go to
>
> https://wiki.ubuntu.com/DebuggingPrintingProblems
>
> and follow the instructions of the "CUPS error_log" section.
>
> Please attach the files one by one, do not compress them and do not
> package them together, thanks.
>
> ** Changed in: cups (Ubuntu)
> Status: New => Incomplete
>

Revision history for this message
SunBear (sunbear-c22) wrote :

/etc/cups/cups-files.conf attached.

On 03/02/2017 05:32, Till Kamppeter wrote:
> /etc/cups/cups-
> files.conf.

Revision history for this message
SunBear (sunbear-c22) wrote :

I have gone into https://wiki.ubuntu.com/DebuggingPrintingProblems and
tried to follow the instructions of the "CUPS error_log" section.

Step 1.
I can't do it. Can't find "Save debugging information for
troubleshooting" on "System" -> "Administration" -> "Printing". I have
System Setting --> Printers --> Help --> Troubleshoot --> Forward. I get
the message
CUPS Service Stopped
The CUPS print speel does not appear to be running. To correct this,
choose System-Administration-Services from main menu and look for 'cups'
service.
My difficulty is there isn't such a path to follow. The is no
Administration icon.

Step 2:
@Eliot:~$ cupsctl LogLevel=debug
cupsctl: Unable to connect to server: Bad file descriptor

Step 3:
Skipped - Not applicable.

Step4: I have gone into /etc/cups/cupsd.conf and manually uncommented
LogLevel....
Original:
# Deactivate CUPS' internal logrotating, as we provide a better one,
especially
# LogLevel debug2 gets usable now
MaxLogSize 0
Presently:
# Deactivate CUPS' internal logrotating, as we provide a better one,
especially
LogLevel debug2 gets usable now
MaxLogSize 0
@Eliot:~$ $ sudo /etc/init.d/cups restart
$: command not found
The file is there. I believe Ubuntu16.04 is using systemd. I tried this
and got the below failure message.
@Eliot:~$ sudo systemctl restart /etc/systemd/system/cups.service
Failed to restart etc-systemd-system-cups.service.mount: Unit
etc-systemd-system-cups.service.mount not found.

Unable to do Step 5,6, 7, 8.

On 03/02/2017 05:32, Till Kamppeter wrote:
> Your syslog contains:
>
> Feb 2 22:36:43 Eliot udev-configure-printer[5761]: failed to connect to
> CUPS server; giving up
>
> and you also get
>
> @Eliot:~$ lpinfo -v
> lpinfo: Bad file descriptor
>
> Seems that there is a problem with the CUPS daemon not starting.
>
> Please run the command
>
> ls -l /var/run/cups/cups.sock
>
> and post the output here.
>
> Also attach your files /etc/cups/cupsd.conf and /etc/cups/cups-
> files.conf.
>
> Go to
>
> https://wiki.ubuntu.com/DebuggingPrintingProblems
>
> and follow the instructions of the "CUPS error_log" section.
>
> Please attach the files one by one, do not compress them and do not
> package them together, thanks.
>
> ** Changed in: cups (Ubuntu)
> Status: New => Incomplete
>

Revision history for this message
SunBear (sunbear-c22) wrote :

After switching the connection of the printer in the printer properties, from USB type to using the printer DNNS, my Canon printer is able to print again. In the make and mode, it shows Canon MG5300 series - CUPS+Gutenprint v5.2.11. It is puzzling how cups is not able to detect my printer.

Revision history for this message
SunBear (sunbear-c22) wrote :

I found the answer. I checked "apt" history log in /var/log/apt and discovered that when I executed the "apt-get install ubuntu-desktop", the "ubuntu-desktop" package installed many cups packages (see below). These installations fixed whatever problems cups had previously. Wish someone could have just told me about this simple solution to fixing cups.

Start-Date: 2017-02-25 19:10:43
Commandline: apt-get install ubuntu-desktop
Requested-By: sunbear (1000)
Install: python3-pexpect:amd64 (4.0.1-1, automatic), hplip-data:amd64 (3.16.3+repack0-1, automatic), libqpdf17:amd64 (6.0.0-2, automatic), liblouisutdml-data:amd64 (2.5.0-3, automatic), printer-driver-splix:amd64 (2.0.0+svn315-4fakesync1, automatic), bluez-cups:amd64 (5.37-0ubuntu5, automatic), printer-driver-hpcups:amd64 (3.16.3+repack0-1, automatic), printer-driver-postscript-hp:amd64 (3.16.3+repack0-1, automatic), libsnmp-base:amd64 (5.7.3+dfsg-1ubuntu4, automatic), python3-reportlab-accel:amd64 (3.3.0-1, automatic), ubuntu-desktop:amd64 (1.361), printer-driver-pxljr:amd64 (1.4+repack0-4, automatic), cups-server-common:amd64 (2.1.3-4, automatic), ssl-cert:amd64 (1.0.37, automatic), python3-renderpm:amd64 (3.3.0-1, automatic), cups-filters:amd64 (1.8.3-2ubuntu3.1, automatic), libsnmp30:amd64 (5.7.3+dfsg-1ubuntu4, automatic), libcupsmime1:amd64 (2.1.3-4, automatic), hplip:amd64 (3.16.3+repack0-1, automatic), liblouisutdml6:amd64 (2.5.0-3, automatic), libhpmud0:amd64 (3.16.3+repack0-1, automatic), printer-driver-gutenprint:amd64 (5.2.11-1, automatic), libfontembed1:amd64 (1.8.3-2ubuntu3.1, automatic), libgutenprint2:amd64 (5.2.11-1, automatic), liblouisutdml-bin:amd64 (2.5.0-3, automatic), libsane-hpaio:amd64 (3.16.3+repack0-1, automatic), qpdf:amd64 (6.0.0-2, automatic), cups-filters-core-drivers:amd64 (1.8.3-2ubuntu3.1, automatic), python3-ptyprocess:amd64 (0.5-1, automatic), cups-core-drivers:amd64 (2.1.3-4, automatic), cups-daemon:amd64 (2.1.3-4, automatic), python3-reportlab:amd64 (3.3.0-1, automatic), cups:amd64 (2.1.3-4, automatic), libcupscgi1:amd64 (2.1.3-4, automatic), cups-browsed:amd64 (1.8.3-2ubuntu3.1, automatic)
Remove: foomatic-filters:amd64 (4.0.17-8)
End-Date: 2017-02-25 19:11:16

Changed in cups (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.