Cups error log states "can' t find PDF header" and "can't detect file type"

Asked by Mark Chojnacki on 2018-10-14

After the upgrade of my laptop to Ubuntu 18.04.1, I can no longer print to my HP printer via HPLIP. I have installed the latest HPLIP (version 3.18.9) and tried both wireless and USB connections to the printer (Color LaserJet Pro MFP M177fw) and nothing works. Specifically, a test print page appears to be sent to the printer, but nothing happens. The entries in /var/log/cups/error_log are:

W [14/Oct/2018:13:16:46 -0400] [Job 541] temp file: can\'t find PDF header
E [14/Oct/2018:13:16:46 -0400] [Job 541] Can\'t detect file type

In /var/log/syslog I also see this:

Oct 14 13:16:33 markubuntu hp-systray: io/hpmud/jd.c 694: timeout read_channel sec=6 hp:/net/HP_Color_LaserJet_Pro_MFP_M177fw?ip=192.168.0.159
Oct 14 13:16:46 markubuntu hpcups[4810]: prnt/hpcups/HPCupsFilter.cpp 569: cupsRasterOpen failed, fd = 0
Oct 14 13:16:46 markubuntu hp[4811]: prnt/backend/hp.c 919: ERROR: null print job total=0

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Mark Chojnacki
Solved:
2018-10-27
Last query:
2018-10-27
Last reply:
2018-10-27
srinivas (srinivas5) said : #1

Hi,

Please uninstall HPLIP driver using command "sudo hp-uninstall".
Then reinstall using the command "sh hplip-3.18.9.run".
Also do install the corresponding plugin using hp-plugin command.
Let us know the behavior.

Thanks,
Srinivas Teja.

Mark Chojnacki (mchojna) said : #2

Hi Srinivas,

I did the uninstall and re-install as you indicated. At the end of the install I see this:

Gtk-Message: 16:55:55.507: Failed to load module "canberra-gtk-module"
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:127: RuntimeWarning: PyOS_InputHook is not available for interactive use of PyGTK
  set_interactive(1)

When I ran the hp-plugin command, the output was this:

Gtk-Message: 16:59:10.192: Failed to load module "canberra-gtk-module"

Done.
 Plug-in installation successful

Then I ran hp-toolbox and initiated a test page print - nothing printed.

In /var/log/syslog I see the following:

Oct 16 17:01:07 markubuntu python: io/hpmud/jd.c 694: timeout read_channel sec=6 hp:/net/HP_Color_LaserJet_Pro_MFP_M177fw?ip=192.168.0.159
Oct 16 17:01:19 markubuntu python: io/hpmud/hpmud.c 246: invalid channel_open state, current io_mode=raw/uni service=HP-MESSAGE hp:/net/HP_Color_LaserJet_Pro_MFP_M177fw?ip=192.168.0.159
Oct 16 17:01:19 markubuntu python: io/hpmud/hpmud.c 702: invalid channel_close state
Oct 16 17:01:25 markubuntu python: io/hpmud/jd.c 694: timeout read_channel sec=6 hp:/net/HP_Color_LaserJet_Pro_MFP_M177fw?ip=192.168.0.159
Oct 16 17:01:28 markubuntu python: io/hpmud/hpmud.c 246: invalid channel_open state, current io_mode=raw/uni service=HP-MESSAGE hp:/net/HP_Color_LaserJet_Pro_MFP_M177fw?ip=192.168.0.159
Oct 16 17:01:28 markubuntu python: io/hpmud/hpmud.c 702: invalid channel_close state
Oct 16 17:01:34 markubuntu python: io/hpmud/jd.c 694: timeout read_channel sec=6 hp:/net/HP_Color_LaserJet_Pro_MFP_M177fw?ip=192.168.0.159

Note that hp_toolbox shows the status of the toner cartridge supplies, so I assume that means it is able to communicate with the printer at some level....

Mark

srinivas (srinivas5) said : #3

Hi,
The message on the 'canberra-gtk-module' one you can ignore as this is just a warning. I can see the plug-in got installed properly.
Can you share the output of hp-check -t command for analysis?

Mark Chojnacki (mchojna) said : #4

Here is the log file from hp-check -t:

hp-check[6933]: info: :
hp-check[6933]: info: :HP Linux Imaging and Printing System (ver. 3.18.9)
hp-check[6933]: info: :Dependency/Version Check Utility ver. 15.1
hp-check[6933]: info: :
hp-check[6933]: info: :Copyright (c) 2001-15 HP Development Company, LP
hp-check[6933]: info: :This software comes with ABSOLUTELY NO WARRANTY.
hp-check[6933]: info: :This is free software, and you are welcome to distribute it
hp-check[6933]: info: :under certain conditions. See COPYING file for more details.
hp-check[6933]: info: :
hp-check[6933]: info: :Note: hp-check can be run in three modes:
hp-check[6933]: info: :1. Compile-time check mode (-c or --compile): Use this mode before compiling the
hp-check[6933]: info: :HPLIP supplied tarball (.tar.gz or .run) to determine if the proper dependencies
hp-check[6933]: info: :are installed to successfully compile HPLIP.
hp-check[6933]: info: :2. Run-time check mode (-r or --run): Use this mode to determine if a distro
hp-check[6933]: info: :supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball
hp-check[6933]: info: :has the proper dependencies installed to successfully run.
hp-check[6933]: info: :3. Both compile- and run-time check mode (-b or --both) (Default): This mode
hp-check[6933]: info: :will check both of the above cases (both compile- and run-time dependencies).
hp-check[6933]: info: :
hp-check[6933]: info: :Check types:
hp-check[6933]: info: :a. EXTERNALDEP - External Dependencies
hp-check[6933]: info: :b. GENERALDEP - General Dependencies (required both at compile and run time)
hp-check[6933]: info: :c. COMPILEDEP - Compile time Dependencies
hp-check[6933]: info: :d. [All are run-time checks]
hp-check[6933]: info: :PYEXT SCANCONF QUEUES PERMISSION
hp-check[6933]: info: :
hp-check[6933]: info: :Status Types:
hp-check[6933]: info: : OK
hp-check[6933]: info: : MISSING - Missing Dependency or Permission or Plug-in
hp-check[6933]: info: : INCOMPAT - Incompatible dependency-version or Plugin-version
hp-check[6933]: info: :
hp-check[6933]: info: :
hp-check[6933]: info: :---------------
hp-check[6933]: info: :| SYSTEM INFO |
hp-check[6933]: info: :---------------
hp-check[6933]: info: :
hp-check[6933]: info: : Kernel: 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 GNU/Linux
 Host: markubuntu
 Proc: 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 GNU/Linux
 Distribution: 12 18.04
hp-check[6933]: info: : Bitness: 64 bit

hp-check[6933]: info: :
hp-check[6933]: info: :-----------------------
hp-check[6933]: info: :| HPLIP CONFIGURATION |
hp-check[6933]: info: :-----------------------
hp-check[6933]: info: :
hp-check[6933]: info: :HPLIP-Version: HPLIP 3.18.9
hp-check[6933]: info: :HPLIP-Home: /usr/share/hplip
hp-check[6933]: info: :HPLIP-Installation: Auto installation is supported for ubuntu distro 18.04 version
hp-check[6933]: info: :
hp-check[6933]: info: :Current contents of '/etc/hp/hplip.conf' file:
hp-check[6933]: info: :# hplip.conf. Generated from hplip.conf.in by configure.

[hplip]
version=3.18.9

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/HP
ppdbase=/usr/share/ppd
doc=/usr/share/doc/hplip-3.18.9
html=/usr/share/doc/hplip-3.18.9
icon=/usr/share/applications
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv/hp
bin=/usr/bin
apparmor=/etc/apparmor.d
# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
libusb01-build=no
pp-build=no
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
hpijs-install=no
foomatic-drv-install=no
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.18.9
restricted-build=no
ui-toolkit=qt4
qt3=no
qt4=yes
qt5=no
policy-kit=no
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no
apparmor_build=yes
class-driver=no

hp-check[6933]: info: :
hp-check[6933]: info: :Current contents of '/var/lib/hp/hplip.state' file:
hp-check[6933]: info: :[plugin]
installed = 1
eula = 1
version = 3.18.9

hp-check[6933]: info: :
hp-check[6933]: info: :Current contents of '~/.hplip/hplip.conf' file:
hp-check[6933]: info: :[installation]
date_time = 2018-10-18 10:03:09
version = 3.18.9

[upgrade]
notify_upgrade = true
last_upgraded_time = 1539723103
pending_upgrade_time = 0

[last_used]
device_uri = "hp:/net/HP_Color_LaserJet_Pro_MFP_M177fw?ip=192.168.0.159"
printer_name = HP_Color_LaserJet_Pro_MFP_M177fw
working_dir = .

[settings]
systray_visible = 0
systray_messages = 0

[commands]
scan = /usr/bin/xsane -V %SANE_URI%

[refresh]
rate = 30
enable = false
type = 1

[polling]
enable = false
interval = 5
device_list =

[fax]
voice_phone =
email_address =

hp-check[6933]: info: : <Package-name> <Package-Desc> <Required/Optional> <Min-Version> <Installed-Version> <Status> <Comment>
hp-check[6933]: info: :
hp-check[6933]: info: :--------------
hp-check[6933]: info: :| COMPILEDEP |
hp-check[6933]: info: :--------------
hp-check[6933]: info: :
hp-check[6933]: info: : gcc gcc - GNU Project C and C++ Compiler REQUIRED - 7.3.0 OK -
hp-check[6933]: info: : make make - GNU make utility to maintain groups of programs REQUIRED 3.0 4.1 OK -
hp-check[6933]: info: : libtool libtool - Library building support services REQUIRED - 2.4.6 OK -
hp-check[6933]: info: :
hp-check[6933]: info: :------------------------
hp-check[6933]: info: :| General Dependencies |
hp-check[6933]: info: :------------------------
hp-check[6933]: info: :
hp-check[6933]: info: : libcrypto libcrypto - OpenSSL cryptographic library REQUIRED - 1.1.0 OK -
hp-check[6933]: info: : python-xml Python XML libraries REQUIRED - 2.2.5 OK -
hp-check[6933]: info: : libnetsnmp-devel libnetsnmp-devel - SNMP networking library development files REQUIRED 5.0.9 5.7.3 OK -
hp-check[6933]: info: : sane-devel SANE - Scanning library development files REQUIRED - - OK -
hp-check[6933]: info: : pil PIL - Python Imaging Library (required for commandline scanning with hp-scan) OPTIONAL - 1.1.7 OK -
hp-check[6933]: info: : pyqt4-dbus PyQt 4 DBus - DBus Support for PyQt4 REQUIRED 4.0 4.12.1 OK -
hp-check[6933]: info: : libpthread libpthread - POSIX threads library REQUIRED - 2.27 OK -
hp-check[6933]: info: : python-devel Python devel - Python development files REQUIRED 2.2 2.7.15 OK -
hp-check[6933]: info: : cups-devel CUPS devel- Common Unix Printing System development files REQUIRED - 2.2.7 OK -
hp-check[6933]: info: : python-dbus Python DBus - Python bindings for DBus REQUIRED 0.80.0 1.2.6 OK -
hp-check[6933]: info: : cups-ddk CUPS DDK - CUPS driver development kit OPTIONAL - - OK -
hp-check[6933]: info: : reportlab Reportlab - PDF library for Python OPTIONAL 2.0 3.4.0 OK -
hp-check[6933]: info: : pyqt4 PyQt 4- Qt interface for Python (for Qt version 4.x) REQUIRED 4.0 4.12.1 OK -
hp-check[6933]: info: : libusb libusb - USB library REQUIRED - 1.0 OK -
hp-check[6933]: info: : cups-image CUPS image - CUPS image development files REQUIRED - 2.2.7 OK -
hp-check[6933]: info: : python2X Python 2.2 or greater - Python programming language REQUIRED 2.2 2.7.15 OK -
hp-check[6933]: info: : python-notify Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL - - OK -
hp-check[6933]: info: : libjpeg libjpeg - JPEG library REQUIRED - - OK -
hp-check[6933]: info: : sane SANE - Scanning library REQUIRED - - OK -
hp-check[6933]: info: :
hp-check[6933]: info: :----------------------
hp-check[6933]: info: :| Scan Configuration |
hp-check[6933]: info: :----------------------
hp-check[6933]: info: :
hp-check[6933]: info: : scanext Scan-SANE-Extension REQUIRED - 3.18.9 OK -
hp-check[6933]: info: : hpaio HPLIP-SANE-Backend REQUIRED - 3.18.9 OK 'hpaio found in /etc/sane.d/dll.conf'
hp-check[6933]: info: :
hp-check[6933]: info: :-------------------------
hp-check[6933]: info: :| External Dependencies |
hp-check[6933]: info: :-------------------------
hp-check[6933]: info: :
hp-check[6933]: info: : gs GhostScript - PostScript and PDF language interpreter and previewer REQUIRED 7.05 9.25 OK -
hp-check[6933]: info: : scanimage scanimage - Shell scanning program OPTIONAL 1.0 1.0.27 OK -
hp-check[6933]: info: : cups CUPS - Common Unix Printing System REQUIRED 1.1 2.2.7 OK 'CUPS Scheduler is running'
hp-check[6933]: info: : network network -wget OPTIONAL - 1.19.4 OK -
hp-check[6933]: info: : policykit PolicyKit - Administrative policy framework OPTIONAL - 0.105 OK -
hp-check[6933]: info: : xsane xsane - Graphical scanner frontend for SANE OPTIONAL 0.9 0.999 OK -
hp-check[6933]: info: : dbus DBus - Message bus system REQUIRED - 1.12.2 OK -
hp-check[6933]: info: : avahi-utils avahi-utils OPTIONAL - 0.7 OK -
hp-check[6933]: info: :
hp-check[6933]: info: :---------------------
hp-check[6933]: info: :| Python Extentions |
hp-check[6933]: info: :---------------------
hp-check[6933]: info: :
hp-check[6933]: info: : hpmudext IO-Extension REQUIRED - 3.18.9 OK -
hp-check[6933]: info: : cupsext CUPS-Extension REQUIRED - 3.18.9 OK -
hp-check[6933]: info: :
hp-check[6933]: info: :------------------------------
hp-check[6933]: info: :| DISCOVERED SCANNER DEVICES |
hp-check[6933]: info: :------------------------------
hp-check[6933]: info: :
hp-check[6933]: info: :device `hpaio:/usb/HP_Color_LaserJet_Pro_MFP_M177fw?serial=CNG6J7YGFF' is a Hewlett-Packard HP_Color_LaserJet_Pro_MFP_M177fw all-in-one
device `hpaio:/net/HP_Color_LaserJet_Pro_MFP_M177fw?ip=192.168.0.159' is a Hewlett-Packard HP_Color_LaserJet_Pro_MFP_M177fw all-in-one

hp-check[6933]: info: :
hp-check[6933]: info: :--------------------------
hp-check[6933]: info: :| DISCOVERED USB DEVICES |
hp-check[6933]: info: :--------------------------
hp-check[6933]: info: :
hp-check[6933]: info: : Device URI Model
hp-check[6933]: info: : -------------------------------- --------------------------------
hp-check[6933]: info: : hp:/usb/HP_Color_LaserJet_Pro_MF HP Color LaserJet Pro MFP M177fw
  P_M177fw?serial=CNG6J7YGFF
hp-check[6933]: info: :
hp-check[6933]: info: :---------------------------------
hp-check[6933]: info: :| INSTALLED CUPS PRINTER QUEUES |
hp-check[6933]: info: :---------------------------------
hp-check[6933]: info: :
hp-check[6933]: info: :
hp-check[6933]: info: :HP_Color_LaserJet_Pro_MFP_M177fw
hp-check[6933]: info: :--------------------------------
hp-check[6933]: info: :Type: Printer
hp-check[6933]: info: :Device URI: hp:/net/HP_Color_LaserJet_Pro_MFP_M177fw?ip=192.168.0.159
hp-check[6933]: info: :PPD: /etc/cups/ppd/HP_Color_LaserJet_Pro_MFP_M177fw.ppd
warning: Failed to read /etc/cups/ppd/HP_Color_LaserJet_Pro_MFP_M177fw.ppd ppd file
hp-check[6933]: info: :PPD Description:
hp-check[6933]: info: :Printer status: printer HP_Color_LaserJet_Pro_MFP_M177fw is idle. enabled since Tue 16 Oct 2018 05:16:21 PM EDT
hp-check[6933]: info: :Communication status: Good
hp-check[6933]: info: :
hp-check[6933]: info: :HP_Color_LaserJet_Pro_MFP_M177fw_fax
hp-check[6933]: info: :------------------------------------
hp-check[6933]: info: :Type: Fax
hp-check[6933]: info: :Device URI: hpfax:/net/HP_Color_LaserJet_Pro_MFP_M177fw?ip=192.168.0.159
hp-check[6933]: info: :PPD: /etc/cups/ppd/HP_Color_LaserJet_Pro_MFP_M177fw_fax.ppd
warning: Failed to read /etc/cups/ppd/HP_Color_LaserJet_Pro_MFP_M177fw_fax.ppd ppd file
hp-check[6933]: info: :PPD Description:
hp-check[6933]: info: :Printer status: printer HP_Color_LaserJet_Pro_MFP_M177fw_fax is idle. enabled since Tue 16 Oct 2018 04:55:43 PM EDT
hp-check[6933]: info: :Communication status: Good
hp-check[6933]: info: :
hp-check[6933]: info: :HP_Color_LaserJet_Pro_MFP_M177fwFAX
hp-check[6933]: info: :-----------------------------------
hp-check[6933]: info: :Type: Fax
hp-check[6933]: info: :Device URI: hpfax:/net/HP_Color_LaserJet_Pro_MFP_M177fw?ip=192.168.0.159
hp-check[6933]: info: :PPD: /etc/cups/ppd/HP_Color_LaserJet_Pro_MFP_M177fwFAX.ppd
warning: Failed to read /etc/cups/ppd/HP_Color_LaserJet_Pro_MFP_M177fwFAX.ppd ppd file
hp-check[6933]: info: :PPD Description:
hp-check[6933]: info: :Printer status: printer HP_Color_LaserJet_Pro_MFP_M177fwFAX is idle. enabled since Sun 14 Oct 2018 12:57:41 PM EDT
hp-check[6933]: info: :Communication status: Good
hp-check[6933]: info: :
hp-check[6933]: info: :
hp-check[6933]: info: :--------------
hp-check[6933]: info: :| PERMISSION |
hp-check[6933]: info: :--------------
hp-check[6933]: info: :
hp-check[6933]: info: :USB None Required - - OK Node:'/dev/bus/usb/001/006' Perm:' root lp rw- rw- rw- rw- r--'
hp-check[6933]: info: :No errors or warnings.
hp-check[6933]: info: :
hp-check[6933]: info: :Done.

srinivas (srinivas5) said : #5

This issue looks like ghostscript problem. Can you try the solution suggested in the below link and confirm if it works?
https://askubuntu.com/questions/924915/broken-ghostscript-configuration

Mark Chojnacki (mchojna) said : #6

Thanks, Srinivas. That fixed the problem.

Mark