System Administration Guide

How to Troubleshoot No Printer Output

This task includes the following troubleshooting procedures to try when you submit a print request to a printer and nothing prints:

Try the first three procedures in the order in which they are listed, before going to the specific print client/server case that applies. However, if the banner page prints, but nothing else does, turn to the instructions under "How to Troubleshoot Incorrect Output".

To check the hardware:

  1. Check that the printer is plugged in and turned on.

  2. Check that the cable is connected to the port on the printer and to the port on the system or server.

  3. Make sure that the cable is the correct cable and that it is not defective.

    Refer to the manufacturer`s documentation. If the printer is connected to a serial port, verify that the cable supports hardware flow control; a NULL modem adapter supports this. Table 72-1 shows the pin configuration for NULL modem cables.

    Table 72-1 Pin Configuration for NULL Modem Cables
     

    Host 

    Printer 

    Mini-Din-8 

    25-Pin D-sub 

    25-Pin D-sub 

    -  

    1 (FG) 

    1(FG) 

    3(TD) 

    2(TD) 

    3(RD) 

    5(RD) 

    3(RD) 

    2(TD) 

    6(RTS) 

    4(RTS) 

    5(CTS) 

    2(CTS) 

    5(CTS) 

    4(RTS) 

    4(SG) 

    7(SG) 

    7(SG) 

    7(DCD) 

    6(DSR), 8(DCD) 

    20(DTR) 

    1(DTR) 

    20(DTR) 

    6(DSR), 8(DCD) 

  4. Check that any hardware switches for the ports are set properly.

    See the printer documentation for the correct settings.

  5. 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.

  6. 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 will print, but more often you get incorrect output. For instructions, see "How to Troubleshoot Incorrect Output".

To check the network:

  1. Check that the network link between the print server and the print client is setup correctly.


    print_client# ping print_server 
    print_server is alive
    print_server# ping  print_client 
    print_client not available

    If the message says the system is alive, you know you can reach the system, so the network is all right. The message also tells you that either a name service or the local /etc/hosts file has translated the host (system) name you entered into an IP address; otherwise, you would need to enter the IP address.

    If you get a not available message, try to answer the following questions: How is NIS or NIS+ set up at your site? Do you need to take additional steps so that print servers and print clients can communicate with one another? If your site is not running NIS or NIS+, have you entered the IP address for the print server in each print client's /etc/hosts file, and entered all print client IP addresses in the /etc/hosts file of the print server?

  2. (On a SunOS 5.0-5.1 print server only) Check that the listen port monitor is configured correctly.

  3. (On a SunOS 5.0-5.1 print server only) Check that the network listen services are registered with the port monitor on the print server.

To check the basic functions of the LP print service:

This procedure uses the printer luna as an example of checking basic LP print service functions.

  1. On both the print server and print client, make sure that the LP print service is running.

    1. Check whether the LP scheduler is running.


      # lpstat -r
      scheduler is running
    2. If the scheduler is not running, become superuser or lp, and start the scheduler.


      # /usr/lib/lp/lpsched
      

      If you have trouble starting the scheduler, see "How to Unhang the LP Print Service".

  2. On both the print server and print client, make sure that the printer is accepting requests.

    1. Check that the printer is accepting requests.


      # lpstat -a
      mars accepting requests since Jun 04 16:13 1997
      luna not accepting requests since Jun 04 08:10 1997
      unknown reason

      This command verifies that the LP system is accepting requests for each printer configured for the system.

    2. If the printer is not accepting requests, become superuser or lp, and allow the printer to accept print requests.


      # accept luna
      

      The specified printer now accepts requests.

  3. On both the print server and print client, make sure that the printer is enabled to print submitted print requests.

    1. Check that the printer is enabled.


      # lpstat -p luna
      printer luna disabled since Jun 04 09:40 1997.
      available.
      unknown reason

      This command displays information about printer status. You can omit the printer name to obtain information about all printers set up for the system. The following example shows a printer that is disabled.

    2. If the printer is disabled, become superuser or lp, and enable the printer.


      # enable luna
      printer "luna" now enabled.

      The specified printer is enabled to process print requests.

  4. On the print server, make sure that the printer is connected to the correct serial port.

    1. Check that the printer is connected to the correct serial port.


      # lpstat -t
      scheduler is running
      system default destination: luna
      device for luna: /dev/term/a

      The message device for printer-name shows the port address. Is the cable connected to the port to which the LP print service says is connected? If the port is correct, skip to Step 5.

    2. Become superuser or lp.

    3. Change the file ownership of the device file that represents the port.


      # chown lp device-filename
      

      This command assigns the special user lp as the owner of the device file. In this command, device-filename is the name of the device file.

    4. Change the permissions on the printer port device file.


      # chmod 600 device-filename
      

      This command allows only superuser or lp to access the printer port device file.

  5. On both the print server and print client, make sure that the printer is configured properly.

    1. Check that the printer is configured properly.


      # lpstat -p luna -l
      printer luna is idle. enabled since May 20 17:39 1997. available.
              Content types: postscript
              Printer types: PS

      The above example shows a PostScript printer that is configured properly, and that is available to process print requests. If the printer type and file content type are correct, skip to Step 6.

    2. If the printer type or file content type is incorrect, try setting the print type to unknown and the content type to any on the print client.


      # lpadmin -p printer-name -T printer-type -I file-content-type
      
  6. On the print server, make sure that the printer is not faulted.

    1. Check that the printer is not waiting because of a printer fault.


      # lpadmin -p printer-name -F continue 
      

      This command instructs the LP print service to continue if it is waiting because of a fault.

    2. Force an immediate retry by re-enabling the printer.


      # enable printer-name 
      
    3. (Optional) Instruct the LP print service to enable quick notification of printer faults.


      # lpadmin -p printer-name -A 'write root'
      

      This command instructs the LP print service to set a default policy of writing root--sending the printer fault message to the terminal on which root is logged in--if the printer fails. This may help you get quick notification of faults as you try to fix the problem.

  7. Make sure that the printer is not set up incorrectly as a login terminal.


    Note -

    It is easy to mistakenly set up a printer as a login terminal, so be sure to check this possibility even if you think it does not apply.


    1. Look for the printer port entry in the ps -ef command output.


      # 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/luna
      luna-294 rocket!smith "passwd\n##
      #

      In the output from this command, look for the printer port entry. In the above example, port /dev/term/a is set up incorrectly as a login terminal. You can tell by the "passwd\n## information at the end of the line. If the port is set correctly, skip the last steps in this procedure.

    2. Cancel the print request(s).


      # cancel request-id
      

      In this command, request-id is the request ID number for a print request to be canceled.

    3. Set the printer port to be a nonlogin device.


      # lpadmin -p printer-name -h
      
    4. Check the ps -ef command output to 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, continue to one of the following procedures for the specific client/server case that applies.

To check printing from a SunOS 5.x client to a SunOS 5.x print server:

  1. Check the basic functions of the LP print service on the print server, if you have not done so already.

    For instructions on checking basic functions, see "To check the basic functions of the LP print service: ". Make sure that the printer works locally before trying to figure out why nothing prints when a request is made from a print client.

  2. Check the basic functions of the LP print service on the print client, if you have not done so already.

    For instructions on checking basic functions, see "To check the basic functions of the LP print service: ". On the print client, the LP scheduler has to be running, and the printer has to be enabled and accepting requests before any request from the client will print.


    Note -

    For most of the following steps, you must be logged in as root or lp.


  3. Make sure that the print server is accessible.

    1. On the print client, send an "are you there?" request to the print server.


      print_client# ping print_server
      

      If you receive the message print_server not available, you may have a network problem.

  4. On SunOS 5.1 print client only, make sure that the print server is identified as type s5 by viewing the Modify Printer window in Admintool.

  5. Verify that the print server is operating properly.


    # lpstat -t luna
    scheduler is running
    system default destination: luna
    device for luna: /dev/term/a
    luna accepting requests since May 20 17:41 1997. available.
    printer luna now printing luna-314. enabled since May 20 17:41 1997. 
    available.
    luna-129            root               488   May 20 17:45
    #

    The above example shows a print server up and running.

  6. If the print server is not operating properly, go back to "".

To check printing from a SunOS 5.x client to a SunOS 4.1 print server:

  1. Check the basic functions of the LP print service on the print client, if you have not done so already.

    For instructions, see "To check the basic functions of the LP print service: ".

  2. Make sure that the print server is accessible.

    1. On the print client, send an "are you there?" request to the print server.


      print_client# ping print_server
      

      If you receive the message print_server not available, you may have a network problem.

  3. Make sure that the lpd daemon on the print server is running.

    1. On the print server, verify the lpd daemon is running.


      $ ps -ax | grep lpd
        126 ?  IW    0:00 /usr/lib/lpd
        200 p1 S     0:00 grep lpd
      $

      If the lpd daemon is running, a line is displayed, as shown in the above example. If it is not running, no process information is shown.

    2. If lpd is not running on the print server, become superuser on the print server, and restart it.


      # /usr/lib/lpd &
       
      
  4. Make sure that the remote lpd daemon is configured properly.

    1. On the print server, become superuser, and invoke the lpc command.


      # /usr/etc/lpc
      lpc>
    2. Get LP status information.


      lpc> status
      luna:
      queuing is enabled
      printing is enabled
      no entries
      no daemon present
      lpc>

      Status information is displayed. In the above example, the daemon is not running and needs to be restarted.

    3. If no daemon is present, restart the daemon.


      lpc> restart luna
      

      The daemon is restarted.

    4. Verify that the lpd daemon has started.


      lpc> status
      
    5. Quit the lpc command.


      lpc> quit
      

      The shell prompt is redisplayed.

  5. Make sure that the print client has access to the print server.

    1. Check if there is an /etc/hosts.lpd file on the 4.1 print server.

      On a 4.1 print server, if this file exists, it is used to determine whether an incoming print request can be accepted. If the file does not exist, all print client systems have access, so skip steps b and c.

    2. If the file exists, see if the print client is listed in the file.

      Requests from client systems not listed in the file are not transferred to the print server.

    3. If the client is not listed, add the print client to the file.


      Note -

      If you get this far without pinpointing the problem, the SunOS 4.1 system is probably set up and working properly.


  6. Make sure that the connection to the remote lpd print daemon from the print client is made correctly.

    1. On the print client, become superuser, and verify the lpsched daemon is running.


      # ps -ef | grep lp
         root   154     1 80   Jan 07 ?        0:02 /usr/lib/lpsched

      The lpsched daemon should be running, as shown in the above example.

    2. Stop the LP print service.


      # lpshut
      

      The LP print service is stopped.

    3. Restart the LP print service.


      # /usr/lib/lp/lpsched
      

      The LP print service is restarted.

  7. Make sure that the remote print server is identified correctly as a SunOS 4.1 system.

To check printing from a SunOS 4.1 client to a SunOS 5.x print server:

  1. Check the basic functions of the LP print service on the print server, if you have not done so already.

    For instructions, see "To check the basic functions of the LP print service: ". Make sure that the printer works locally before trying to figure out why nothing prints when a request is made from a print client.


    Note -

    You should be logged in as superuser or lp on the system specified in the following steps.


  2. Make sure that the print client is accessible.

    1. On the SunOS 5.x print server, send an "are you there?" request to the print client.


      print_server# ping print_client
      print_client is alive

      If you receive the message print_client not available, you may have a network problem.

  3. On the print client, verify the printer is set up correctly.


    # lpr -P luna /etc/fstab
    lpr: cannot access luna
    #

    This command shows whether the print client is working. The above example shows that the print client is not working correctly.

  4. Make sure that the lpd daemon is running on the print client.

    1. Verify the lpd daemon is running.


      # ps -ax | grep lpd
        118 ?  IW    0:02 /usr/lib/lpd
      #

      This command shows if the lpd daemon is running on the print client. The above example shows that the daemon is running.

    2. On the print client, start the lpd daemon.


      # /usr/lib/lpd &
       
      
  5. On the print client, make sure that there is a printcap entry identifying the printer.

    1. Verify the printer is known.


      # lpr -P mercury /etc/fstab
      lpr: mercury: unknown printer
      #

      The above example shows that the /etc/printcap file does not have an entry for the specified printer.

    2. If there is no entry, edit the /etc/printcap file and add the following information:


      printer-name|print-server:\
      :lp=:rm=print-server:rp=printer-name:br#9600:rw:\ 
      :lf=/var/spool/lpd/printer-name/log:\
      :sd=/var/spool/lpd/printer-name:

      The following example shows an entry for printer luna connected to print server neptune.


      luna|neptune:\
              :lp=:rm=neptune:rp=luna:br#9600:rw:\
              :lf=/var/spool/lpd/luna/log:\
              :sd=/var/spool/lpd/luna:
    3. Create a spooling directory (/var/spool/lpd/printer-name) for the printer.

  6. Make sure that the print client lpd is not in a wait state by forcing a retry.

    If the print server is up and responding, the print client lpd may be in a wait state before attempting a retry.

    1. As superuser on the print client, invoke the lpc command.

      The lpc> prompt is displayed.

    2. Restart the printer.

    3. Quit the lpc command.

      The shell prompt is redisplayed.


      # lpc
      lpc> restart luna
      luna:
             no daemon to abort
      luna:
            daemon started
      # quit
      $
  7. Check the connection to the print server.

    1. On the print client, become superuser, and check the printer log file.


      # more /var/spool/lpd/luna/log
       
      

      Frequently, no information is displayed.

    2. Also check the printer status log.


      # more /var/spool/lpd/luna/status
      waiting for luna to come up
      #
    3. If the connection is all right, on the print server, verify the print server is setup correctly.


      # lpstat -t
      scheduler is running
      system default destination: luna
      device for luna: /dev/term/a
      luna accepting requests since May 20 17:45 1997
      printer luna now printing luna-314. enabled since 
      May 20 17:45 1997. available.
      luna-129            root               488   May 20 17:47
      #

      The above example shows a print server that is up and running.

      If the print server is not running, go back to Step 1 before continuing.