If the CMEDS server's disk becomes full then it won't print.

Login to CMEDS as root.

[root@netserver ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             2.1G  1.1G  905M  55% /
/dev/hda5             4.2G  2.9G  1.2G  71% /client
/dev/hda6             774M  542M  192M  74% /meds

If the Use% column is over 95% then we need to free up some disk space on the server and CMEDS will not print.

Quick Reference to printer recovery

Login to CMEDS as root.

# cd /usr/sbin
# ./lpc
stop all
disable all
enable all
start all
restart all
restart all
CTRL-D
 
facet printers need:
 
# fct_adm
option 4 to stop
y
option 3 to start
q

Now you should be able to print to the HP4 on PC Michelle.

Login to PC KidSmile as LindaC and on the desktop is "Activate Printers". Open it and run it in a Terminal and CMEDS and Windows can print to the Lanier and HPLJ2035 printers.

Reference: Look over all of these notes before starting. Especially look at the Facet notes in blue.

PC Michelle has printer HP4 attached and is the SHP4 printer to the CMEDS system.  I usually use "screen" to manage several terminal sessions at the same time so I can check something, try something and refer back and forth easily. Use Ctrl-A-? when running "screen" to get a page of help.

ssh into PC Michelle as root.
# ssh -Y root@michelle


Do these things on PC Michelle.

Start "screen" program.
root@Michelle:~# screen

Find out the status of the printing sub-system.
root@Michelle:~# lpstat -v
device for HP4: hp:/par/HP_LaserJet_4_Plus?device=/dev/parport0

Find out what's queued and what the status of queued jobs is.
root@Michelle:~# lpq -a
no entries

Watch the print queue every 2 seconds until Ctrl-C quit.
root@Michelle:~# watch lpq -a

Print file testFile to HP4.
root@Michelle:~ # lpr -P HP4 testFile
root@Michelle:~# lpr -P HP4 hosts.1 t1.txt hosts.1 t1.txt

Restart printer spooler.
root@Michelle:~# /etc/init.d/cupsys restart

Log into CMEDS.
root@Michelle:~# telnet cmeds
login: dalem 


Do these things on PC CMEDS

[dalem@netserver /client/user/dalem]$ lpc status
lp:
        queuing is enabled
        printing is enabled
        5 entries in spool area
        no daemon present
fct_hp4:
        queuing is enabled
        printing is enabled
        37 entries in spool area
        fct_hp4 is ready and printing
fct_pan:
        queuing is enabled
        printing is enabled
        37 entries in spool area
        fct_hp4 is ready and printing
fct_hpbar:
        queuing is enabled
        printing is enabled
        37 entries in spool area
        fct_hp4 is ready and printing
hp4:
        queuing is enabled
        printing is enabled
        no entries
        no daemon present
shp4:  
        queuing is enabled
        printing is enabled
        4 entries in spool area
        no daemon present

Print file testFile from CMEDS through Michelle to HP4.
[dalem@netserver /client/user/dalem]$ lpr -Pshp4 testFile

[dalem@netserver /client/user/dalem]$ lpr -Pshp4 testFile
lpr: connect: Connection refused
jobs queued, but cannot start daemon

How do I start the fct daemon for shp4?
[dalem@netserver /client/user/dalem]$ ps ax | grep smb
smb is not running, perhaps it's not setup to re-start on restart?
[dalem@netserver /client/user/dalem]# less /var/log/messages
May 13 17:13:40 netserver logger: smbserver michelle, smbservice HP4, smbuser root
No logger from /usr/bin/smbprint after restart.
Setup /usr/bin/smbprint test command line!
cat testFile | /usr/bin/smbprint smbserver michelle, smbservice HP4, smbuser root
echo "`date` user $USERNAME host $HOSTNAME" >> $logfile
echo "smbserver $server, smbservice $service, smbuser $user" >> $logfile
smbserver michelle, smbservice HP4, smbuser root
cat testFile | /usr/bin/smbprint "\\\\$server\\$service" $password -U $user -N -P >> $logfile
cat testFile | /usr/bin/smbprint "\\\\michelle\\HP4" medsam -U root -N -P >> /tmp/smb-smb-print.log
root@Michelle:~# lpq -a
Rank    Owner   Job     File(s)                         Total Size
active  root    7602    smbprn.00007601 Remote Downleve 1024 bytes

[root@netserver /client/user/dalem]# cat testFile | /usr/bin/smbprint "\\\\michelle\\HP4" medsam -U root -N -P >> /tmp/smb-smb-print.log
michelle # lpq -a
michelle # lprm <job number>

[root@netserver /client/user/dalem]# cat testFile | /usr/bin/smbprint "\\\\michelle\\HP4" medsam -U root -N -P >> /tmp/smb-smb-print.log    
+ logfile=/tmp/smb-print.log
+ spool_dir=/var/spool/lpd/shp4
+ config_file=/var/spool/lpd/shp4/.config
++ cat /var/spool/lpd/shp4/.config
+ eval server=michelle service=HP4 password=medsam user=root
++ server=michelle
++ service=HP4
++ password=medsam
++ user=root
++ date
+ echo 'Tue May 13 21:44:26 CDT 2008 user root host netserver.medsamerica.com'
+ echo 'smbserver michelle, smbservice HP4, smbuser root'
+ logger 'smbserver michelle, smbservice HP4, smbuser root'
+ echo translate
+ echo 'print -'
+ cat
+ /usr/bin/smbclient '\\michelle\HP4' medsam -U root -N -P

[dalem@netserver /client/user/dalem]$ cat testFile | /usr/bin/smbprint "\\\\michelle\\HP4" medsam -U root -N -P >> /tmp/smb-print.log
+ logfile=/tmp/smb-print.log
+ spool_dir=/var/spool/lpd/shp4
+ config_file=/var/spool/lpd/shp4/.config
++ cat /var/spool/lpd/shp4/.config
+ eval server=michelle service=HP4 password=medsam user=root
++ server=michelle
++ service=HP4
++ password=medsam
++ user=root
++ date
+ echo 'Tue May 13 21:47:00 CDT 2008 user  host netserver.medsamerica.com'
+ echo 'smbserver michelle, smbservice HP4, smbuser root'
+ logger 'smbserver michelle, smbservice HP4, smbuser root'
+ echo translate
+ echo 'print -'
+ cat

+ /usr/bin/smbclient '\\michelle\HP4' medsam -U root -N -P
michelle # lpq -a

 

[dalem@netserver /client/user/dalem]$ lpr -Pshp4 testFile
lpr: connect: Connection refused
jobs queued, but cannot start daemon.

[root@netserver /client/user/dalem]# lpr -Pshp4 testFile
lpr: connect: Connection refused
jobs queued, but cannot start daemon.

[root@netserver /client/user/dalem]# strace lpr -Pshp4 testFile >t1 2>&1
less t1
socket(PF_UNIX, SOCK_STREAM, 0)         = 3
connect(3, {sun_family=AF_UNIX, sun_path="/dev/printer"}, 14) = -1 ECONNREFUSED (Connection refused)
fstat(1, {st_mode=S_IFREG|0664, st_size=6195, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40015000
close(3)                                = 0
write(1, "lpr: connect: Connection refused"..., 71lpr: connect: Connection refused
jobs queued, but cannot start daemon.
) = 71
It's accessing /dev/printer...
[root@netserver /client/user/dalem]# ll /dev/printer
srw-------   1 root     root            0 Nov  6  2007 /dev/printer=

Facet told me (and this fixed it!):

# cd /usr/sbin
# ./lpc
stop all
disable all
enable all
start all
restart all
restart all
CTRL-D
 
facet printers need:
 
# fct_adm
option 4 to stop
y
option 3 to start
q

Low level test for connectivity to Michelle.
[dalem@netserver /client/user/dalem]$ /usr/bin/smbclient "\\\\michelle\\HP4" medsam -U root -N -P
smb: \> put testFile
smb: \> CTRL-D

root@Michelle:~# lpq -a
Rank    Owner   Job     File(s)                         Total Size
active  root    7601    smbprn.00007600 Remote Downleve 1024 bytes

Waiting for paper change, remove this job.
root@Michelle:~# lprm 7601

[dalem@netserver /client/user/dalem]$ lpq
Warning: no daemon present
Rank   Owner      Job  Files                                 Total Size
1st    linda      373  (standard input)                      3603 bytes
2nd    linda      374  (standard input)                      3603 bytes
3rd    linda      375  (standard input)                      3701 bytes
4th    linda      376  (standard input)                      3512 bytes
5th    linda      377  (standard input)                      3512 byte

Look for errors in CMEDS
[dalem@netserver /client/user/dalem]$ less /tmp/smb-print.log
Tue May 13 17:13:40 CDT 2008 user  host netserver.medsamerica.com
smbserver michelle, smbservice HP4, smbuser root
Added interface ip=192.1.1.5 bcast=192.1.1.255 nmask=255.255.255.0
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.0.26a]
smb: \> CR/LF<->LF and print text translation now on
smb: \> putting file - as stdin-688 (102.935 kb/s) (average 102.935 kb/s)

[dalem@netserver /client/user/dalem]$ less /var/log/messages
May 13 23:12:04 netserver fct_remprt[735]: fct_hp4: Session setup for MICHELLE failed, Packet len:
 0 data: 0x81 0x 0 0x 0 0x48 0x20
May 13 23:13:32 netserver fct_remprt[735]: fct_hp4: connect called failed, errno=No route to host
I think that this means that PC Michelle is not up, it might be rebooting.

Try it again; since there are items in the queue on CMEDS I think I should clean the queue.