Operating System - HP-UX
1833757 Members
2347 Online
110063 Solutions
New Discussion

Problem with printing on HP-UX 11.11

 
DAN ROSS
Advisor

Problem with printing on HP-UX 11.11

I had a disc failure on our HP-UX 11.11 server. After replacing the disc, reinstalling the system, and restoring files, out last issue is printing. I restored /etc/lp, /var/adm/lp, and /var/spool/lp. All printers now show, but the scheduler will not start.

What I am looking for is help in making my printers available.

From the command lpsched -v below is the log file:

lpsched: can't open request directory request/LP/
FIFO: Destinations --
FIFO: LP: p not enabled not busy /dev/null
FIFO: directlp: p not enabled not busy /dev/tty0p2
FIFO: directlp3: p not enabled not busy /dev/tty0p3
FIFO: laser: p not enabled not busy /var/spool/lp/pr_serv/laser_config
FIFO: laser02: p not enabled not busy /dev/null
FIFO: laser03: p not enabled not busy /dev/null
FIFO: laser04: p not enabled not busy /dev/null
FIFO: laser05: p not enabled not busy /dev/null
FIFO: laser06: p not enabled not busy /dev/null
FIFO: laser07: p not enabled not busy /dev/null
FIFO: laser08: p not enabled not busy /dev/null
FIFO: laser09: p not enabled not busy /dev/null
FIFO: laser10: p not enabled not busy /dev/null
FIFO: laser11: p not enabled not busy /dev/null
FIFO: laser12: p not enabled not busy /dev/null
FIFO: laser13: p not enabled not busy /dev/null
FIFO: laser14: p not enabled not busy /dev/null
FIFO: laser15: p not enabled not busy /dev/null
FIFO: laser16: p not enabled not busy /dev/null
FIFO: laser17: p not enabled not busy /dev/null
FIFO: laser18: p not enabled not busy /dev/null
FIFO: laser19: p not enabled not busy /dev/null
FIFO: laser20: p not enabled not busy /dev/null
FIFO: laser21: p not enabled not busy /dev/null
FIFO: laser22: p not enabled not busy /dev/null
FIFO: laser23: p not enabled not busy /dev/null
FIFO: laser24: p not enabled not busy /dev/null
FIFO: laser25: p not enabled not busy /dev/null
FIFO: laser26: p not enabled not busy /dev/null
FIFO: laser27: p not enabled not busy /dev/null
FIFO: laser30: p not enabled not busy /dev/null
FIFO: laser31: p not enabled not busy /dev/null
FIFO: laser32: p not enabled not busy /dev/null
FIFO: laser33: p not enabled not busy /dev/null
FIFO: laser34: p not enabled not busy /dev/null
FIFO: laser35: p not enabled not busy /dev/null
FIFO: laser36: p not enabled not busy /dev/null
FIFO: laser37: p not enabled not busy /dev/null
FIFO: laser39: p not enabled not busy /dev/null
FIFO: laser41: p not enabled not busy /dev/null
FIFO: laser47: p not enabled not busy /dev/null
FIFO: laser52: p not enabled not busy /dev/null
FIFO: laser55: p not enabled not busy /dev/null
FIFO: laser57: p not enabled not busy /dev/null
FIFO: laser59: p not enabled not busy /dev/null
FIFO: laser62: p not enabled not busy /dev/null
FIFO: laser63: p not enabled not busy /dev/null
FIFO: laser64: p not enabled not busy /dev/null
FIFO: laser65: p not enabled not busy /dev/null
FIFO: laser66: p not enabled not busy /dev/null
FIFO: laser67: p not enabled not busy /dev/null
FIFO: laser70: p not enabled not busy /dev/null
FIFO: laser72: p not enabled not busy /dev/null
FIFO: laser73: p not enabled not busy /dev/null
FIFO: laser74: p not enabled not busy /dev/null
FIFO: lp814: p not enabled not busy /dev/telnet/dtc33b01p14
FIFO: paralp: p not enabled not busy /dev/lp1
FIFO: templp: p not enabled not busy /dev/null
FIFO: Printers --
FIFO: LP pid and id unknown
FIFO: directlp pid and id unknown
FIFO: directlp3 pid and id unknown
FIFO: laser pid and id unknown
FIFO: laser02 pid and id unknown
FIFO: laser03 pid and id unknown
FIFO: laser04 pid and id unknown
FIFO: laser05 pid and id unknown
FIFO: laser06 pid and id unknown
FIFO: laser07 pid and id unknown
FIFO: laser08 pid and id unknown
FIFO: laser09 pid and id unknown
FIFO: laser10 pid and id unknown
FIFO: laser11 pid and id unknown
FIFO: laser12 pid and id unknown
FIFO: laser13 pid and id unknown
FIFO: laser14 pid and id unknown
FIFO: laser15 pid and id unknown
FIFO: laser16 pid and id unknown
FIFO: laser17 pid and id unknown
FIFO: laser18 pid and id unknown
FIFO: laser19 pid and id unknown
FIFO: laser20 pid and id unknown
FIFO: laser21 pid and id unknown
FIFO: laser22 pid and id unknown
FIFO: laser23 pid and id unknown
FIFO: laser24 pid and id unknown
FIFO: laser25 pid and id unknown
FIFO: laser26 pid and id unknown
FIFO: laser27 pid and id unknown
FIFO: laser30 pid and id unknown
FIFO: laser31 pid and id unknown
FIFO: laser32 pid and id unknown
FIFO: laser33 pid and id unknown
FIFO: laser34 pid and id unknown
FIFO: laser35 pid and id unknown
FIFO: laser36 pid and id unknown
FIFO: laser37 pid and id unknown
FIFO: laser39 pid and id unknown
FIFO: laser41 pid and id unknown
FIFO: laser47 pid and id unknown
FIFO: laser52 pid and id unknown
FIFO: laser55 pid and id unknown
FIFO: laser57 pid and id unknown
FIFO: laser59 pid and id unknown
FIFO: laser62 pid and id unknown
FIFO: laser63 pid and id unknown
FIFO: laser64 pid and id unknown
FIFO: laser65 pid and id unknown
FIFO: laser66 pid and id unknown
FIFO: laser67 pid and id unknown
FIFO: laser70 pid and id unknown
FIFO: laser72 pid and id unknown
FIFO: laser73 pid and id unknown
FIFO: laser74 pid and id unknown
FIFO: lp814 pid and id unknown
FIFO: paralp pid and id unknown
FIFO: templp pid and id unknown
FIFO: Classes --
***** STOPPED Dec 1 08:13 *****
20 REPLIES 20
DAN ROSS
Advisor

Re: Problem with printing on HP-UX 11.11

From another post I tried the follow and was able to print to one of the printers correctly.

alias hpnpf=/opt/hpnpl/bin/hpnpf
hpnpf -x laser02 -s /tmp/hpnp.log -N /etc/hosts

Here is the log from this:
Dec 1 08:51:27%%[ status: Job: ; User: ]%%
Dec 1 08:51:27%%[ status: making connection to laser02; source: ethernet ]%%
Dec 1 08:51:27%%[ status: connected to laser02; source: ethernet ]%%
Dec 1 08:51:27%%[ status: transmitting data ]%%
Dec 1 08:51:27%%[ status: finish sending print data ]%%
A. Clay Stephenson
Acclaimed Contributor

Re: Problem with printing on HP-UX 11.11

The most likely explanation is ownership, group, and modes of the various files and directories. Lp is extremely sensitive to this and also some of the executable require the setuid/setgid bits be set. How did you restore the data? If you simply copied the files then almost certainly some of the ownership, group, etc. metadata were lost.


If it ain't broke, I can fix that.
DAN ROSS
Advisor

Re: Problem with printing on HP-UX 11.11

I used frestore to bring back the files from the last nightly backup. After the files had returned I could see them under lpstat -t.
DAN ROSS
Advisor

Re: Problem with printing on HP-UX 11.11

Actually it was frecover that was used to restore the files.

The permissions on the directories are:
/etc/lp lp:bin 755
/var/adm/lp lp:lp 644
/var/spool/lp lp:lp 644.
A. Clay Stephenson
Acclaimed Contributor

Re: Problem with printing on HP-UX 11.11

Okay, then let's start from here and, silly me, I am going to assume that your modes and ownerships are correct.

lpshut
cd /var/spool/lp
ls *LOCK* *FIFO*
If any files are listed, remove them.
ps -ef | grep lpsched
If you see any lpsched's running, kill them.
ps -ef | grep hpnpf
If you see any hpnpf's running kill them.
lpsched

That will solve the majority of lpsched problems --- iff the modes and ownerships are correct.
If it ain't broke, I can fix that.
DAN ROSS
Advisor

Re: Problem with printing on HP-UX 11.11

Results:

lpshut
scheduler not running

ls *LOCK* *FIFO*
not found

ps -ef|grep lpsched
non running

ps -ef|grep hpnpf
non running

lpsched
scheduler is running

lpstst -r
scheduler is not runnig

Can you tell me what the permissions should be set to?
DAN ROSS
Advisor

Re: Problem with printing on HP-UX 11.11

If I try to enable the printer I get the message:

printer has disappeared!

What is missing? What files have I not recovered?
DAN ROSS
Advisor

Re: Problem with printing on HP-UX 11.11

I tried the following:

lp -dlaser02 -odegubm/tmp/debug.log /etc/hosts

This had the following results:
lp: destination "laser02" non-existent
rm: cannot stat request//*0000*: Permission denied
A. Clay Stephenson
Acclaimed Contributor

Re: Problem with printing on HP-UX 11.11

There a 3 binaries files in /var/spool/lp: outputq, pstatus, and qstatus. I'm betting that at least 1 of these is corrupt. All of these should have 644 mode and owner and group should be lp.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Problem with printing on HP-UX 11.11

There are 3 binary files in /var/spool/lp: outputq, pstatus, and qstatus. I'm betting that at least 1 of these is corrupt. All of these should have 644 mode and owner and group should be lp.
If it ain't broke, I can fix that.
DAN ROSS
Advisor

Re: Problem with printing on HP-UX 11.11

The 3 binary files outputq, pstatus, and qstatus had there group set to bin. I changed it to lp and tried the following:

lpsched -v
scheduler is running

lpstat -r
scheduler is not running

I checked the log file to see if error had changed but they were the same as above just with a new timestamp.

Should I try to recover the three binary files? Can they be recreated?
A. Clay Stephenson
Acclaimed Contributor

Re: Problem with printing on HP-UX 11.11

Try this:

lpshut
cd /var/spool/lp
cp -p outputq outputq.sav
> outputq # will create a null file
lpsched
If it ain't broke, I can fix that.
DAN ROSS
Advisor

Re: Problem with printing on HP-UX 11.11

The following happened:

lpshut
scheduler not running

cd /var/spool/lp
cp -p outputq outputq.sav > outputq
created the new file

lpsched -v
scheduler running

lpstat -r
scheduler not running

I am recovering the files from tape a second time to see if this can make a difference.
A. Clay Stephenson
Acclaimed Contributor

Re: Problem with printing on HP-UX 11.11

Here's a pretty good troubleshooting guide although we've been through many of the steps:

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&admit=-682735245+1133465557442+28353475&docId=200000080075820
If it ain't broke, I can fix that.
Sameer_Nirmal
Honored Contributor

Re: Problem with printing on HP-UX 11.11

Hi,

Check the request directory in
/var/spool/lp
It should have owner as "lp" and group as "bin" with permissions 755.

DAN ROSS
Advisor

Re: Problem with printing on HP-UX 11.11

Clay,

I have seen this document. I found it from a previous post. It is good but does not work.

Sameer,

Checked the /var/spool/lp. It was set to 655. Changed it and still does not work.

The odd thing, after I frecovered the files from the backup before the disc failed (all printing worked at that point), it was 655.
DAN ROSS
Advisor

Re: Problem with printing on HP-UX 11.11

If I use the following command to try to create a new printer I get this error message.

lpadmin -pchecks -elaser62 -v/etc/lp/interface/laser62
mkdir: cannot access request: Permission denied
lpadmin: can't create new request directory

I still have a permissions issue. Can someone give me some help as to where to look?
A. Clay Stephenson
Acclaimed Contributor

Re: Problem with printing on HP-UX 11.11

Start with the permissions of /var/spool/lp itself. The directory should be 755 and owned by lp:bin. Next the /var/spool/lp/request directory should be 755 and owned by lp:bin.

You may have a setuid bit problem.

[prissy]/home/cstephen: ls -l /usr/sbin/lp*
-r-sr-xr-x 1 root bin 45056 Apr 26 2004 /usr/sbin/lpadmin
-r-xr-xr-x 1 bin bin 16384 Apr 26 2004 /usr/sbin/lpana
-r-sr-xr-x 1 lp bin 20480 Apr 26 2004 /usr/sbin/lpfence
-r-sr-xr-x 1 lp bin 28672 Apr 26 2004 /usr/sbin/lpmove
-r-sr-xr-x 1 root bin 53248 Apr 26 2004 /usr/sbin/lpsched
-r-sr-xr-x 1 lp bin 16384 Apr 26 2004 /usr/sbin/lpshut
[pris
ls -l /usr/sbin/lp*

If it ain't broke, I can fix that.
Sameer_Nirmal
Honored Contributor

Re: Problem with printing on HP-UX 11.11

Dan,

The problem is with "request" directory only. As I said in my last, /var/spool/lp/request should have attributes as lp:bin and 755.

You are trying to add a printer with lpadmin command, lpadmin is trying to create a new directory under /var/spool/lp/request directory for the new printer for putting its print requests. It is failing because /var/spool/lp/request directory is either not present or has permission problem . Check it .
DAN ROSS
Advisor

Re: Problem with printing on HP-UX 11.11

I ending up using lpadmin and removing all printers. Then the lpsched actually started and stayed running.

I was able recreate all the printers. This was my last resort but I needed to get reports out.

Thanks Clay and Sameer for you help.