jaunty ltsp - Usb printer local - not print

Bug #398238 reported by ing_nagel
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ltsp (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Ubuntu Jaunty 9.04 - Alternate CD LTS - option F4

Print on client LTSP in local USB printer not work.

lts.conf
LOCAVDEV=true
PRINTER_0_DEVICE=/dev/usblp0
PRINTER_0_TYPE=U
PRINTER_0_PORT=9100

dhcpd.conf
#STATIC IP ----> work fine
host wst1 {
    hardware ethernet MA:CC:AD:DR:ES:SS;
    fixed-address 192.168.0.20;
}

# OTHER TEST-----> just does not work
#MODULE_01=usb-ohci
#MODULE_01=usblp
#MODULE_01=print
#PRINTER_0_DEVICE=/dev/usb/lp0

NOTE: I replaced code jetpipe and it did not work
https://bugs.launchpad.net/ubuntu/+source/ltsp/+bug/224259

Sorry for my bad English

Revision history for this message
oto_leme (economia-leme) wrote :

I'm with the same problem....

Printer state: Processing - Recoverable: Network host 'ws001' is busy; will retry in xx seconds...

Revision history for this message
Oliver Grawert (ogra) wrote :

why did you replace jetpipe ? jetpipe changed massively between hardy (8.04) and jaunty (9.04).
the changes in bug 224259 *only* apply to hardy (8.04)

the lts.conf settings of your second example are from ltsp4.x and dont apply at all to ltsp5.x as used in ubuntu.
please use the most recent upstream documentation for your setup
http://wiki.ltsp.org/twiki/bin/view/Ltsp/LtspDocumentationUpstream

Revision history for this message
oto_leme (economia-leme) wrote :

Oliver, I reconfigured again, but didn't work yet....
It's with the same message.
The print is installed on LTSP Client usb.
My LTSP sever doesn't get to print in it.

Sorry, but I don't speak english very well.

Revision history for this message
ing_nagel (ing-nagel) wrote :

Perhaps this serves to them is not the best thing it solves but it, must sacrifice its installation.
They install the Alternate version CD 8.10 and Update to 9.04
it worked to me.

Revision history for this message
Anton S. Ustyuzhanin (kit-miras) wrote :

I confirm this bug.
After a while printer is not printing, and status is "Processing - Recoverable: Network host 'ws001' is busy; will retry in xx seconds..."
I checking if jetpipe is running on 'ws001' - and there is no jetpipe. After TC reboot jetpipe is launched and printer working for a while. After some time error is repeat.

Revision history for this message
Anton S. Ustyuzhanin (kit-miras) wrote :

I have found cause of my problem.
1. I edited /usr/sbin/jetpipe, to preven it from forking.
2. I launched /usr/sbin/jetpipe -b 9600 -y 8 -p none -x /dev/usblp0 9100 on TC
3. I send some jobs to printer.
4. While printing i swiched off an on printer.
5. I sow the following in terminal:\
--------------------------------------------------------------------------------------------------------
root@ltsp26:/usr/sbin# /usr/sbin/jetpipe -b 9600 -y 8 -p none -x /dev/usblp0 9100
/dev/usblp0 9100
Waiting for connection....
Connected by ('192.168.50.1', 41319)
in writer loop
Disconnected
Waiting for connection....
Connected by ('192.168.50.1', 41361)
in writer loop
Traceback (most recent call last):
  File "/usr/sbin/jetpipe", line 207, in <module>
    redir.shortcut()
  File "/usr/sbin/jetpipe", line 66, in shortcut
    self.writer()
  File "/usr/sbin/jetpipe", line 84, in writer
    self.device.flush() # parallel device
IOError: [Errno 19] No such device
--------------------------------------------------------------------------------------------------------

Unfortunately i'm not familiar with python, but i think that there should be exeption handling cunstruction (like try-catch) in this snippet of /usr/sbin/jetpipe:

(line 28) self.device.write(data).....

Revision history for this message
Anton S. Ustyuzhanin (kit-miras) wrote :

Ok. I edited jetpipe:

            self.device.write(data)
            if self.devicetype == 'P':
                try:
                    self.device.flush() # parallel device
                except device.error, msg:
                    print "error flush(): ", msg

And now switching off printer is not causing jetpipe to crash. But also i don't see my print "error flush(): ", msg. I not python programmer, so if anybody can help me to fix this bug in jetpipe - fill free.

Users in our office often switch off printer device, when it starts to print wrong document, and after switching on it stops print anything. So this bug should be solved. :)

Revision history for this message
Anton S. Ustyuzhanin (kit-miras) wrote :

Ok guys. Problem solved :)
I attached fixed jetpipe script.
You should save it to /opt/ltsp/i386/usr/sbin, chmod 755 /opt/ltsp/i386/usr/sbin/jetpipe and make itsp-update-image

Revision history for this message
Stéphane Graber (stgraber) wrote :

From what I can see, your code is almost identical to the current upstream one.
Only difference is additional error handling upstram.

I'm marking that bug as fix released in current ltsp.

Changed in ltsp (Ubuntu):
status: New → Fix Released
Revision history for this message
Harry Sufehmi (harry-sufehmi) wrote :

Thanks Anton ! I've experienced similar problems - have replaced the jetpipe script in our LTSP image. Now it prints with no problem.

Thanks again. Much appreciated.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.