Operating System - HP-UX
1835220 Members
2787 Online
110078 Solutions
New Discussion

Re: Can not add a printer to server

 

Can not add a printer to server

I loaded server d260 with a "loadset" which included lprng. I am trying to add a printer via SAM or JetAdmin and both fails. I moved printcap file to.old before I began. In SAM, it tells me the printer already exist but I can not see it anywhere other then in the printcap file. JetAdmin says it is unable to shutdown the spooler, do lpshut command line but it isn't running. I am not familiar with lprng at all. Is there any way that I can load the printer with lprng on the server or does it have to be un-installed? Is lprng causing my problem or is it something else?
9 REPLIES 9
Ed Sampson
Frequent Advisor

Re: Can not add a printer to server

Rebecca,
Under /var/spool/lp is a lockfile SCHEDLOCK
which gets put there by lpsched when it is started. Try removing this file, that should let sam or jetadmin configure your printer.

Re: Can not add a printer to server

SCHEDLOCK is not always created. Actually, it has only been created once and I have tried many,many times. I do the lpshut prior to jetadmin and still get "do lpshut command line" and try again. If I try to add the printer via SAM, it says it already exist but jetadmin says "can't do lpshut" even if it is already shutdown. I have tried it both ways, lpshed running, get can't lpshut. I do lpshut first and still get the same error.
Mark Greene_1
Honored Contributor

Re: Can not add a printer to server

this is a bug in script /usr/sam/lbin/lpmgr

I'll do a search of the forums and see if I can find the fix, it's been posted previously.

Mark
the future will be a lot like now, only later
Mark Greene_1
Honored Contributor

Re: Can not add a printer to server

here is the thread, the fix is at the bottom:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xa72718276953d61190040090279cd0f9,00.html

mark
the future will be a lot like now, only later
MANOJ SRIVASTAVA
Honored Contributor

Re: Can not add a printer to server

Hi Rebecca

ps -ef | grep lp doesit show lpshced , if so thne go ahead and kill it , if the lpscheduler is stopped.

Manoj Srivastava

Re: Can not add a printer to server

I have looked at the script /usr/sam/lbin/lpmgr but there isn't any line "if lpstat $1..." to replace with the "if lpstat -p$1.....".

Re: Can not add a printer to server

Oops! Sorry, the if lpstat... line is there. I skimmed right over it. I have replaced the if statement and was able to add the printer via SAM. However, I need to add the printer via JetAdmin tool which is giving me the lpshut error. When adding via SAM, it is only printing the first line of the doc and/or screen. This is a jetdirect printer and should be added as a "network-based" printer which is done via JetAdmin. JetAdmin on this server will not execute correctly due to the lpshut error.
Steve Steel
Honored Contributor

Re: Can not add a printer to server

hi

1)Make sure no lp processes are running

2)cd /var/spool/lp

3)rm FIFO SCHEDLock if there

4)/opt/hpnp/bin/jetadmin (do not use sam)

Add the printer
option 1


Note. If it says the printer exists try
lpadmin -xprinter

5)lpsched

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Mark Greene_1
Honored Contributor

Re: Can not add a printer to server

what happens when you do the lpshut at the command line? And, what does your ls listing for lpshut look like? Here's the one from my 11.0 system:

-r-sr-xr-x 1 lp bin 20480 Oct 27 1997 /usr/sbin/lpshut

HTH
mark
the future will be a lot like now, only later