Technical article 118262

OpenServer 5.0.6 print services (lpsched) are failing to run on a system with SPOOLDIR set in root's shell.

OpenServer 5.0.6

Written · Last revised

Problem

After a reboot of the system the lpsched process appears to be running from a "ps -ef" output but lp related commands indicate that it isn't. For example:

# /usr/lib/lpshut
Print services already stopped.
# /usr/lib/lpsched
Print services started.
Yet running "lpstat" results in:

UX:lpstat: ERROR: The LP print service isn't running or can't be reached. TO FIX: Your request can't be completely handled without the LP print service. If this problem continues, get help from your system administrator. scheduler is not running no system default destination

And trying to run lpsched in debug mode with "/usr/lib/lpsched -d" gives the following error:

Failed to allocate message fifo (No such file or directory)! Received unexpected signal 6, terminated Abort(coredump)

Cause

There may be various causes of this message.  However, one which is
specific to changes made with OpenServer 5.0.6 relates to the
SPOOLDIR parameter.

There has been an unresolved issue through several releases of OpenServer 5 and Unix 3.2v4.x where the lp subsystem was hardcoded to use /usr/spool/lp as it's spool area, ignoring any specified changes to this using the SPOOLDIR shell parameter.

In OpenServer 5.0.6 this issue was resolved and now lpsched does
use the value of the shell parameter SPOOLDIR when starting.  This
affects where the lp subsystem finds it's SCHEDLOCK lock file and
FIFO pipe, etc.
However, it seems a number of applications have been written which
setup their own spooling area by defining SPOOLDIR within a users
shell environment to set their own spooling area (and then use
SPOOLDIR within the application).  On previous releases of
OpenServer 5 this had no effect on the lp subsystem as SPOOLDIR was
ignored by lp but on OpenServer 5.0.6 this value is read by lp and
the spooling directory changed as specified which can lead to the
problems described above.

This is an issue with the use of SPOOLDIR by applications which previously took advantage of the fact that SPOOLDIR was ignored by lp.

Solution

This is only a problem if SPOOLDIR is being set and exported for the shell of a user who is a print subsystem administrator, eg. root.

For many applications the shell parameters are set in a central
location, such as /etc/profile so that all users are affected
(including root).  These parameters could be better set in each users
$HOME/.profile and so avoid the setting of this for root.
If there is a need to keep the central /etc/profile with this data
then it can be added to a specific .profile for root (and any other
lp administrator users) which set SPOOLDIR back to what the lp
subsystem would normally expect.
For example, add to  /.profile:
SPOOLDIR=/usr/spool/lp; export SPOOLDIR
An alternative is to use a symbolic link (see man ln(C)) to link
the /usr/spool/lp directory to the defined SPOOLDIR and have the lp
subsystem share the spooling directory with the application.  This
is a less elegant solution and could potentially have problems if
the application were to store files in this directory with the same
naming syntax as the lp subsystem.
NOTES:    The HP Network Printing aspect of the lp scheduler (setup with
          "mkdev hpnp" and "hpnpcfg") is still setup to use /usr/spool/lp
          and not the value of SPOOLDIR.  This has been reported to SCO
          Engineering.

See also

SCO OpenServer Release Notes (5.0.5 - page 43) lpsched(ADM) man page ta109755, "Failed to allocate message fifo" error appears in the file /usr/spool/lp/logs/lpsched."

From the Xinuos technical article database, record 118262. Reproduced with permission. The original is at www.sco.com/ta/118262, 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.