Tag Archives: Citrix

Citrix and the Battle of Print Sharing!

Have you ever had one of those problems that, once you find the solution, makes you want to want to facepalm whoever caused the problem so very, very hard?  I ran into something like that the other day, which drove me absolutely crazy!  And the worst part about it, is that the final solution that was discovered made absolutely no sense…

The Problem

The problem began when I had a user approach me one day, telling me that she was having a hard time printing.  Her computer had been connected to a third party company’s Windows Server, using Citrix for remote connectivity.  Her printers were shared through Citrix, which allowed her to print to any of her local printers from the Windows Server.  When we set up her printers, we renamed one of her printers, prepending her name to the beginning of the printer name, so that we could easily find it when attempting to print, and having to select the right printer to print to.

What was happening was that when the user opened Adobe Reader through the remote OS, and attempted to print a document, Adobe Reader completely locked up, preventing any further action.  I eventually had to open up the Task Manager and kill Adobe Reader.

After some extensive testing, I landed in the Event Viewer.  I noticed that every time a document successfully printed, there was an Event #10 posted in the Event Viewer, stating that the document successfully printed.  I also noticed the document appear in the print queue on both the Citrix remote Windows Server, and on her local computer.  However, whenever Adobe Reader failed to print and locked up, and Event #13 appeared in the event log, which stated that the document was deleted.  Also, nothing ever appeared in either of the two print queues.  Odd…

Now, I suppose it’s worth pointing out at this point that I am not very familiar with Citrix.  I can make it work, and it works fine, but I have much more experience with Remote Desktop, and TeamViewer.  So, troubleshooting was a bit of work, especially because the Citrix setup was done by a third party company, and they were going down the wrong path in trying to solve the problem.  Consequently, it was completely up to me to try to determine what the heck was wrong, and what to do to fix it.

The Process

I wasn’t sure where to start with figuring out the problem, so I just decided to jump in head first, and test everything I could find.

I started back in Citrix, seeing what was wrong.  I noticed that I could open up notepad, type up something, hit Print, and it would print just fine to the printer.  I also noticed that if I opened up Adobe Reader and hit print, it would print fine as well!  BUT, if I changed a single setting in Adobe Reader (“Choose paper source by PDF size”), and hit print, the entire thing locked up!

To make things even more complicated, we had another user who was sharing the same network printer, also logging into Citrix, and also printing using that flag, and it worked just fine.  So, something was fishy.  Why would attempting to print on one computer, using that flag, lock up, where as on another computer, or not even using that flag at all, printed just fine?  Frustrating!

I then brought a third computer into the mix.  I logged into this computer, logged into Citrix, printed with the flag to the printer, and it worked.  Thinking that it maybe had something to do with the fact that this other user was not an administrative user, I decided to log into her computer myself and try it.  I logged in, set up connectivity to the same network printer, logged into Citrix, tried to print, and it worked…  I then logged back in as the other user, tried it again, and everything still locked up again.

At this point, the last thing I could think of was that her profile was corrupt on the computer she was on, and so somewhere along the line it was corrupting network traffic, and causing things to lock up.  So, I completely blew away her profile, and let it recreate when she logged in again.  And again, after logging in and trying to print – the damn thing locked up.

Fark

At this point, I’m completely confused.  Nothing makes sense, and it should all be working.  I give up, throw in the towel, and decide to go for broke, and completely wipe the Windows OS, and completely reformat and reinstall Windows.  After doing so, I reconnect the computer to the domain, have the user log in again, connect to the network printer, rename it so we can find it, connect to Citrix, try to print, and……..it locks up again!

At this point I’m pissed.  What could be more clean that a freshly reformatted computer? Everything should have worked fine!  So, I begin to wonder if it’s an issue with the Citrix server, wondering if it tracks MAC addresses that communicates with, throwing some configuration parameter somewhere now that it recognized her computer / username, etc.  Or, I’m wondering if our Active Directory is messing something up in the process, keeping it from working, intercepting network traffic, etc.  I’m absolutely confused, and am ready to just purchase a brand new computer for her and get rid of this one and call it a day!

The Solution(!!!)

It is at this point that I decide to give it one last hurrah, and have the user log into the other user’s computer who has not been having this problem at all.  I have her log into the computer, verify that the network printer is configured, log into Citrix, try to print, and select the printer, and BAM!  It works!

Now I’m completely, and utterly confused.  Why would it not work on her own computer, even after a complete reformat / reinstall, whereas it would work when I logged into her computer, and yet it would work for her on someone else’s computer?  Then suddenly, it all became clear to me…

It was the name of the printer!!!

Yes, that’s right, the blasted name of the printer…

Here’s what happened:  every time I attempted to print from her user account on her computer, I was using the printer that I had renamed in order to find it easily on the Citrix server.  What I simply did was to append her first name (let’s call her Peggy) to the start of the printer name.  In this way, when she went to print through Citrix, she merely had to look for “Peggy LaserJet 1234” printer, and select it.  This differed from when I did it by logging into my own account, because I didn’t rename the printer.  I had merely left it as-is when doing my troubleshooting.

This problem of the renamed printer also carried over into her profile.  When I blew away her profile and recreated it, it somehow pulled in “Peggie LaserJet 1234” from the previous profile, or somehow that printer got configured in the default profile, so that it was pulled in every time a new profile was created.  Note that this didn’t affect my profile when I logged in, since I had previously logged in before that printer had been configured in the default profile.

This problem also didn’t affect the other user, because the third party company incorrectly told her that she needed to have that printer set as her default printer, if she wanted to be able to print to it through Citrix.  In the case of my problematic user, however, she would be printing to that printer very infrequently, and would be printing to a different printer much more often.  In that case, I thought it was asinine and unnecessary for her to set this specific printer as her default printer, just for those occasional uses where she needed to print to the printer through Citrix.  So, the better solution was to simply rename the printer to add her name to the front of it, so that she could easily find it at a later time when she wanted to print!

Conclusion

To recap – there’s apparently a bug in place somewhere, either through Citrix, or  Windows Server 2003, or Adobe Reader 7 (yes, the Citrix remote computer is still using Adobe Reader 7), that is causing this issue to be apparent.  Furthermore, the issue only affects users if they are trying to print by using the “Choose paper source by PDF page size” flag, and their printer name is over a certain length.

What is that length, you ask me?  Well, I could spend hours figuring out the exact details of this issue, and give specific answers, but I’ve spent enough of my time dealing with this problem!  All I can give you is that the following name worked:

HP LaserJet 1234 PCL6

Furthermore, attempting to prepend the name of the printer with her initial also worked:

P HP LaserJet 1234 PCL6

But by attempting to put her entire name at the beginning of the printer name did not work:

Peggie HP LaserJet 1234 PCL6

So, it appears that somewhere between 23 and 28 characters is what caused the printer to lock up.  However, note that I believe Citrix expands onto the name of the printer, with something like:

Peggie HP LaserJet 1234 PCL6 Auto Created on wl_abcdefgabcdefg

Where it “Auto creates” any printers through the Citrix interface, and adds a session ID onto the end of it as well.  So, the overall string that works or doesn’t work in someone else’s situation may be dependent on what name the Citrix client eventually gives to the printer itself.

As I mentioned when I started this post, the solution to the problem we experienced makes absolutely no sense.  While I would understand if the printer didn’t work AT ALL, because it was too long of a name for the Citrix client / Windows Server / Adobe Reader, what doesn’t make sense is the fact that it only doesn’t work if the name is too long, AND if that one print configuration flag is checked when printing.  Everything else outside of that situation works just fine.

My apologies for the long-winded post today.  However, I felt it was worth adding all that information, so that anyone searching the Googles for a similar problem will be better able to determine if this problem is the same as theirs or not.  If the time spent typing up this blog post can save someone else at least an hour’s worth of time who’s running into the same problem, then it’s completely worth it!

Until next time!

– Admin