Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing in SCO Open Server 5.06

Status
Not open for further replies.

dleboeuf

IS-IT--Management
Dec 4, 2002
16
0
0
US
Hi, I'm having a problem with adding new remote printers in Open Server. When I add a printer using the hp printer manager I can put in all the boot/p info and peripheral name, spool name, ip address and select the test option and it will print test pages using the peripheral name or the ip address but that's it.

When I add it to the spool it will not print. The file goes into the queue and sits there. If you check the printer in the printer manager it is disabled. I can delete the job from the queue and reenable it and it will do the same thing over again. The light on the printer will blink a few times and that's it.

I have tried three different jet direct devices and two different printers. I have tried everything from running mkdev rlp with the r option to remove remote printing and reinstalling it. Have tried different models etc. All existing printers will still work but I can't add new ones. Anybody ever have this type of problem?
 
Hi!

instead of going to Printer Manager, go to HP Network Printer Manager - Add printer to spooler - Model script name is "dumb"

Then go to host file and edit
add the ip address assigned to the jetdirect

do a test page:

#lp -dPRINTER /etc/hosts

hope that will help
 
I tried that and still not working. This is the etc/hosts table, lp50 is the printer that does not work. I removed and added it again. All the printers except the last two work fine with no problems.

# SCCS IDENTIFICATION
127.0.0.1 localhost
192.168.0.200 scosysv scosysv.WORKGROUP
192.168.0.35 dennis dennis.WORKGROUP
192.168.0.208 AR5132
192.168.0.209 LP99
192.168.0.206 lp8
192.168.0.211 lp20
192.168.0.137 lp5l
192.168.0.212 lp50
~
 
What does the /etc/printcap entry look like for this printer? Is it different than the ones that work?
 
Check files /var/spool/lp/logs for errors.

Don't know if this is the answer but it's something I'd try.
Let's assume your non-working printer is called "newptr" and you have an existing working printer of the same type called "oldptr":

cd /var/spool/lp/admins/lp/interfaces
cp newptr newptr.orig
cp oldptr newptr
cd models.orig
cp newptr newptr.orig
cp oldptr newptr
 
This is the etc/printcap file, the last few lines anyway. The printer called hp above the last one works fine. The others are virtual printers. Or direct connected printers.

LP7:\ :lp=/dev/ttyb05:ex:sd=/usr/spool/lpd/LP7: LP9:\ :lp=/dev/ttyb09:ex:sd=/usr/spool/lpd/LP9: hp:\ :lp=:rm=hp5l:ex:rp=hp:sd=/usr/spool/lpd/hp: lp33:\ :lp=/dev/null:ex:sd=/usr/spool/lpd/lp33: WIDES:\ :lp=/dev/null:ex:sd=/usr/spool/lpd/WIDES: lp5l:\ :lp=/dev/null:ex:sd=/usr/spool/lpd/lp5l:
 
I already tried copying the interface file and it didn't work. I have not checked the log though. Good Idea, I check it now.

I found the only log file here
var/spool/lp/logs
There where two files
lpsched
requests

lpsched file only showed starting of the print spooler.
well the requests file was too large vi editor would not open it.
 
Do a tail -1000 /var/spool/lp/logs/requests > /tmp/requests and then copy it over the original. Annihilannic.
 
based on the printcap entry...

If /usr/spool/lpd/lp5l directory exists and permissions are correct. then anything sent to this queue should go to /dev/null.

you need to have the rm and rp entries in the printcap entries.

lp5l: :lp=/dev/null :sd=/usr/spool/lpd/lp5l :rm=lp51:rp=hp :mx#0

the mx entry is to allow for unlimited size printjobs
you may need to stop and start lpd daemon
 
Okay, I checked the request log and the job doesn't even show up there. Like the print job never happened. Can someone tell me all the printer related files in the system. I have checked these.
etc/bootptab
etc/printcap
I changed the entry here to a printer that was working. Did not work. Gave me an error about /var/spool/lpd/lp51 missing. So I renamed a unused printer directory to lp51 and the print job went okay (no error) but still didn't print.
 
-rw-rw---x 1 root daemon 4 Dec 9 08:53 .seq
-rw-rw---- 1 daemon sys 113 Dec 9 08:50 cfA000scosysv.WORKGROUP
-rw-rw---- 1 daemon group 128 Dec 9 08:53 cfA001scosysv.WORKGROUP
-rw-rw---- 1 root sys 8389 Dec 9 08:50 dfA000scosysv.WORKGROUP
-rw-rw---- 1 dennis group 1839 Dec 9 08:53 dfA001scosysv.WORKGROUP
-rw-r--r-- 1 root root 5 Dec 9 08:50 lock
-rw-rw-r-- 1 root root 28 Dec 9 08:50 status

This directory listing is in the var/spool/lpd/lp51 directory. the big file is the actual print file. The status file has "waiting for lp51 to come up".

 
From the look of it your sco side is now
configured correctly. The print server at the other end
has to allow the job.
 
Anybody know who I can call to get this problem fixed? I could call SCO but I think it's about 300.00 per incident. Is there anybody else out there that one of you have used that is proficient to fix a problem of this type.
 
Did you change your printcap for the rm and rp entries?
If you did, does that "hp" printer still work?
If it does then change the rm entry on the lp51 to point to hp5l. This will confirm that you have the queues set up correctly. Also remove the ex option in the printcap, this can cause problems if the remote end is not another sco box.
 
Okay, I made so many changes that I deleted all the setup
that I had previously done. I went back and built a new
printer called hp5l. This printer is attached to a hp jet
direct 170x. This printer should work with the hp4
emulation or just plain hp. The settings are as follows.

Mac Address: 0001e6506f5f
IP Address: 192.168.0.137
Emulation: hp

/etc/printcap
LP99: :lp=/dev/null:ex:sd=/usr/spool/lpd/LP99:
LP6: :lp=/dev/ttyb04:ex:sd=/usr/spool/lpd/LP6:
lp8: :lp=/dev/null:ex:sd=/usr/spool/lpd/lp8:
LP21: :lp=/dev/null:ex:sd=/usr/spool/lpd/LP21:
LP22: :lp=/dev/null:ex:sd=/usr/spool/lpd/LP22:
LP7: :lp=/dev/ttyb05:ex:sd=/usr/spool/lpd/LP7:
LP9: :lp=/dev/ttyb09:ex:sd=/usr/spool/lpd/LP9:
hp5l: :lp=/dev/null:ex:sd=/usr/spool/lpd/hp5l:

/etc/bootptab

LP99:\ :ht=ether: :ha=001083f3bf5e: :hn: :ip=192.168.0.209: :vm=rfc1048:
lp8:\
:ht=ether: :ha=0030c15798f9: :hn: :ip=192.168.0.206: :vm=rfc1048:
hp5l:\
:ht=ether: :ha=0001e6506f5f: :hn: :ip=192.168.0.137: :vm=rfc1048:

/etc/hosts

# @(#)hosts,v 6.1 1993/08/21 02:17:48 stevea Exp - STREAMware TCP/IP source
# SCCS IDENTIFICATION
127.0.0.1 localhost
192.168.0.200 scosysv scosysv.WORKGROUP
192.168.0.208 AR5132
192.168.0.209 LP99
192.168.0.206 lp8
192.168.0.137 hp5l

/var/spool/lpd directory

drwxrwxr-x 2 root daemon 512 Dec 6 12:57 LP6
drwxrwxr-x 2 root daemon 512 Dec 6 12:57 LP7
drwxrwxr-x 2 root daemon 512 Dec 6 12:57 LP9
drwxrwxr-x 2 root daemon 512 Dec 6 12:57 LP99
drwxrwxr-x 2 root daemon 512 Dec 6 12:57 STATEMENT
drwxrwxr-x 2 root daemon 512 Dec 6 12:57 WIDE
drwxrwxr-x 2 root daemon 512 Dec 9 15:32 hp5l
drwxrwxr-x 2 root daemon 512 Dec 6 12:57 lp8

Have new printer setup now hp5l and the settings above.
Printer still does not work. Same symptoms, send job ready
light blinks then nothing, check printer in scoadmin
printer and printer is disabled, job is in queue unprinted.

Copied /usr/spool/admins/lp/interfaces/LP99 to hp5l
still did not work.

Print job sits in queue no status message, just will not
print. I think I have it back the same way it was before
this way I know that I didn't mess anything up along the
way.
 
After reading through all of the above posts, it looks like you've covered about everything but the interface file itself.

Here are a couple of things you need to understand. The /etc/printcap file is just a parameter file for the printer daemon and may require different entries depending on the interface you are using, and the /etc/hosts file just provides a name cross-reference for the ip address of the printer. It is the interface file that is actually responsible for sending the data to the printer. My suspicion is that your interface file is referencing a different name than the one you set up for your printer.

Please post a copy of the interface file here. Please include the one for the printer you are having trouble with, and also include the interface of one of your working printers that use a similar connection method.
 
Okay here are the interface files working one first LP99

/usr/spool/lp/admins/lp/interfaces/LP99

MODEL=`basename $0`
REALMODEL=`echo $0 | sed -e "s%$MODEL%model.orig/$MODEL%"`

#
# This name may be initialized when the script is
# installed in the spooler. If not, use the name
# of this script ($MODEL) as the peripheral to contact.
#
PERIPH=
if [ "$PERIPH" = "" ]
then
PERIPH=$MODEL
fi
LOG=/tmp/$PERIPH.$$
HPNPF=/usr/lib/hpnp/hpnpf
LPLOG=/tmp/hpnpf.$$
LOGTRIES=5

echo "$1\t$REALMODEL | $HPNPF -x $PERIPH" >> $LPLOG

#
# Remove the log file if job is cancelled
# or the scheduler is shutdown.
#
trap "rm -f $LOG $LPLOG; trap 15;kill -15 0;exit 0" 15

ERRORLOGS=0
while :
do
#
# Save the stderr messages in a temporary log file
# and discard stdout which is the peripheral output.
#
rm -f $LOG
if $REALMODEL "$@" | $HPNPF -x $PERIPH 2> $LOG > /dev/null
then
#
# If the transfer is successful, remove
# the log file and exit.
#
rm -f $LOG $LPLOG
exit 0
else
#
# Added the request ID to the stderr message
# and store it in the lp log file.
#
# Only record the first $LOGTRIES errors. If
# the spooler gets in a loop retrying a job, the
# disk won't fill up with spooler log error messages.
#
if test -s $LOG -a $ERRORLOGS -lt $LOGTRIES
then
echo "$1\t`cat $LOG`" >> $LPLOG
ERRORLOGS=`expr $ERRORLOGS + 1`
fi
if test $ERRORLOGS -eq $LOGTRIES
then
echo "$1\t$LOGTRIES errors logged for $1; errors no longer logged" >> $LPLOG
ERRORLOGS=`expr $ERRORLOGS + 1`
fi
fi
if [ ! -s $LPLOG ]
then
rm -f $LPLOG
fi
sleep 10
done

Non working one, this is the original file that did not
work, not the one I copied the LP99 file onto.
/usr/spool/lp/admins/lp/interfaces/hp5l


MODEL=`basename $0`
REALMODEL=`echo $0 | sed -e "s%$MODEL%model.orig/$MODEL%"`

#
# This name may be initialized when the script is
# installed in the spooler. If not, use the name
# of this script ($MODEL) as the peripheral to contact.
#
PERIPH=
if [ "$PERIPH" = "" ]
then
PERIPH=$MODEL
fi
LOG=/tmp/$PERIPH.$$
HPNPF=/usr/lib/hpnp/hpnpf
LPLOG=/tmp/hpnpf.$$
LOGTRIES=5

echo "$1\t$REALMODEL | $HPNPF -x $PERIPH" >> $LPLOG

#
# Remove the log file if job is cancelled
# or the scheduler is shutdown.
#
trap "rm -f $LOG $LPLOG; trap 15;kill -15 0;exit 0" 15

ERRORLOGS=0
while :
do
#
# Save the stderr messages in a temporary log file
# and discard stdout which is the peripheral output.
#
rm -f $LOG
if $REALMODEL "$@" | $HPNPF -x $PERIPH 2> $LOG > /dev/null
then
#
# If the transfer is successful, remove
# the log file and exit.
#
rm -f $LOG $LPLOG
exit 0
else
#
# Added the request ID to the stderr message
# and store it in the lp log file.
#
# Only record the first $LOGTRIES errors. If
# the spooler gets in a loop retrying a job, the
# disk won't fill up with spooler log error messages.
#
if test -s $LOG -a $ERRORLOGS -lt $LOGTRIES
then
echo "$1\t`cat $LOG`" >> $LPLOG
ERRORLOGS=`expr $ERRORLOGS + 1`
fi
if test $ERRORLOGS -eq $LOGTRIES
then
echo "$1\t$LOGTRIES errors logged for $1; errors no longer logged" >> $LPLOG
ERRORLOGS=`expr $ERRORLOGS + 1`
fi
fi
if [ ! -s $LPLOG ]
then
rm -f $LPLOG
fi
sleep 10
done

 
I checked the two files side by side and they are identical
are these the correct files? I see no reference to a specific device in either of these files. These two files
are /usr/spool/lp/admins/lp/interfaces/LP99
& /usr/spool/lp/admins/lp/interfaces/hp5l

 
Looking at the script it sets PERIPH to the name of the script itself (basename $0), LP99 for example, and then uses the hpnpf utility to send the output to that peripheral. Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top