USB label printer issue - looks good, but 100% locked

Discussions about using Windows guests in VirtualBox.
Post Reply
bigbad
Posts: 7
Joined: 26. Mar 2014, 19:38

USB label printer issue - looks good, but 100% locked

Post by bigbad »

background:

host: ubuntu 12
guest: windows xp

We use xp as a guest because we have a specific label printer that does not have any available drivers for linux, so the xp guest basically just polls a directory and every time we dump a file into it, it sends it to the printer. We have a filter setup for the specific label printer we use. Most of the time it works.

Here is where it gets weird:

Every once in a while, one of these will break. Jobs will continue getting sent to the printer but they will just pile up in the queue. The first job will be stuck in a "printing" status but never actually prints. This job cannot be deleted without turning off the spooler and deleting the files in the system32\spool\printers directory and then starting the spooler again. However, once this has happened, printing cannot be restored. The very next job sent to the printer will instantly get stuck in "printing" status again and will never print.

Restarting the guest vm (or the entire host for that matter) will not clear the queue either. I have tried deleting the printer and then re-adding it in the xp guest, but once again the problem immediately begins again without even a single successful print.

Yesterday I went as far as to uninstall virtualbox, reinstall it, recreate the vm from scratch and it STILL persisted. The only thing I have been able to do to make the setup usable again is to rebuild the entire system, host and guest. This is not practical to have to reinstall the host OS and then do a full puppet run on it just to re-enable printing....especially since I can't reinstall the host OS remotely with the current setup...but even if I could, that is an absurd solution to this problem.

I haven't had enough opportunity to play with it, but (unless it was a coincidence due to some other circumstances) when I booted the computer off a bootable usb that had a cloned image from the actual system, I could print from it, then when I booted back to the actual system on disk printing was restored again. So it would seem that something about booting the system to something else "cleared" the issue. Note: it was not a livecd, it was a full ubuntu install (with virtualbox xp setup identical to actual system) on a 32gb usb drive.

I have read a lot about windows print queues getting stuck like this (I am not a windows guy, so I am far from an expert here) but the steps to fix it don't help me here. They get me back to an empty print queue but of course the problem persists. I am wondering if there is some sort of something interrupting communication between the host and guest that causes the printer to appear to be functional but is actually not reachable or something. I have been pulling my hair out trying to find answers to this but don't really know what else to try.

Please let me know what other info I can provide that might help diagnose this.

virtualbox version: 4.2.26 (I know it is a bit outdated, this setup has been in use for a few years now, but I am hesitant to upgrade as I still read about various usb issues in newer versions and since it works MOST of the time I really don't want to upgrade without concrete proof that something is actually going to improve)

Computer: one of a couple different Dell all-in-one Inspiron's - the kind that look sort of like iMacs.
Printer: Toshiba TEC label printer.

all help is GREATLY appreciated.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: USB label printer issue - looks good, but 100% locked

Post by scottgus1 »

I do almost the same thing as you're doing, running an XP-drivers-only Brother printer at home from an XP PC for all the other Windows 7 computers in the house. VBS script monitors a certain shared folder for PDFs. Drop a PDF into the shared folder, paper comes out of the printer. XP runs on the hardware itself, though, not through Virtualbox.

Regarding your problem, first thing is that there's been a security hole found and the fixes are ongoing. I believe 4.2.26 suffers from the fixes still being implemented. (Same fixes were tried for 4.3.14, see viewtopic.php?f=6&t=62615 and viewtopic.php?f=6&t=63556)
May be better to roll back to an earlier 4.2 or try 4.3.12

It's interesting that you have to restore both the host and the guest, or boot to another system, to get the printer to start printing again. I wonder if the problem is really with the printer (or perhaps trying to exist on Virtualbox's USB filter). Can you try just installing XP itself on the hardware and using it natively as the print spooler, not in a Virtualbox guest? See whether the problem comes back. If you don't have to enable printing documents from over the internet, you can block this particular PC from the Web but leave it still accessible from your LAN by using the Access Restriction page that's (likely) in your network router. Then you don't need to get antivirus for it or worry about it turning into a zombie botnet behind your back.
bigbad
Posts: 7
Joined: 26. Mar 2014, 19:38

Re: USB label printer issue - looks good, but 100% locked

Post by bigbad »

I haven't tried just loading windows xp straight onto the hardware and testing yet because I am hoping there is a solution that doesn't involve doing that, otherwise I am going to have to rewrite a lot of stuff since everything else running on these machines is linux-only. These setups are in various places and I don't have physical access to them when this happens until they are mailed back to me. I do have one local one that hit this problem. Yesterday I somehow managed to get it to start printing again but it was one of those things where I am not quite sure WHAT did it. I popped the lid on the printer, shut it, let it do its thing. then I just pulled the power chord on it and let it sit there for 30 seconds. After that I hooked it back in and re-added the printer, then rebooted the windows vm and magically labels started coming out again. However, I asked a client to do the same thing and am not getting the same results.

This made me wonder if the printer was getting stuck in some sort of status where it was rejecting jobs (maybe overheating) but not throwing explicit error messages. Im trying to figure out info on this printer but there isn't much out there. It is a Toshiba TEC thermal label printer.

I am also having a client try the usb option today hopefully. It has worked in the past, but especially with the off/on thing working for me yesterday, I am starting to wonder if it was more coincidence than a true solution. Maybe both times I have recovered from this I had done some other step I am not even recognizing.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: USB label printer issue - looks good, but 100% locked

Post by scottgus1 »

As a suggestion, there may be a lot of XP-class machines lying around at friends' houses now that XP support has ended, that you might be able to borrow one and try it. Or get a refurbished PC from Newegg or TigerDirect. Print serving shouldn't require a strong PC, I'd think. It's a good troubleshooting step to try to take Virtualbox out of the equation if possible and see what happens.
bigbad
Posts: 7
Joined: 26. Mar 2014, 19:38

Re: USB label printer issue - looks good, but 100% locked

Post by bigbad »

I agree that ruling out virtualbox would be good, and it might just have to come to that. The problem is that I don't know what causes this issue to start. We have a number of printer/machine combos out there using an identical setup (hardware and software identical) that have never had this problem. Sometimes it pops up on a newly created machine quickly, sometimes it doesn't happen for months, sometimes never. So it working on an xp machine wouldn't necessarily rule out virtualbox since I have yet to figure out how to recreate the error in the first place.

But yes, I agree, I might need to setup an xp machine and just leave it on with the printer plugged in and just pump some stuff through it everyday.
bigbad
Posts: 7
Joined: 26. Mar 2014, 19:38

Re: USB label printer issue - looks good, but 100% locked

Post by bigbad »

I was mainly hoping that maybe somebody else had come across this problem before and had some insight into what causes it. I know it is a long shot since it is a very specific problem. Or even just a similar problem with usb devices becoming dysfunctional but still appearing to be fine. Oh well, Ill keep digging, still open to any additional ideas here while I consider getting my hands on an xp machine.
Post Reply