Unable to get jobs out of print queue - SCO

This is a discussion on Unable to get jobs out of print queue - SCO ; Hi, I'm having problems getting a remote printer and print queue set up. The queue is supposed to send jobs to a jet direct device running lpd. We have this set up running successfully at several locations in the company, ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Unable to get jobs out of print queue

  1. Unable to get jobs out of print queue

    Hi,
    I'm having problems getting a remote printer and print queue set up.
    The queue is supposed to send jobs to a jet direct device running
    lpd. We have this set up running successfully at several locations
    in the company, but this printer seems to have configuration issues.

    The scheduler is running:
    # ps -ef | grep lpsched
    root 287 1 0 06:01:55 ? 00:00:00 /usr/lib/lpsched
    root 1107 1100 0 10:18:16 ttyp1 00:00:00 grep lpsched

    The printer seems to be accepting requests, but it looks like there
    may be an irregularity in the queue config files:
    # lpstat -a
    s130ptr001:
    atebivr not accepting requests since Sun Oct 09 06:01:55 2005 -
    new destination
    s130ptr002 accepting requests since Thu Aug 21 13:58:59 2008
    s130ptr001 accepting requests since Mon Sep 22 16:49:27 2008

    If you send a job to it, the job thinks the queue is not enabled:
    # lpstat
    unable to get network name for local machine scosysv.mycomp.com
    no entries
    unable to get network name for local machine scosysv.mycomp.com
    waiting for queue to be enabled on s130ptr001
    Req-Id Owner Size Date
    s130ptr001-0 root 256 Sep 23 09:42
    s130ptr001-1 root 1909 Sep 23 16:33
    s130ptr001-2 root 1909 Sep 24 10:23

    The printcap file looks ok:
    # more /etc/printcap
    # Remote Line Printer (BSD format)
    atebivr:\
    :lp=:rm=netterm1:rp=atebivr:sd=/usr/spool/lpd/atebivr:mx#0:
    s130ptr002:\
    :lp=/dev/lp0:ex:sd=/usr/spool/lpd/s130ptr002:mx#0:
    s130ptr001:\
    :lp=:rm=s130ptr001:ex:rp=s130ptr001:sd=/usr/spool/lpd/
    s130ptr001:mx#0:

    It looks to me like I've got a dup entry somewhere in the print
    subsystem, but I don't see it. What else could I check?

    TIA Dave

  2. Re: Unable to get jobs out of print queue

    dthacker wrote:
    > Hi,
    > I'm having problems getting a remote printer and print queue set up.
    > The queue is supposed to send jobs to a jet direct device running
    > lpd. We have this set up running successfully at several locations
    > in the company, but this printer seems to have configuration issues.
    >
    > The scheduler is running:
    > # ps -ef | grep lpsched
    > root 287 1 0 06:01:55 ? 00:00:00 /usr/lib/lpsched
    > root 1107 1100 0 10:18:16 ttyp1 00:00:00 grep lpsched
    >
    > The printer seems to be accepting requests, but it looks like there
    > may be an irregularity in the queue config files:
    > # lpstat -a
    > s130ptr001:
    > atebivr not accepting requests since Sun Oct 09 06:01:55 2005 -
    > new destination
    > s130ptr002 accepting requests since Thu Aug 21 13:58:59 2008
    > s130ptr001 accepting requests since Mon Sep 22 16:49:27 2008
    >
    > If you send a job to it, the job thinks the queue is not enabled:
    > # lpstat
    > unable to get network name for local machine scosysv.mycomp.com
    > no entries
    > unable to get network name for local machine scosysv.mycomp.com
    > waiting for queue to be enabled on s130ptr001
    > Req-Id Owner Size Date
    > s130ptr001-0 root 256 Sep 23 09:42
    > s130ptr001-1 root 1909 Sep 23 16:33
    > s130ptr001-2 root 1909 Sep 24 10:23
    >
    > The printcap file looks ok:
    > # more /etc/printcap
    > # Remote Line Printer (BSD format)
    > atebivr:\
    > :lp=:rm=netterm1:rp=atebivr:sd=/usr/spool/lpd/atebivr:mx#0:
    > s130ptr002:\
    > :lp=/dev/lp0:ex:sd=/usr/spool/lpd/s130ptr002:mx#0:
    > s130ptr001:\
    > :lp=:rm=s130ptr001:ex:rp=s130ptr001:sd=/usr/spool/lpd/
    > s130ptr001:mx#0:
    >
    > It looks to me like I've got a dup entry somewhere in the print
    > subsystem, but I don't see it. What else could I check?
    >
    > TIA Dave


    I'm guessing your /etc/hosts file is not correct, for either the printer
    host or the local SCO machine.

    Depending on a local Windows DNS server to resolve the address can be
    problematical, as some Windows DNS have problems even talking to SCO
    systems, let alone resolving a local address for the SCO box.

    Perhaps the host name setup in LPD is not the one you expect - from the
    lpstat -a output maybe it's pointing to 'atebivr' instead of 's130ptr001'.

    What does lpstat -t show?

    Can you ping the printer using only the hostname s130ptr001?

    Can you ping the SCO system FROM the SCO system using only the hostname?
    Ditto using localhost?

    What version SCO? (uname -X) and what patches are applied?

    --
    ----------------------------------------------------
    Pat Welch, UBB Computer Services, a WCS Affiliate
    SCO Authorized Partner
    Microlite BackupEdge Certified Reseller
    Unix/Linux/Windows/Hardware Sales/Support
    (209) 745-1401 Cell: (209) 251-9120
    E-mail: patubb@inreach.com
    ----------------------------------------------------

  3. Re: Unable to get jobs out of print queue

    dthacker wrote:
    > Hi,
    > I'm having problems getting a remote printer and print queue set up.
    > The queue is supposed to send jobs to a jet direct device running
    > lpd. We have this set up running successfully at several locations
    > in the company, but this printer seems to have configuration issues.
    >
    > The scheduler is running:
    > # ps -ef | grep lpsched
    > root 287 1 0 06:01:55 ? 00:00:00 /usr/lib/lpsched
    > root 1107 1100 0 10:18:16 ttyp1 00:00:00 grep lpsched
    >
    > The printer seems to be accepting requests, but it looks like there
    > may be an irregularity in the queue config files:
    > # lpstat -a
    > s130ptr001:
    > atebivr not accepting requests since Sun Oct 09 06:01:55 2005 -
    > new destination
    > s130ptr002 accepting requests since Thu Aug 21 13:58:59 2008
    > s130ptr001 accepting requests since Mon Sep 22 16:49:27 2008
    >
    > If you send a job to it, the job thinks the queue is not enabled:
    > # lpstat
    > unable to get network name for local machine scosysv.mycomp.com
    > no entries
    > unable to get network name for local machine scosysv.mycomp.com
    > waiting for queue to be enabled on s130ptr001
    > Req-Id Owner Size Date
    > s130ptr001-0 root 256 Sep 23 09:42
    > s130ptr001-1 root 1909 Sep 23 16:33
    > s130ptr001-2 root 1909 Sep 24 10:23
    >
    > The printcap file looks ok:
    > # more /etc/printcap
    > # Remote Line Printer (BSD format)
    > atebivr:\
    > :lp=:rm=netterm1:rp=atebivr:sd=/usr/spool/lpd/atebivr:mx#0:
    > s130ptr002:\
    > :lp=/dev/lp0:ex:sd=/usr/spool/lpd/s130ptr002:mx#0:
    > s130ptr001:\
    > :lp=:rm=s130ptr001:ex:rp=s130ptr001:sd=/usr/spool/lpd/
    > s130ptr001:mx#0:
    >
    > It looks to me like I've got a dup entry somewhere in the print
    > subsystem, but I don't see it. What else could I check?
    >
    > TIA Dave
    >
    >


    I can't help you with your rlp problems. I can only suggest that you abandon
    rlp and install netcat since you are printing to a HPJetDirect print server.

    If you HAVE to use rlp (print device only accepts rlp jobs), then I second
    Brian White's post:
    > Personally I only ever use this:
    > http://www.aljex.com/bkw/sco/#rlpnc
    > and this with it.
    > http://www.aljex.com/bkw/sco/#rlpr
    >
    > The first provides a convenient way to use netcat and rlpr, and includes
    > netcat already, in an out of the way place thet the included printer model
    > script expects, but which won't clobber or interfer with any other netcat
    > binary you may already have.
    >
    > The second adds rlpr as a seperate package that the first is already
    > prepared to use.
    >
    > Basically just unpack the two tars, create printer(s) in scoadmin using
    > device /dev/null and model Net, and edit a line in /etc/printers where the
    > first field is the same as the name of the Net printer.


    I have a client that had 10 rlp based printers and it was an administration
    nightmare. I finally took the time to move them all to netcat.

    But the client had one printer named ReformPRN that is a fancy invoice
    printer running under Windows that accepts print jobs and merges the job
    with a form image. The Reform print Queue only accepts jobs via rlp.

    So I had to install rlpr as recommended by Brian. Problem solved.

    An additional benefit of rlpr is the ability to support home based
    teleworkers printing to their local Windows printer from the UNIX server.

    A simple modification to the users .profile logs the VPN endpoint associated
    with the home worker to .rip_printer file in their home directory. The
    /etc/printers support file and the rlpnc based modifications to my standard
    HPLaserJet.net script happily sends the print job to the users home computer
    where Windows print services for UNIX is installed (lpd) with the designated
    share name rp_remote.

    > My /etc/printers file:

    # /etc/printers
    # "/usr/bin/printeradmin add | sh" will add all printers below
    # "/usr/bin/printeradmin add printer_name | sh" will add the named printer
    # "/usr/bin/printeradmin" will print help message
    #
    # NOTE: the record format below has semicolon in place of colon
    # replace the ";" with ":" in active records below
    #
    # printer_name;host_name;port_number;comment;model
    #
    # printer_name: UNIX printer name
    # host_name: Host name in /etc/hosts for IP address
    # port: Printserver dependent 9100 for HPJet direct
    # comment: Comment that appears in mkdev lp screen
    # model: /usr/spool/lp/model/model_name
    #
    # Stock netcat models: HPLaserJet.net Netcat.dotmatrix
    #
    # Example of Entry for ActiveFax HP laserJet emulation
    # Must embed ActiveFax fields in print stream prior to sending to lp.
    #fax;faxserver;9150;Active Fax server on Windows host;HPLaserJet.net
    fax:faxhost:9150:ActivFax server on Win98 192.168.111.10:HPLaserJet.net
    homeptr:localhost:SSH_PRINTER:remote printer for ssh USER:homeptr
    report:report:report:Print to /tmp/report.out:Netcat.dotmatrix
    cpxerox:cpxerox:9100:Xerox Copier-printer corporate:HPLaserJet.net
    azxerox:azxerox:9100:Xerox Copier-printer AZ plant:HPLaserJet.net
    txxerox:txxerox:9100:Xerox Copier-printer TX plant:HPLaserJet.net
    ilxerox:ilxerox:9100:Xerox Copier-printer IL plant:HPLaserJet.net
    p7:RLP_PRINTER:rp_remote:Remote Home users printer:RLPR.net
    ReformPRNffice1:ReformPRN:NEW Invoice printer (Copy machine):RLPR.net
    pr5r5:9100:OLD Invoice Printer:Netcat.dotmatrix
    barpkg:zebrahp:9100:Package Labels:zebra.net


    # printeradmin


    Usage: printeradmin add <- create all printers in /etc/printers
    printeradmin delete <- delete all printers in /etc/printers



    Usage: printeradmin add name <- create named printer in /etc/printers
    printeradmin delete name <- delete named printer in /etc/printers



    # printeradmin add

    /usr/lib/lpadmin -p pr5 -v /dev/null -m Netcat.dotmatrix -D "OLD Invoice Printer"
    /usr/lib/accept pr5
    enable pr5
    /usr/lib/lpadmin -p barpkg -v /dev/null -m zebra.net -D "Package Labels"
    /usr/lib/accept barpkg
    enable barpkg
    /usr/lib/lpadmin -p barbin -v /dev/null -m zebra.net -D "Bin Labels"
    /usr/lib/accept barbin
    enable barbin
    /usr/lib/lpadmin -p lexped -v /dev/null -m HPLaserJet.net -D "Tammi's (Lexmark Opra S 1855)"
    /usr/lib/accept lexped
    enable lexped
    /usr/lib/lpadmin -p lexrec -v /dev/null -m HPLaserJet.net -D "Receiving (Lexmark Opra S 1855)"
    /usr/lib/accept lexrec
    enable lexrec
    /usr/lib/lpadmin -p lex -v /dev/null -m HPLaserJet.net -D "Warehouse (Lexmark Opra S 1855)"
    /usr/lib/accept lex
    enable lex
    #


    > Excerpt from remote users .profile:

    [ -n "$SSH_CLIENT" ] && {
    echo "2022" > .ssh_printer
    chmod 644 .ssh_printer
    TZ='CST6CDT5,M3.2.0/2:00:00,M11.1.0/2:00:00'
    export TZ
    } || {
    TTY=`tty`;export TTY
    nTTY=`basename ${TTY}`;export nTTY
    rIP=`who -x | grep "${nTTY} " | awk ' { print $6 } '` ;export rIP
    [ "$rIP" = "192.168.5.233" ] || echo $rIP > .rip_printer
    }
    # NOTE: .233 is the Windows Terminal services host IP. Users running TS need to
    # login via telnet from home pc over the vpn first to record their VPN IP to
    # .rip_printer and then may close telnet and run telnet client from Terminal Services
    # session to cut down VPN traffic. Print jobs to p7 will be directed to host IP
    # taken from .rip_printer in the users home directory.


    >
    > Excerpt from interface script RLPR.net:

    # Look for HOST and Port address
    PRTSETUP=`grep "^$printer:" /etc/printers`
    if [ $? = 0 ]
    then
    PRTHOST=`echo $PRTSETUP|awk -F: '{ print $2 }'`
    PRTPORT=`echo $PRTSETUP|awk -F: '{ print $3 }'`
    else
    exit 1
    fi

    if [ "$PRTHOST" = "RLP_PRINTER" ]
    then
    # user home directory = sixth field of /etc/passwd
    uhome=`sed -n "s/^$name:.*:.*:.*:.*:\(.*\):.*$/\1/p" /etc/passwd`
    PRTHOST=`cat $uhome/.rip_printer`
    fi
    ....
    (
    # send the file(s) to the standard out $copies times
    while [ "$copies" -gt 0 ]

    do
    for file
    do
    0<${file} eval ${FILTER}
    done
    copies=`expr $copies - 1`
    done ) | /usr/local/bin/rlpr -H $PRTHOST -P $PRTPORT
    sleep 1
    exit 0

    > Excerpt from HPLaserJet.net:


    # Look for HOST and Port address
    PRTSETUP=`grep "^$printer:" /etc/printers`
    if [ $? = 0 ]
    then
    PRTHOST=`echo $PRTSETUP|awk -F: '{ print $2 }'`
    PRTPORT=`echo $PRTSETUP|awk -F: '{ print $3 }'`
    else
    exit 1
    fi
    ....

    # send the file(s) to the standard out $copies times
    while [ "$copies" -gt 0 ]

    do
    for file
    do
    0<${file} eval ${FILTER}
    done
    copies=`expr $copies - 1`
    done ) | /usr/bin/netcat -h $PRTHOST -p $PRTPORT
    sleep 1
    exit 0

    --
    Steve Fabac
    S.M. Fabac & Associates
    816/765-1670


+ Reply to Thread