1831462 Members
3111 Online
110025 Solutions
New Discussion

lp problems

 
SOLVED
Go to solution
James Lanaway
Advisor

lp problems

I have one printer (set as default) on my system. Whenever I send a print to it, it becomes disabled - with a reason unknown. In the lp log the following error message appears: "hpnpf: unknown host ehqprt006"

I have tried stopping/starting the spooler etc. and am getting nowhere fast!

Thanks for any help...

J
6 REPLIES 6
Peter Kloetgen
Esteemed Contributor

Re: lp problems

Hi,

seems to be a name resolution problem, did you check your /etc/hosts file? Try to send the printjob to IP- adress first to confirm it.

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping
Deepak Extross
Honored Contributor

Re: lp problems

Does 'lpstat' show the printer as "ready and waiting"?
Ceesjan van Hattum
Esteemed Contributor

Re: lp problems

Delete printer, queues and anything else you can find relating to this printer.
Then..
resinstall printer by using 'jetadmin' and nothing else...
Regards,
Ceesjan
Steve Steel
Honored Contributor

Re: lp problems

Hi


This is definately a lookup problem.

If you use DNS the /etc/resolv.conf file must
have permissions of at least 444 .
ping will work ok as will nslookup, but
bad permissions will make Jetadmin fail with hpnpf not being able to resolve the hostname of the printer.

CHECK permissions on these:
/tmp : 777
/etc/hosts : 444
/etc/resolv.conf (if it exists) : 444


Steve Steel


If you want truly to understand something, try to change it. (Kurt Lewin)
Wim Rombauts
Honored Contributor

Re: lp problems

To me, it seems you have a name resolution problem.

What is the result of the command "nslookup ehqprt006".

If it doesn't return the correct IP address of the printer (what I think will be the problem), you need to check your /etc/hosts or DNS server (or NIS server).

Is the printername absolutely correct ?
What is it's IP address, can you ping it ? Can you do a reverse lookup (nslookup ) ?

Bill Hassell
Honored Contributor
Solution

Re: lp problems

When a LAN-based printer stops working (ie, disabled), the first step is to ping by IP address (this avoids DNS nameserver problems as printers are often missed in managing DNS). If it does not respond, go no further. Instead, examine the IP address of the printer by using the self test button. As there are dozens of HP printers, you'll have to refer to the JetDirect or printer manual. For non-HP printers with non-HP LAN cards, refer to the mfr's documentation.

Once the address has been reinstated, if ping still does not work, the printer may not have the correct gateway (router) in the configuration. All network devices need a minimum of 3 values: IP-address, subnet mask and gateway.

Once ping to IP-address responds, now check the hostname with nslookup. If there is no such device, then the IP-to-name connection in /eetc/hosts or DNS has been broken. For /etc/hosts, just edit the file. However, if you have a file called /etc/resolv.conf, then what nslookup says it used to first determine the address, as in:

# nslookup bambam
Using /etc/hosts on: rebel

looking up FILES
Trying DNS
Name: bambam.atl.hp.com
Address: 156.94.386.491

In this case, the hostname lookup was directed to look in /etc/hosts (FILES) and not finding the name there, tried DNS and resolved the name. The order was dictated by /etc/nsswitch.conf (which you may not have, but should create if you have /etc/resolv.conf). To avoid DNS updating problems, always put printer names and IP's into /etc/hosts and specify:

hosts: files[NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]

in /etc/nsswitch.conf. This will provide a more reliable (and faster)way to resolve important hostnames and IP addresses.

Note also that HP's JetDirect software does not need a hostname, as it can use the IPP address. To fix you printer, use removequeue to remove the printer, verify it is working:

/opt/hpnp/bin/hpnpadmin -v IP-address

If you get back a bunch of stats, all is well. Then add the printer back with addqueue as in:

addqueue -h 156.345.678.90 -q my_local_print_queue


Bill Hassell, sysadmin