Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 97033

Summary: hplip network printing probe error
Product: Gentoo Linux Reporter: Ben Litton <ben.litton>
Component: [OLD] PrintingAssignee: Printing Team <printing>
Status: RESOLVED FIXED    
Severity: blocker CC: dynamotwain, elreydetodo, fraterm, heiko.baums, kenyon, lavish, namelesspirate, rockoo, samuel.robyr, tetromino
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 107665    
Bug Blocks:    
Attachments: /etc/init.d/hplip -- will work with future baselayout versions

Description Ben Litton 2005-06-25 06:13:28 UTC
I'm not sure if this is a bug or me being stupid, but I offer my difficulties up
for inspection in any case. Any help would be much appreciated. 

I purchased a HP Photosmart 2710. According to
http://www.linuxprinting.org/show_printer.cgi?recnum=HP-PhotoSmart_2700
(linuxPrinting.org) this printer is compatible with Linux. I emerged CUPS, and
foomatica. I emerged hplip. I am trying to get this to work as a network
printer. I was attempting to follow some instructions here:
http://hpinkjet.sourceforge.net/

When I start hplip it seems to work and rc-status shows it as running.

When I restart it I get the following:
Code:
tux hplip # /etc/init.d/hplip restart
 * Stopping hpiod ...                                                     [ ok ]
* Stopping hpssd ...
start-stop-daemon: warning: failed to kill 8785: No such process
1 pids were not killed
No process in pidfile `/var/run/hpssd.pid' found running; none killed.    [ !!
]tux hplip #

htop shows hpiod as a process.

I try this command to find the net address of my printer, as per instructions
Code:
tux hplip # ./probe -bnet

 HP Linux Imaging and Printing System (ver. 0.9.3)
 Device Detection (Probe) Utility ver. 1.1

 Copyright (c) 2003-5 Hewlett-Packard Development Company, LP
 This software comes with ABSOLUTELY NO WARRANTY.
 This is free software, and you are welcome to distribute it
 under certain conditions. See COPYING file for more details.

Traceback (most recent call last):
  File "./probe", line 169, in ?
    hpssd_sock.connect( ( prop.hpssd_host, prop.hpssd_port ) )
  File "<string>", line 1, in connect
socket.gaierror: (-2, 'Name or service not known')


I found a note somewhere that suggested that if the probe command fails, try the
makeurl command.

Code:
tux hplip # hp-makeuri 192.168.1.45

 HP Linux Imaging and Printing System (ver. 0.9.3)
 Device URI Creation Utility ver. 2.1

 Copyright (c) 2003-5 Hewlett-Packard Development Company, LP
 This software comes with ABSOLUTELY NO WARRANTY.
 This is free software, and you are welcome to distribute it
 under certain conditions. See COPYING file for more details.

 [ERROR]: Unable to connect to hpiod.
tux hplip #


My problem is hpiod is running in top, I know this. I'm not sure where to turn
next. Any ideas?

Thanks

Reproducible: Always
Steps to Reproduce:
1. Emerge CUPS, Foomatica and hplip
2. Start cupsd and hplip from etc/init.d/ (They are now in default runlevel)
3. cd /usr/share/hplip/
4 ./probe -bnet (causes one of the above error)
5 ./hp-makeuri 192.168.1.45 (causes one of the above errors)
6. /usr/sbin/hpiod 
7. repeat steps 4 and 5 (errors unchanged.)
8. /etc/init.d/hplip restart (causes one of the above errors)
9. repeat steps 4 and 5 (errors unchanged.)



Actual Results:  
tux hplip # /etc/init.d/hplip restart
 * Stopping hpiod ...                                                     [ ok ]
* Stopping hpssd ...
start-stop-daemon: warning: failed to kill 8785: No such process
1 pids were not killed
No process in pidfile `/var/run/hpssd.pid' found running; none killed.    [ !!
]tux hplip #

tux hplip # ./probe -bnet

 HP Linux Imaging and Printing System (ver. 0.9.3)
 Device Detection (Probe) Utility ver. 1.1

 Copyright (c) 2003-5 Hewlett-Packard Development Company, LP
 This software comes with ABSOLUTELY NO WARRANTY.
 This is free software, and you are welcome to distribute it
 under certain conditions. See COPYING file for more details.

Traceback (most recent call last):
  File "./probe", line 169, in ?
    hpssd_sock.connect( ( prop.hpssd_host, prop.hpssd_port ) )
  File "<string>", line 1, in connect
socket.gaierror: (-2, 'Name or service not known')

tux hplip # hp-makeuri 192.168.1.45

 HP Linux Imaging and Printing System (ver. 0.9.3)
 Device URI Creation Utility ver. 2.1

 Copyright (c) 2003-5 Hewlett-Packard Development Company, LP
 This software comes with ABSOLUTELY NO WARRANTY.
 This is free software, and you are welcome to distribute it
 under certain conditions. See COPYING file for more details.

 [ERROR]: Unable to connect to hpiod.


Expected Results:  
It should return the uri of the printer so I can proceed to add it via the cups
localhost interface.

tux hplip # emerge info
Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130,
glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r11 i686)
=================================================================
System uname: 2.6.11-gentoo-r11 i686 Intel(R) Pentium(R) 4 CPU 1700MHz
Gentoo Base System version 1.6.12
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, May  5 2005, 23:21:23)]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.8.5-r3, 1.5, 1.9.5, 1.6.3, 1.4_p6, 1.7.9-r1
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.ndlug.nd.edu/pub/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib aim alsa apache2 arts avi berkdb bitmap-fonts bonobo bzlib
cdparanoia cdr cpdflib crypt cups curl dbm directfb divx4linux doc dts dvd
dvdread eds emboss encode esd fam fbcon ffmpeg flac foomaticdb fortran ftp gb gd
gdbm ggi gif gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml hal imagemagick imap
imlib ipv6 java jpeg junit kde kdeenablefinal lcms ldap libg++ libpng libwww mad
maildir mikmod mmx mmxext motif mozilla mp3 mpeg msn mysql mysqli ncurses nls
odbc offensive ogg oggvorbis opengl oscar oss pam pdflib perl png ppds python qt
quicktime readline samba scanner sdl session snmp speex spell spl sqlite sse
sse2 ssl svg svga tcpd tiff truetype truetype-fonts type1-fonts unicode
userlocales vcd vhosts videos vorbis win32codecs wxwindows x86 xine xml xml2
xmms xscreensaver xv xvid xvmc zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Heinrich Wendel (RETIRED) gentoo-dev 2005-07-10 08:39:01 UTC
try to killall hpssd/hpiod processes, run /etc/init.d/hplip zap and 
then /etc/init.d/hplip start 
Comment 2 Luis Medinas (RETIRED) gentoo-dev 2005-08-02 09:11:38 UTC
Ben please give me some feedback about Heinrich comment.
Comment 3 Ben Litton 2005-08-18 04:52:19 UTC
Sorry for the tardy response. I've been stuck on a deadline. 

I tried your suggestions but to no avail. I tried setting up Ubuntu on a
different machine on the same network and installed hplip myself, but it also
did not work. This leads me to believe that it is an upstream and/or
configuration problem. It works fine in Windows, but that's no surprise. 

I'll revisit the issue after deadline in early September and let you know how I
resolved the issue if I am able to.
Comment 4 Jon 2005-08-18 13:11:15 UTC
The probe command will not work because hpssd is not running. I am having the 
same problem with a DeskJet 5740. Entering the commands found in the hplip init 
script manually work fine, however the script always fails for me. I have a 
guess that the start-stop-daemon is reporting a failure falsely for hpssd 
causing runscript to stop hpliod and hpssd, but I may be wrong.
Comment 5 Kenyon Ralph 2005-08-20 20:27:51 UTC
Did anybody notice this in the output of /usr/share/hplip/probe --help:

    Bus to probe:             -b<bus> or --bus=<bus>
                                 <bus>: cups*, usb*, net, bt, fw, par (*default)
(Note:
                                net, bt, fw, and par not supported)

Net not supported?
Comment 6 Kenyon Ralph 2005-08-20 21:10:25 UTC
(In reply to comment #4)
> The probe command will not work because hpssd is not running. I am having the 
> same problem with a DeskJet 5740. Entering the commands found in the hplip init 
> script manually work fine, however the script always fails for me. I have a 
> guess that the start-stop-daemon is reporting a failure falsely for hpssd 
> causing runscript to stop hpliod and hpssd, but I may be wrong.

I'm seeing the same thing (using version 0.9.4).  The init.d/hplip script won't
start.  But I can run hpiod and /usr/share/hplip/hpssd.py manually, then I did
the hp-makeuri thing, made the printer in CUPS (which was also dumb because the
hp backend says hp no_device_found, so I used the LPD backend and pasted in the
URI generated by hp-makeuri), then started toolbox and printed a test page and
everything seems to work.

This won't work if I reboot though, since the init.d script fails!

Also snmpd is a hassle since it doesn't come with a config file, so I copied the
one from http://forums.gentoo.org/viewtopic-t-365403.html.

HP's drivers have always been crap, even on Mac OS X and Windows.  Highly annoying.
Comment 7 Jon 2005-08-22 10:43:00 UTC
Hplip is actually a very good driver, and I have had great results with it 
using many different linux distributions, excluding gentoo. It seems to me that 
this is more a gentoo baselayout problem as that includes runscript which is 
causing hplip to crap out. I know I am using the ~x86 masked baselayout, are 
either of you using that as the problem may lie there.
Comment 8 Kenyon Ralph 2005-08-22 18:15:27 UTC
(In reply to comment #7)
> Hplip is actually a very good driver, and I have had great results with it 
> using many different linux distributions, excluding gentoo. It seems to me that 
> this is more a gentoo baselayout problem as that includes runscript which is 
> causing hplip to crap out. I know I am using the ~x86 masked baselayout, are 
> either of you using that as the problem may lie there.

Yeah I'm using baselayout-1.12.0_pre6 and hplip won't start with the init script.
Comment 9 Karel De Vriendt 2005-09-28 11:37:55 UTC
Same problem here.  Executing

hpiod
/usr/share/hplip/hpssd.py
/etc/init.d/cupsd restart

works fine but the startstop script for hplip does not work.
~x86 installation, baselayout-1.12.0_pre8-r2
can provide emerge --info if needed
Comment 10 Alexandre Rostovtsev (RETIRED) gentoo-dev 2005-09-29 20:28:12 UTC
Created attachment 69533 [details]
/etc/init.d/hplip -- will work with future baselayout versions

Once bug #107665 is resolved, this init script should hopefully solve the hplip
bug. (Basically, current baselayout has problems with daemons written in python
and other scripting languages).
Comment 11 Luis Medinas (RETIRED) gentoo-dev 2005-10-09 17:19:32 UTC
*** Bug 108465 has been marked as a duplicate of this bug. ***
Comment 12 Martin Cyr 2006-01-02 11:54:06 UTC
I'm having the same problem described by some on this thread, that is the start-stop-daemon probably killing the hpssd.py thinking falsely it failed to start. 
I have this problem on an HP PSC1300 connected via USB.

I checked that using the default init script provided by the package from http://hpinkjet.sourceforge.net everything works fine, but the portage version of the init script fails.

Does it work for anyone? If not, then why isn't it hard masked? If it does work, how? (If it's as supposed by Alex Rostovtsev that the baselayout is incompatible with python scripts, why would it work for anyone?) 
I also tried the attachment "/etc/init.d/hplip -- will work with future baselayout versions" without success.

The problem has nothing to do with network printing, my apologies if it's off topic but I don't think so.
Comment 13 Martin Cyr 2006-01-02 12:04:20 UTC
First, I'm sorry, I'm new to Bugzilla, I should've read all the related threads before posting.
Second, please disregard my last post as the attachment in <a href="http://bugs.gentoo.org/show_bug.cgi?id=107665">bug #107665</a> fixes everything. Couldn't it be added to the next ebuild?
Comment 14 Marcelo Goes (RETIRED) gentoo-dev 2006-01-14 10:54:23 UTC
This should be fixed in 0.9.7-r1. Please reopen if it's not.