Technical article 102819

Set up lpd (remote) printing; can't print locally and/or remotely.

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5OpenServer 5.0.6OpenServer 5.0.7

Written · Last revised

Problem

After setting up the lpd remote print daemon I can't print or I can print from the network but not locally.

Solution

There are a few possible reasons for this:

1.  You have run mkdev rlp twice.  When you run mkdev rlp, three
    files (lpstat, cancel, and lp) are moved from /usr/bin and
    stored in /usr/lpd/remote.  The directory, /usr/lpd/remote,
    is used to store the original lp spooling files and is still
    necessary for handling local printing.  If you run this
    command twice, the files from /usr/bin will copy over the
    original files, and both directories will have identical file
    sizes.

The files in /usr/bin will have the following size and permissions after running mkdev rlp:

--x--s--x  1  bin  lp      63634 Jun 30 10:06  cancel
--x--s--x  1  bin  lp      67590 Jun 30 10:06  lp
--x--s--x  1  bin  lp      65418 Jun 30 10:06  lpstat

The original lp, lpstat, and cancel are saved in /usr/lpd/remote:

--x--x--x  1  root other   28728 Jun 30 10:06  cancel
--x--x--x  1  root other   58088 Jun 30 10:06  lp
--x--x--x  1  root other   92780 Jun 30 10:06  lpstat
If this problem arises you need to copy the files, lpstat,
cancel, and lp from the original operating system disks and
move them to the directory, /usr/lpd/remote.  You can also
restore them from backup.
2.  Another problem might be that the permissions are
    incorrect on the directory structure /usr/lpd/remote.

This directory structure needs execute permissions on on all levels for 'other'.

chmod 711 /usr /usr/lpd /usr/lpd/remote

Refer to #1 for what the proper permissions should look like.

3.  Did not start the lpd daemon on both machines.

Both machines must have the lpd daemon running in the background, so both machines must have an lpd daemon installed.

To start the daemon type: lpd start
4.  When you run the command mkdev rlp to configure the print
    server, you must specify the device name.  If you have
    assigned a device that the system does not recognize or
    do not assign a device , you will get an error, "cannot
    create" and printing will not happen.

For example, if you specified /dev/lp0 as the name of the device, then the parallel device should read:

name=parallel base=0x378 offset=0x2 vec=7 dma=- unit=0

You should successfully redirect the date through lp0 before setting up the spooler:

date > /dev/lp0
Be sure the parallel device shows up in hwconfig.  If
printing to a parallel device or Com2 you must run mkdev
'parallel' or mkdev 'serial' to get the port recognized
by the operating system.
NOTE:     If there is an error with the configuration of "rlp" then you may see
          the error "Destination <printer> is unknown to the print service".
NOTE:     Check you can print to the print server by running "telnet <host>
          515".
NOTE:     Further debugging can be achieved with running:

- 'truss' on the lp process, such as:

# truss -o /<filename> -aefvall lp ...
- 'netcat' from:
http://aplawrence.com/KevinSmith/netcat/

This product is not supported by SCO.

- tcpdump from a different server, eg:

Lets assume the systems you have a problem with servers called OSR5 and printer x.

Ideally there should be no other communication or activity.

You will need to login as root on a 3rd server running OpenServer 6 or UnixWare 7 and run the command:

# tcpdump -w /dump.file host OSR5 and printer x

Then on the OpenServer 5 machine run an lp that generates the failure.

Then on the system that is running tcpdump, interrupt the command and there should be a a /dump.file generated.

ADDITIONAL FAQ:

1. How do I tell if Remote Print Servies are active?

- Run "scoadmin printer" -> System -> Print Services

2. When I do this the Remote Printing option is in brackets and I can't access it?

- Check that /usr/lib/mkdev/rlp exists. If not, then the remote printing part of your operating system has not been loaded.

3. When I try to add a Remote Printer and I try to select the remote server it tells me that the connection to the remote server has failed. I can still enter manually the name of the printer to work-around this but how can I resolve it?

- Configure .rhosts equivalence between the two servers.

For more information see:

TA125883, "How can I copy files from one server to another?"

4. When I add the printer I am unable to print to the remote server?

- Check the remote server has your server entered into:

/etc/hosts.lpd

5. When I print, 'lpstat -t' hangs when listing the remote printers.

- It's likely a remote printer listed there is now un-contactable due to network issues or is no longer present and can be removed with "scoadmin printer".

6. I want to test printing without wasting paper, how can I do this?

- You can print to file with either:

TA110966, "How can I configure OpenServer to print to a file?"

or:

TA126173, "How can I configure UnixWare 7 to print to a file?"

or:
Print to a 'terminal' device by:

a) Log onto a terminal and run "tty" to reveal the terminal you are on, eg. /dev/ttyp0

b) Run "scoadmin printer" and add a Local printer and changing the Device Name to /dev/ttyp0

c) Run "lp -d <mytestprinter> /etc/hosts

and the output should scroll onto /dev/ttyp0.

See also

TA107419,"Cannot print locally after mkdev rlp configured. CONFIG,NREGION,NPROC errors"

From the Xinuos technical article database, record 102819. Reproduced with permission. The original is at www.sco.com/ta/102819, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.