When you set up a printer, you may find that nothing prints the first time you try to print a file. Or you may get a little farther: Something prints, but it is not what you expect—the output is incorrect or illegible. Then, when you get past these problems, you may encounter other problems, such as those listed below.
LP commands hang.
Printers become idle.
Users receive conflicting messages.
NOTE
Although many of the suggestions in this chapter are relevant to parallel printers, they are specific to the more common serial printers.
When nothing prints, check the following three basic areas.
The printer hardware.
The network.
The LP print service.
The hardware is the first thing to check. As obvious as it sounds, make sure that the printer is plugged in, turned on, and online. In addition, refer to the manufacturer's documentation for information about hardware settings. Some printers use hardware switches that change the characteristics of a printer port.
The printer hardware includes the printer, the cable that connects it to the computer, and the ports at each end of the cable. As a general approach, work your way from the printer to the system.
Use the following checklist to troubleshoot hardware problems.
Check that the printer is plugged in, turned on, and online.
Check that the cable is connected to the correct port on the printer and to the correct port on the workstation or server.
Check that the cable is the correct cable and that it is not defective.
Refer to the manufacturer's documentation.
Check that hardware switches for the ports are set properly.
Check that the printer is operational. Use the printer's self-test feature if the printer has one. (Check the printer documentation for information about printer self-testing.)
(Serial printers only) Check that the baud settings for the computer and the printer are correct. If the baud settings are not the same for both the computer and the printer, sometimes nothing prints, but more often you get incorrect output.
Problems with remote jobs—those going from a print client to a print server—are common. Make sure that network access between the print clients and the print server is enabled.
If the network is running NIS+, check the following items.
Check NIS+ configurations and credentials.
Check to make sure the printers.org_dir table exists by typing niscat -o printers.org_dir.domainname and pressing Return. If you get a Not found error message, use Solaris Print Manager to add a network printer to the print server. Solaris Print Manager creates and maintains data in the printers.org_dir table.
If the printers.org_dir table exists, check the output of the niscat -o printers.org_dir.domainname command to make sure the table is configured correctly.
Check the printers: entry in the /etc/nsswitch.conf file to make sure that the NIS+ nameservice is being queried for printer information.
If the network is not running DNS, NIS, or NIS+, check to make sure that names and IP addresses of each client are correctly entered in the /etc/inet/hosts (for the IPv4 protocol) and /etc/inet/ipnodes (for the IPv6 protocol) files on the print server. Also check to be sure that the name and IP address of the print server are correctly entered in the /etc/inet/hosts or /etc/inet/ipnodes file of each print client system. |
Use the following steps to check for problems with the network.
1. |
On a print client or server, type ping
system-name and press Return. This command helps you check that the network link between the print server and print clients is set up correctly. pserver% ping pclient pclient is alive pserver% pclient% ping pserver pserver not available pclient% If the system is alive (answers the ping), the network connection is probably all right. Either a nameservice or the local /etc/hosts file has successfully translated the host (system) name you entered into an IP address. If the system is not available (does not answer the ping), check the NIS or NIS+ setup at your site. You may need to take additional steps so that print servers and print clients can communicate with one another. For example, you may need to verify that a route exists between the server and client if they are on separate networks. If your site is not running NIS or NIS+, make sure that you have entered the IP address for the print server in the /etc/hosts file for each print client, and that you have entered all of the names and IP addresses of the client systems in the /etc/hosts file of the print server. |
2. |
For directly attached printers, check that the port monitor is configured correctly on the print server. |
3. |
For directly attached printers, check that the network listen services are registered with the port monitor on the print server. |
For printing to work, the LP scheduler must be running on both the print server and print clients. In addition to the scheduler running, a printer must be enabled and accepting requests before it can produce output. If the LP print service is not accepting requests for a printer, the submitted jobs (print requests) are rejected. Usually, in that instance, the user receives a warning message when a job is submitted. If the LP print service is not enabled for a printer, jobs remain queued on the system until the printer is enabled. In general, use the following steps to analyze a printing problem.
1. |
Follow the path of the print request step by step. |
2. |
Examine the status of the LP print service at each step. |
3. |
Is the configuration correct? |
4. |
Is the printer accepting requests? |
5. |
Is the printer enabled to process requests? |
6. |
If the request is hanging on transmission, examine the lpsched log (/var/lp/logs/lpsched). |
7. |
If the request is hanging locally, have notification of the printer device errors (faults) mailed to you, and reenable the printer. |
Ask the following additional questions.
Did the printer ever work?
Was something changed recently that might affect printing?
The print scheduler must be running both on the print server and on each print client system. On the print server and on each print client, type lpstat -r and press Return. Check the output of the command to make sure that the LP print service is running.
The following example shows that the LP print service is running on the print server.
pserver% lpstat -r
scheduler is running
pserver%
The following example shows that the LP print service is running on a print client
pclient% lpstat -r
scheduler is running
pclient%
If the scheduler is not running, become superuser, type /usr/lib/lp/lpsched, and press Return.
You must enable printers and tell them to accept print requests.
Use the following steps both on the print server and on each print client to make sure that the printer is enabled and is accepting print requests.
Make sure that the cable is connected to the port that the LP print service is using. To find out which port is configured for the LP print service, type lpstat -t on the print server and press Return. In the following example, the printer is connected to /dev/term/a.
pserver% lpstat -t
scheduler is running
system default destination: pinecone
device for pinecone: /dev/term/a
pserver%
If the cable is connected to the right port, type ls -l /devices and press Return to check whether the device is owned by lp and that the permissions are set to 600. In the following example, the port (fourth entry from the bottom) is configured correctly.
pserver% ls -l /devices total 12 crw-rw-rw- 1 root sys 28, 0 Mar 24 10:22 audio@1,f7201000:sound,audio crw-rw-rw- 1 root sys 28,128 Mar 24 10:22 audio@1,f7201000:sound, Âaudioctl crw------- 1 root sys 68, 11 Mar 24 09:39 eeprom@1,f2000000:eeprom brw-rw-rw- 1 root sys 36, 0 Mar 24 09:39 fd@1,f7200000:a crw-rw-rw- 1 root sys 36, 0 Mar 24 09:39 fd@1,f7200000:a,raw brw-rw-rw- 1 root sys 36, 1 Mar 24 09:39 fd@1,f7200000:b crw-rw-rw- 1 root sys 36, 1 Mar 24 09:39 fd@1,f7200000:b,raw brw-rw-rw- 1 root sys 36, 2 Mar 24 09:39 fd@1,f7200000:c crw-rw-rw- 1 root sys 36, 2 Mar 24 09:39 fd@1,f7200000:c,raw drwxr-xr-x 2 root sys 4608 Mar 24 10:22 pseudo drwxr-xr-x 3 root sys 512 Mar 24 11:41 sbus@1,f8000000 crw------- 1 lp sys 29, 0 Mar 24 09:39 zs@1,f1000000:a crw-rw-rw- 1 root sys 29,131072 Mar 24 09:39 zs@1,f1000000:a,cu crw-rw-rw- 1 root sys 29, 1 Mar 24 09:39 zs@1,f1000000:b crw-rw-rw- 1 root sys 29,131073 Mar 24 09:39 zs@1,f1000000:b,cu pserver%
If you are not certain which device is the serial port, you can type ls -l /dev/term and press Return to display the link to the /devices file.
pserver% ls -l /dev/term
total 4
lrwxrwxrwx 1 root root 38 Oct 23 17:52 a ->
../../devices/sbus@1f,0/zs@f,1100000:a
lrwxrwxrwx 1 root root 38 Oct 23 17:52 b ->
../../devices/sbus@1f,0/zs@f,1100000:b
pserver%
Use the following steps on the print server if you need to change the ownership or permissions for the device.
1. |
Become superuser. |
2. |
Type chown lp
device-name and press Return. The lp process now owns the port device file. |
3. |
Type chmod 600
device-name and press Return. Only lp or root can access the printer port device file. |
Check to make sure the printer type and file content type are configured properly on the print server and on each print client. Type lpstat -p device-name -l and press Return. In the following example, a remote printer is configured properly and is available to process print requests.
pserver% lpstat -p seachild -l
printer seachild unknown state. enabled since Oct 31 16:52 2000. available.
Remote Name: seachild
Remote Server: seachild
pserver%
If the printer type or file content type is incorrect, use lpadmin -p device-name -T printer-type -I file-content-type and press Return to change it. On the print client, try setting the print type to unknown and the content type to any.
Print jobs may be waiting in the queue because of a printer fault on the print server. Use the following steps to make sure that the printer is not waiting because of a printer fault.
1. |
On the print server, become superuser. |
2. |
Type lpadmin -p
printer-name
-F continue and press Return. You have instructed the LP print service to continue if it is waiting because of a fault. |
3. |
Type enable
printer-name and press Return. This command forces an immediate retry. |
4. |
(Optional) Type lpadmin -p i
printer-name
-A 'write root' and press Return. You have instructed the LP print service to set a default policy of sending the printer fault message to the terminal on which root is logged in if the printer fails. This policy may help you to get quick notification of faults as you try to fix the problem. |
It is easy to set up a printer port as a login terminal by mistake. To check that the printer port is not incorrectly set up as a login terminal, type ps -ef and press Return. Look for the printer port entry. In the example, port /dev/term/a is incorrectly set as a login terminal. You can tell by the "passwd ## information at the end of the line.
pserver% ps -ef
root 169 167 0 Apr 04 ? 0:08 /usr/lib/saf/listen tcp
root 939 1 0 19:30:47 ? 0:02 /usr/lib/lpsched
root 859 858 0 19:18:54 term/a 0:01 /bin/sh -c /etc/lp/interfaces/
pinecone pinecone-294 pine!winsor "passwd
##
pserver%
If the port is set up as a login port, use the following steps to disable the login.
1. |
Become superuser. |
2. |
Type cancel
request-id and press Return. The request ID is shown in the output of the ps -ef command. In the following example, request-id pinecone-294 is canceled. pserver% su # cancel pinecone-294 request "pinecone-294" canceled # |
3. |
Type lpadmin -p
printer-name
-h and press Return. The printer port is set to be a non-login device. |
4. |
Type ps -ef and press Return. Verify that the printer port is no longer a login device. |
If you do not find the source of the printing problem in the basic LP print service functions, use one of the following procedures for the specific client or server case that applies.
Before you follow the steps in this section, you should already have checked the basic functions of the LP print service on both the print server and the print client. Make sure that the printer works locally before trying to diagnose problems with a print client.
On the print client, type ping print-server-name and press Return. This command checks to make sure that the systems are connected and available on the network.
pclient% ping pserver-1 pserver-1 is alive pclient% ping pserver-2 pserver-2 not available pclient%
If you receive the message system not available, you have a network connection problem.
Use the following steps to check the print server type for a print client.
1. |
On the print client, become superuser. |
2. |
Type lpsystem -l and press Return. Check the output to make sure that the print server is identified as type bsd (for Solaris). In the following example, the print server is properly identified as type bsd. pclient% su Password # lpsystem -l System: + Type: bsd Connection timeout: never Retry failed connections: after 10 minutes Comment: Allow all connections # |
If the print server is not identified correctly, type lpsystem -t bsd print-server-name and press Return, as shown in the following example.
pserver% lpsystem -t bsd pserver
pserver%
Use the following steps to check the print queue on the print client.
1. | |
2. |
Type ls -l and press Return. A list of the print jobs is displayed. |
3. |
For the print job you want to check, type lpstat -o
request-id and press Return. In the following example, the job is queued successfully. pclient% lpstat -o seachild-10
seachild-10 paperbark!winsor 137359 Oct 31 17:03
pclient%
|
If the job is not queued successfully, the client-server connection may be faulty. Use the following steps to make sure that the client-server connection is not faulty:
If the service and port monitors are not configured correctly, use Solaris Print Manager to reconfigure the printer port.
If the printer and the print service software are not configured correctly, the printer may print but it may provide output that is not what you expect.
If you used the wrong printer type when you set up the printer with the LP print service, inappropriate printer control characters may be sent to the printer. The results are unpredictable: Nothing may print, output may be illegible, or output may be printed in the wrong character set or font.
To check the printer type, type lpstat -p printer-name -l and press Return.
A list of the printer characteristics is displayed.
pserver% lpstat -p pinecone -l
printer pinecone is idle. enabled since Wed Jan 2 18:20:22 PST 1991. available.
Content types: PS
Printer types: PS
Description:
Users allowed:
(all)
Forms allowed:
(none)
Banner not required
Character sets:
(none)
Default pitch:
Default page size:
pserver%
If the printer type is not correct, become superuser and type lpadmin -p printer-name -T printer-type and press Return.
Many formatting problems can result when the default STTY (standard terminal) settings do not match the settings required by the printer. The following sections describe what happens when some of the settings are incorrect. Read the printer documentation to determine the correct STTY settings for the printer port.
To display the current STTY settings for the printer port, as superuser, type stty -a < device-name and press Return. The current STTY settings for the printer port are displayed.
pserver# stty -a < /dev/term/a speed 9600 baud; rows = 0; columns = 0; ypixels = 0; xpixels = 0; eucw 1:0:0:0, scrw 1:0:0:0 intr = ^c; quit = ^ | ; erase = ^?; kill = ^u; eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^q; stop = ^s; susp = ^z; dsusp = ^y; rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v; parenb -parodd cs7 -cstopb -hupcl cread -clocal -loblk -parext -ignbrk brkint -ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc ixon -ixany -ixoff imaxbel isig icanon -xcase echo echoe echok -echonl -noflsh -tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3 pserver#
To change the STTY settings, type lpadmin -p printer-name -o "stty=options" and press Return.
You can change more than one option setting by including the options in single quotation marks and separating them by spaces. For example, suppose the printer requires you to enable odd parity and set a 7-bit character size. You would type a command such as the following.
# lpadmin -p clobber -o "stty='parenb parodd cs7'"
The STTY option parenb enables parity checking/generation, parodd sets odd parity generation, and cs7 sets the character size to 7 bits.
To send a document to the printer, type lp -d printer-name filename and press Return. Look at the document to verify that it is printing correctly.
Table 64 shows the default STTY options used by the LP print service's standard printer interface program.
Option | Meaning |
---|---|
9600 | Set baud rate to 9600. |
cs8 | Set 8-bit bytes. |
-cstopb | Send 1 stop bit per byte. |
-parity | Do not generate parity. |
ixon | Enable XON/XOFF (also known as START/STOP or DC1/DC3). |
opost | Do “output post-processing.” |
-olcuc | Do not map lower case to upper case. |
onlcr | Change line feed to carriage return/line feed. |
-ocrnl | Do not change carriage returns into line feeds. |
-onocr | Output carriage returns even at column 0. |
nl0 | No delay after line feeds. |
cr0 | No delay after carriage returns. |
tab0 | No delay after Tabs. |
bs0 | No delay after backspaces. |
vt0 | No delay after vertical Tabs. |
ff0 | No delay after form feeds. |
Use Table 65 to choose STTY options to correct various problems affecting print output.
STTY Values | Result | Possible Problem from Incorrect Setting |
---|---|---|
300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400 | Set baud rate to the specified value (enter only one baud rate). | Random characters and special characters may be printed and spacing may be inconsistent. |
oddp
evenp -parity | Set odd parity.
Set even parity. Set no parity. | Characters are randomly missing or appear incorrectly. |
-tabs | Set no Tabs. | Text is jammed against right margin. |
tabs | Set Tabs every eight spaces. | Text has no left margin, is run together, or is jammed together. |
-onlcr | Set no Return at the beginning of lines. | Text has incorrect double spacing. |
onlcr | Set Return at beginning of lines. | Zigzags print down the page. |
When the baud setting of the computer does not match the baud setting of the printer, you usually get some output, but it does not look like what you submitted for printing. Random characters show up, with an unusual mixture of special characters and undesirable spacing. The default for the LP print service is 9600 baud.
NOTE
If a printer is connected to a parallel port, the baud setting is irrelevant.
Some printers use a parity bit to ensure that data received for printing has not been garbled during transmission. The parity bit settings for the computer and for the printer must match. If they do not match, some characters do not print at all or are replaced by other characters. The output will look only approximately correct, with the word spacing all right and many letters in their correct place. The LP print service does not set the parity bit by default.
If Tabs are set but the printer expects no Tabs, the printed output may contain the complete contents of the file, but the text may be jammed against the right margin. Also, if the Tab settings for the printer are incorrect, the text may not have a left margin, may run together, may be concentrated in a portion of the page, or may be incorrectly double-spaced. The default is for Tab settings every eight spaces.
If the output is double-spaced but should be single-spaced, either the Tab settings for the printer are incorrect or the printer is adding a line feed after each Return. The LP print service adds a Return before each line feed, so the combination causes two line feeds.
If the print zigzags down the page, the STTY option onlcr, which sends a Return before every line feed, is not set. The stty=onlcr option is set by default, but you may have cleared it while trying to solve other printing problems.
If you type any of the lp commands (lpsystem, lpadmin, lpstat, lpshut) and nothing happens (you get no error message, status information, or prompt), chances are that something is wrong with the LP scheduler. You usually can resolve such a problem by stopping and restarting the LP scheduler.
Use the following steps to free hung lp commands.
1. |
Become superuser. |
2. |
Type lpshut and press Return. If this command hangs, press Control-C and proceed to the next step. If this command succeeds, skip to step 5. |
3. |
Type ps -e | grep lpsched and press Return. Note the process ID numbers (PID) from the first column. You use the PID number in the next step. # ps -e | grep lpsched
134 term/a 0:01 lpsched
#
|
4. |
Type kill -9
pid and press Return. All the lp processes are terminated. # kill -9 134
#
|
5. | |
6. |
You may find a printer that is idle even though print requests have been queued to it. A printer may seem idle when it shouldn't be for one of the following reasons.
The current print request is being filtered.
The printer has a fault.
Networking problems may be interrupting the printing process.
Slow print filters run in the background to avoid tying up the printer. A print request that requires filtering does not print until it has been filtered. To check the print filters, type lpstat -o printer-name and press Return. See if the first waiting request is being filtered. If the output looks like the following example, the file is being filtered. The printer is not hung; it just is taking a while to process the request.
pserver% lpstat -o pinecone
pinecone-10 fred 1261 Mar 12 17:34 being filtered
pinecone-11 iggy 1261 Mar 12 17:36 on pine
pinecone-12 jack 1261 Mar 12 17:39 on pine
pserver%
When the LP print service detects a fault, printing resumes automatically, but not immediately. The LP print service waits about five minutes before trying again and continues trying until a request is printed successfully. You can force a retry immediately by enabling the printer.
Use the following steps to resume printing after a printer fault.
1. |
Look for a message about a printer fault and try to correct the fault if you find one. Depending on how printer fault alerts have been specified, messages may be sent to root by e-mail or may be written to a terminal on which you (root) are logged in. |
2. |
Type enable
printer-name and press Return. If a request was blocked by a printer fault, this command forces a retry. If this command doesn't work, continue with other procedures in this section. |
When printing files over a network, you may encounter the following types of problems.
Requests sent to print servers may back up in the client system (local) queue.
Requests sent to print servers may back up in the print server (remote) queue.
Use the following steps to check that the printer is ready to print.
1. |
Type lpstat -p
printer-name and press Return. The information that is displayed tells you whether the printer is idle or active, enabled or disabled, or available or not accepting print requests. If everything looks all right, continue with other procedures in this section. |
2. |
If the printer is not available (is not accepting requests), become superuser on the print server and type accept
printer-name and press Return. The printer begins to accept requests to its print queue. |
3. |
If the printer is disabled, as superuser on the print server, type enable
printer-name and press Return. This command reenables the printer so that it can act on the requests in its queue. |
Jobs earmarked for a print server may back up in the client system queue for the following reasons.
The print server is down.
The printer is disabled on the print server.
The network between the print client and print server is down.
Underlying Solaris network software was not set up properly.
While you are tracking down the source of the problem, use the disable command on the print server to stop new requests from being added to the queue.
If jobs back up in the print server queue, the printer probably has been disabled. When a printer is accepting requests but not processing them, the requests are queued to print. After you enable the printer, the print requests in the queue should print—unless there is an additional problem.
Use the following steps to send jobs to a remote printer when they back up in the local queue.
1. |
On the print client, type reject
printer-name and press Return. Additional queuing of print requests from the print client to the print server ceases. |
2. |
Type ping
print-server-name and press Return to check that the print server and the network between the print client and the print server is up. |
3. |
Type tail /var/lp/logs/lpsched and press Return. The resulting information may help you pinpoint what is preventing the transmission of print requests from the print client to the print server. |
4. | |
5. |
(If necessary) On the print client type enable
printer-name and press Return. The printer is enabled. |
Use the following steps to free from a print client the jobs that back up in the print server queue.
1. |
On the print server, type reject
printer-name and press Return. Additional print requests are not queued. |
2. |
Type tail /var/lp/logs/lpsched and press Return. The information that is displayed may help you pinpoint what is preventing the print requests that have been transmitted from the print client to the print server from being printed. |
3. |
After you fix the problem, on the print server type accept
printer-name and press Return. The printer accepts new jobs in the print queue. |
4. |
(If necessary) On the print server, type enable
printer-name and press Return. The printer is enabled. |
A user may enter a print request and be notified that the client system has accepted it, then receive mail from the print server that the job has been rejected. These conflicting messages may occur for the following reasons.
The print client may be accepting requests, but the print server is rejecting requests.
The definition of the printer on the print client might not match the definition of that printer on the print server. More specifically, the definitions of the print job components, such as filters, character sets, print wheels, and forms, are not the same on the client and server systems.
Make sure that identical definitions of these job components are registered on both the print clients and print servers so that local users can access printers on the print servers.
Use the following steps to resolve conflicting status messages.
18.219.228.88