Since I received some replies to my previous summary,
I include a second summary including them, since they may
be of interest to some of you.
Basically:
Tim Henrion said:
I missed your original question when it was sent to the list. We had
this same problem and fixed it the same way as you did. The problem
was caused by the listener not running. Check out the man pages for
listen and nlsadmin to learn more.
And Mathew Stier was kind enough to include the setup procedure
to manually define a printer on Solaris 2.5 (which I include at the end
of this mail).
Definitely, it seems that some of these steps is performed by admintool
but not by jetadmin install printer.
Hope this summary is usefull for someone else there.
Mariel
ORIGINAL POST
I hope this is an easy and stupid thing that I am doing.
I am trying to install an HP 4V network printer.
I installed jetadmin.
I defined the printer using jetadmin (all the files under /etc/printers
are created ok).
When I type: lpq, after waiting for a long time, I get the following
message:
could not talk to print service at 'machine_name'
When I try to print something using lpr -P printer filename, I get on
the console the follwoing message:
Error transfering print job 1
check queue for (printer_name@machine_name)
I shut down and restared the lpsched hundred of times already, and even
rebooted the machine (just in case) to no avail.
Any ideas?
FIRST SUMMARY
I am still puzzled about this problem. I don't think I found a solution
but just a workaround.
If you have a machine, that was never defined as printer server before,
you install jetadmin, and then define a printer via jetadmin, you get
this error.
This happens no matter which version of jetadmin you use (I tried with 3
of them including the last one 3.15).
The workaround is to define another printer (even a non existing one)
using admintool.
This makes the lpq and the rest of the commands start working, and you
are able to use the network printer without any problems, even if
afterwards you
delete that extra printer.
I think that the problem might be something that is done when admintool
defines a printer that the "add printer" of jetadmin doesn't do, but I
do not know what it
is.
PRINTER SETUP PROCEDURE
INFODOC ID: 2097
SYNOPSIS: Solaris 2 printer configuration commands - quick reference
DETAIL DESCRIPTION:
Setting up local printers under Solaris 2.x.
Some of these steps are only for information: they're commented out.
Most of this has to be done as root.
Format is English description, then 2.x command on the right.
Check general printer status lpstat -s
If not running, start /etc/init.d/lp start
# To stop all print services /etc/init.d/lp stop
Show all printers configured lpstat -p all
Show a particular printer lpstat -p myprinter
Show a particular printer in detail lpstat -p myprinter -l
Check port monitor services pmadm -l
Turn off the portmonitor on ttyb pmadm -d -p zsmon -s ttyb
pmadm FLGS changes to 'ux'
# To turn ON the portmonitor on ttyb pmadm -e -p zsmon -s ttyb
# pmadm FLGS changes to 'u'
Add a new printer on ttyb cd /dev/term
chgrp lp b; chown lp b; chmod
660 b
lpadmin -p myprinter -v
/dev/term/b
Send the output to a file touch /tmp/printout
instead chmod 666 /tmp/printout #
temporary
lpadmin -p myprinter -v
/tmp/printout
# Remove a printer lpadmin -x myprinter
To enable enable myprinter
To accept jobs accept myprinter
To check status (again !) lpstat -p myprinter
To print something lp -d myprinter /etc/passwd
Allow normal users to print without lpadmin -p myprinter -o nobanner
banners (otherwise, only root can
print without banners)
Fix up the serial line settings lpadmin -p myprinter (still no
banner) -o
"nobanner stty='cs8 19200'"
Add a description lpadmin -p myprinter -D 'My new
printer'
Make it the system default destination lpadmin -d myprinter
At this point it should be possible to print a job and have it
appear either in /tmp/printout (if that's the output device) or
on the printer.
Adding filters
The scheduler attempts to match the type of job beingprinted to
the type of the printer. If it does not find one, it prints an
error message:
# lp -d myprinter -T ps /etc/passwd
UX:lp: ERROR: There is no filter to convert the file content.
TO FIX: Use the lpstat -p -l command to find a
printer that can handle the file type
directly, or consult with your system administrator.
# To force a filter to be applied to a job, define: The type of
the
input job The type of data which the printer can accept To
print
HPGL toan OSE6450 printer, the HPGL must be followed by the
string
'\033%-12345x' (The first character is ESCAPE.) This can be
accomplished as follows:
Define the printer as taking ose lpadmin -p myprinter -I ose
data. The printer will only
print data type ose: the scheduler
must find a filter to print other
types of data to this printer.
Make a directory for local filters mkdir /usr/lib/lp/local
Add a suitable filter cd /usr/lib/lp/local
cat >hpgl2ose
#!/bin/sh
#echo anything to send before
the job
cat -
echo '\033%-12345'
exit 0
^D
Make it executable, etc. cd /usr/lib/lp/local
Make it executable, etc. chmod 755 hpgl2ose
chown lp hpgl2ose; chgrp lp
hpgl2ose
Add a suitable filter definition cd /etc/lp/fd
cat >hpgl2ose.fd
# comments here
Input types: hpgl
Output types: ose
Printer types: any
Printers: any
Filter type: fast
Command:
/usr/lib/lp/local/hpgl2ose
Options: PRINTER * = -p*
^D
chown lp hpgl2ose.fd
chgrp lp hpgl2ose.fd
chmod 664 hpgl2ose.fd
Add it to the list of filters the lpfilter -f hpgl2ose system
knows
about
-F /etc/lp/fd/hpgl2ose.fd
Check the filters that the system lpfilter -f all -l
recognizes
Check just one filter lpfilter -f hpgl2ose -l
# Remove a filter lpfilter -f hpgl2ose -x
Check the output from the spooler lpadmin -p myprinter -v
/tmp/printout
(printer is default dest)
cp /dev/null /tmp/printout lp -T hpgl
-o nobanner /etc/passwd
cat -v /tmp/printout
Check that this file will print sleep 30000 </dev/term/b &
ok if required (stty settings will stty cs8 19200 </dev/term/b
vary) cp /tmp/printout /dev/term/b
check the output tray
ps -efl | grep 30000
kill sleep-pid
Point the printer back at the lpadmin -p myprinter -v
/dev/term/b
serial line
Configuring a print server
Format is English description, then 2.x command below (since the
commands
are too long to go on the same line).
Install patch 100863 and append this line to /etc/lp/Systems:
+:x:-:s5:-:n:10:-:-:Allow all connections
Check it works :
# lpsystem -l
System: +
Type: s5
Connection timeout: never
Retry failed connections: after 10 minutes
Comment: Allow all connections
#
Identify the "listen" port monitor version number (typ. 4)
# nlsadmin -V
4
#
Show all port monitors: this shows typical output:
# sacadm -l
PMTAG PMTYPE FLGS RCNT STATUS COMMAND
zsmon ttymon - 0 ENABLED
/usr/lib/saf/ttymon #
#
Show tcp "listen" port monitors
# sacadm -l -p tcp
Invalid request, tcp does not exist
#
Add a listen port monitor if not present
# sacadm -a -p tcp -t listen -c "/usr/lib/saf/listen tcp" -v 4
Show tcp "listen" port monitors
# sacadm -l -p tcp
PMTAG PMTYPE FLGS RCNT STATUS COMMAND
tcp listen - 0 STARTING
/usr/lib/saf/listen tcp
#
#
Get the print server's universal address (in hex)
# lpsystem -A
00020203819c88fb0000000000000000
#
Add aBSD listener, if required. The '4' is from 'nlsadmin -V' above.
# pmadm -a -p tcp -s lpd -i root -v 4 -m `nlsadmin -o
/var/spool/lp/fifos/listenBSD -A
"\x00020203819c88fb0000000000000000"`
#
or (in sh, if you cannot cut and paste)
# ad=`lpsystem -A`
# pmadm -a -p tcp -s lpd -i root -v 4 -m `nlsadmin -o
/var/spool/lp/fifos/listenBSD -A "\x$ad"`
#
Check that this has taken effect
# pmadm -l -p tcp -s lpd
PMTAG PMTYPE SVCTAG FLGS ID <PMSPECIFIC>
tcp listen lpd - root
\x00020203819c
88fb0000000000000000 - p - /var/spool/lp/fifos/listenBSD #
#
To remove the listener at any time, use
# pmadm -r -p tcp -s lpd
To add System V clients, add the STREAM service used for print requests.
The '4' is from 'nlsadmin -V' above.
# pmadm -a -p tcp -s lp -i root -v 4 -m `nlsadmin -o
/var/spool/lp/fifos/listenS5`
#
Check that this has taken effect
# pmadm -l -p tcp -s lp
PMTAG PMTYPE SVCTAG FLGS ID
<PMSPECIFIC>
tcp listen lp - root - - p -
/var/sp
ool/lp/fifos/listenS5 #
#
Figure out the address to use for service 0, the nlps server.
# lpsystem -A
00020203819c88fb0000000000000000
#
which divides into:
0000000000000000 16 zeros for padding
819c88fb Server's IP address in hex
0203 BSD printer port == 515
0ACE SysV printer port == 2766
0002 INET protocol family
The BSD listener uses the 515 port as reported by 'lpsystem -A' - the
System V spooler uses 2766, so theaddress must be changed to
00020ACE819c88fb0000000000000000
The "\x" is added to force it to be interpreted in hex.
Add service 0, the nlps server
# pmadm -a -p tcp -s 0 -i root -v 4 -m "`nlsadmin -c
/usr/lib/saf/nlps_server -A '\x00020ACE819c88fb0000000000000000'`"
#
Check that this has taken effect
# pmadm -l -p tcp -s 0
PMTAG PMTYPE SVCTAG FLGS ID
<PMSPECIFIC>
tcp listen 0 - root
\x00020ACE819c
88fb0000000000000000 - c - /usr/lib/saf/nlps_server #
#
To remove the System V listener at any time, use
# pmadm -r -p tcp -s lp
# pmadm -r -p tcp -s 0
Configuring a print client of a BSD print server
Register the print server name with the print service
# lpsystem -t bsd bsdserver
"bsdserver" has been added
#
To remove the print server, use
# lpsystem -r bsdserver
Removed "bsdserver".
#
To check what's been added
# grep bsdserver /etc/lp/Systems
bsdserver:x:-:bsd:-:n:10:-:-:
#
Add the printer to the client system. This information is entered into
the directory /etc/lp/printers by the lpadmin command.
# lpadmin -p local_prt_name -s bsdserver!rmt_prt_name
To remove the printer, use
# lpadmin -x local_prt_name
Set the printer's content and type
# lpadmin -p local_prt_name -T unknown -I any
Allow queuing
# accept local_prt_name
Enable the printer
# enable local_prt_name
Check the configuration
# lpstat -p local_prt_name -l
printer local_prt_name is idle. enabled since Sun May 9 17:50:15 BST
1993. available.
Content types: any
Printer types: unknown
Description:
Users allowed:
(all)
Forms allowed:
(none)
Banner not required
Character sets:
(none)
Default pitch:
Default page size:
Configuring a print client of a System V print server
Register the print server name with the print service
# lpsystem -t s5 sys5server
"sys5server" has been added
#
To remove the print server, use
# lpsystem -r sys5server
Removed "sys5server".
#
To check what's been added
# grep sys5server /etc/lp/Systems
sys5server:x:-:s5:-:n:10:-:-:
#
Add the printer to the client system. This information is entered into
the directory /etc/lp/printers by the lpadmin command.
# lpadmin -p local_prt_name -s sys5server!rmt_prt_name
To remove the printer, use
# lpadmin -x local_prt_name
Set the printer's content and type
# lpadmin -p local_prt_name -T PS -I PS
Register bundled PostScript filters using the lpfilter command. From
sh:
# cd /etc/lp/fd
# for filt in `ls | sed 's/\.fd//'`
> do
> lpfilter -f $filt -F $filt.fd
> done
#
Check the filters have been added
# lpfilter -f all -l
Allow queuing
# accept local_prt_name
Enable the printer
# enable local_prt_name
Check the configuration
# lpstat -p local_prt_name -l
printer local_prt_name is idle. enabled since Sun May 9 17:50:15 BST
1993. available.
Content types: any
Printer types: unknown
Description:
Users allowed:
(all)
Forms allowed:
(none)
Bannernot required
Character sets:
(none)
Default pitch:
Default page size:
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:30 CDT