Solved

Printers Go Offline in Citrix Sessions  XenApp  7

Posted on 2016-08-22
25
30 Views
Last Modified: 2016-10-08
OK Fellow Guru's  Here is a question for you as I seem to have hit a wall once again.  I Apologize for the length of the post but am trying to get a complete picture if possible.  If you have any ideas I would appreciate any help.  The total number of people affected is relatively small, but nothing seems to make a difference.

We operate a Very heterogeneous environment providing an accounting Application to the hospitality Industry.   I have multiple users that when they are attempting to print will be able to print anywhere from 2-10 print jobs (sometimes more) when the printer mapped in their Session will Go "Offline".  The printer on the client device is still online and still printing locally,  it is just in the session it shows as offline and any additional print jobs simply queue up.  THe only fix so far is for them to Log off and log back on.   This appears to happen primarily to HP laserJet printers, but that may because a majority of our clients use HP printers.  I have seen it occur with Canon Printers as well (UFRII drivers and PCL both).   Clients are running everything from Windows 7 through WIndows 10 though this issue goes back to windows XP as well.  The clients have the Citrix receiver and have been seeing this for quite some time through Multiple iterations of the receiver.  

Printers are mapped with the Citrix UPD or HP laserJet 4 driver, and in some cases the HP Universal Driver.   The Driver substitution does not seem to make a difference in this issue.  I am currently at a loss and no knowledge base articles I have looked seem to address this issue or have a solution provided.  We have a load balanced farm over over 160 servers running Win2012 and XenApp 7.6 currently, but i have seen this going back to win we had Windows 2003 as well.

Thank you
Jason
0
Comment
Question by:JrayPatten
  • 14
  • 9
25 Comments
 
LVL 38

Expert Comment

by:Philip Elder
Comment Utility
Make sure to use only the Universal Print Driver for the printers.
Make sure all drivers are set to Isolated Mode that can be (in Print Management).
0
 

Author Comment

by:JrayPatten
Comment Utility
Phillip, THank you for the reply.

We use Universal Print Driver in most circumstances, however some printers, particularly HP LaserJets will not print properly with the Citrix Universal Driver, in those instances we use the HP LaserJet 4 driver as the primary substitution for it.   For the users that have this issue, It does not appear to matter which driver has been set.   I will check on Isolated mode and ensure that has been set.  

 HP Universal Print driver has also not been helpful.  One consultant we had said we needed to have the universal drivers for each of the major printer manufacturers available and that would solve all the printing issues we had.   HOwever in my experience so far they have not expanded or corrected our capabilities much further than using just the CItrix UPD and HP LaserJet 4.
0
 
LVL 15

Expert Comment

by:joharder
Comment Utility
I've been repeatedly underwhelmed with the HP Universal Driver, but Citrix UPD is quite good.

Can you clarify whether you are using autocreated printers or session printers or a combination of the two?  If a combination, does the issue only occur for one type?

If you're using session printers, the issue could be that the print spooler on the Citrix side fails.  Can you be sure that it is set to restart on failure?
0
 

Author Comment

by:JrayPatten
Comment Utility
JoHarder It is entirely Auto-created printers.  We do not have any session printers or printers in a print server.  
Our environment is Extremely heterogeneous with client connecting from Hotels through their own internet connections.  There is no LAN, WAN or VLAN arrangement with our clients.   Other users on the same server retain the ability to print.  This affects individual users within their citrix session.   Usually once they log off and log back i they can print again, at least for a time till the printer goes offline within their session again.  Also, we do NOT have Printer isolation turned on, and there are some questions about whether it would be a significant performance hit on our system since we do not make use of Print servers and use the auto-created printers.

When we have a customer subscribe to our service they are given a login and we publish our App to them.  They will then install the Receiver on their PC and connect through the Netscaler web page.
Printers, TWAIN scanner (if they have one)  and Drives are mapped into the session.
0
 
LVL 15

Expert Comment

by:joharder
Comment Utility
To clarify, only a few users are subjected to this issue occasionally, correct?  

Are there any other common denominators, such as only users that have a specific printer mapped within their session?
0
 

Author Comment

by:JrayPatten
Comment Utility
It is more often than not I'd say actually close to 80-90% of the time they have the issue but the frequency varies as to the number of Jobs they can print successfully.   Since most users only have the Default printer installed on their computer it is the same printer, but no, it is not all the same MODEL printer for the users.  It seems to occur slightly more often for the HP LaserJet Printers.  But I also seen it occur with Lexmark and Canon as well as Sharp and RICOH.
0
 
LVL 15

Expert Comment

by:joharder
Comment Utility
What I'm looking to understand is whether only a subset of users are afflicted with this issue even some of the time.

The reason I'm asking is because I suspect that it has to do with some corruption within the user profile. If it is only happening to a few users, I can walk you through how to clean up the printers within the user profile.
0
 

Author Comment

by:JrayPatten
Comment Utility
It is a subset of users and that makes some sense to the possibility of user profile corruption.  I didn't think we had roaming profiles on All the affected users, and we use Virtual machines so that when we reboot the machine gets a clean image with no user profiles on it, aside from the subset of users that have roaming profiles.   But it is something to look into.   I would be glad to see the procedure you have.   I will be out of the office for the next few days so it will be early next week before I get a chance to implement and test.

THank you for your attention and replies.
Jason
0
 
LVL 15

Expert Comment

by:joharder
Comment Utility
Are you providing XenApp or XenDesktop for these users?

Also, can you confirm whether you indeed have roaming profiles or anything other than local profiles configured for the affected users?
0
 

Author Comment

by:JrayPatten
Comment Utility
It is XenApp and I will have to go check on the users to confirm.   I will let you know as soon as I can on that.
0
 
LVL 15

Expert Comment

by:joharder
Comment Utility
Just warning you that I'm going to ask you to mess with the registry.  Disclaimer is that this is at your own risk.

If they are indeed roaming profiles, what you'll want to do is find the user session on the particular server.  Get on the phone with that user and warn him/her that you are going to make some changes that will require the user to logoff.  Open up the registry and find the afflicted user under HKUsers\[SID].  Look at Volatile Environment to be sure you've got the right user SID.

Once you're absolutely positive that you have the right user SID, delete all of the contents of the Printers\Connections, Printers\DevModePerUser, and Printers\DevMode2 folders.  Don't delete the folders themselves, but if there are any subfolders under these, you can delete them.  The results should be that Printers\Connections, Printers\DevModePerUser, and Printers\DevMode2 exist but are empty.  Then ask the user to gracefully logoff (do not force a logoff because that will not allow the profile to write back correctly!) and logon again.  

I'm fairly certain that what has happened is that there is something weird lodged in these reg keys.  Before you actually do the delete, you may wish to look at the contents of these three folders and save screen shots so that you'll be able to determine whether there's a pattern for the other afflicted users.
0
 

Author Comment

by:JrayPatten
Comment Utility
Jo
Thanks for the comments, I was off for the past few days but will get ahold of a user and do some testing with them in the next few days.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:JrayPatten
Comment Utility
None of the users I have looked at Had roaming profiles.   I was on the phone with one user and did as you suggested, I cleared out the DevModePerUser folder of its keys (there is no DevMode2 folder) and she was able to print for a time, then as usual, the printer went into offline mode in her session and jobs queued up.    As I have thought about this I wonder if the printer queue or the spooler on the server is expecting some kind of communication or response from the printer, that verifies the printer is in fact actually online.  Then for whatever reason it is either not receiving a response and going deciding the printer must be offline.   I thought that might be through the "bi-directional support", but am not sure as I do not believe it is active, is there a good way to disable this by default?
0
 
LVL 15

Expert Comment

by:joharder
Comment Utility
One important step was not followed in my instructions, which would have likely fixed the issue.  The user needed to log off after the registry keys were deleted and then login fresh.  What happened is that the user profile became corrupted once again during the session and then perpetuated.  It never had a chance to write back correctly.
0
 
LVL 15

Expert Comment

by:joharder
Comment Utility
After you deleted those registry keys, the user should log off cleanly (not forced) and then login fresh.

This confirms my theory that the user profile is becoming corrupted with printing-related registry keys.  This may be due to a printer driver itself; there is  likely a common denominator printer driver, which will require additional detective work.  You should pursue this route first.

An alternative is to create a script or use the Registry Group Policy Preference Preference to forcibly remove any existing printers at the end of each session.  At a minimum, this will enable users to log off and log in to clear up the problem themselves.
0
 

Author Comment

by:JrayPatten
Comment Utility
I will look at this again and I apologize for not getting back to the site on it.   I have another user who I am scheduled to work with on the issue in the next couple of days days and will test this out.
0
 

Author Comment

by:JrayPatten
Comment Utility
Another Question, Since a large majority of the users we have do NOT have roaming profiles, do I need to create them a roaming profile, apply this fix after they are logged in so it can propagate?   The reason I bring this up is that we have over 100 servers in our farm, and they are virtual,  when the server is rebooted, it gets created again as a fresh server from a  master image that has no profiles stored on it at all until a user logs in.   If the user does not have roaming profiles wouldn't that have the same effect as deleting the keys you mention?
0
 
LVL 15

Expert Comment

by:joharder
Comment Utility
Based on your last comment, it appears that you're using local profiles.  That could explain the intermittent problem.

What is happening is that a login to a fresh server will cause the user profile to be created on that server.  If I log in and access Server11 today, Server11 creates a new local profile for me.  When I logoff, that profile remains on Server11.  If tomorrow I access a freshly rebooted server or one that I haven't accessed previously, then again a new profile is created for me on that server.  But if tomorrow I access Server11 and it hasn't been rebooted, then I access my local profile from yesterday's session.

In general, some type of network profile, whether roaming profile, User Profile Management, or a third-party profile product is generally recommended, but that may or may not resolve this issue.

For starters, make sure that the print spooler is set to restart on failure for the three times.  Check to see if there are any entries in the event log showing that the print spooler restarted itself.  

I am more inclined to think that this issue is related to a bad printer driver or wonky printer communications.  It could be that once the user attempts a print job to a particular printer, it all goes downhill from there, perhaps making it appear that the issue is another printer.  Misbehaving printer/driver are difficult to track down.  The Citrix print driver tool isn't all that useful (I've seen it report some drivers as bad and then okay when rerun).  As you work with this user, see if there are any common denominators with respect to mapped printers.
0
 

Author Comment

by:JrayPatten
Comment Utility
I will do that.   My gut points to a possible printer communication issue but I will work to set up a roaming profile for them and look at drivers.  Though Most times the driver in question (unless you mean the driver on the client PC) is going to be the Citrix UPD  or the HP LaserJet 4.

Thank you for the response
0
 
LVL 15

Expert Comment

by:joharder
Comment Utility
It is possible that the HP LaserJet 4 introduces some wonkiness with a certain print device.  I've learned to never say never with regard to printing ...
0
 

Author Comment

by:JrayPatten
Comment Utility
I won't disagree with that.  It has been our go to driver substitute for a very long time.  In my experience if it won't work with the Citrix UPD it will almost certainly work with the LJ4.   In some ways I would almost prefer it to the be universal driver.
 
As is the case with most citrix admins printing is a special nightmare.
0
 

Author Comment

by:JrayPatten
Comment Utility
Based on a conversation over on the Citrix Support forums I have pushed several clients having this issue back to the version 12.3 client.  
So far this appears to be working from the limited time and sample size I have been checking, but I hope to have a better picture at the end of the day.   I am going to deploy to one or two more for testing purposes and then give another 24 hours to make sure.  If this works I will update here as well.  If not, then back to the drawing board.
0
 

Accepted Solution

by:
JrayPatten earned 0 total points
Comment Utility
I have had several more days of the test clients running the 12.3 version Citrix Client and none of them so far have had a repeat of the offline printer issue.

The biggest obstacle I see is that 12.3 will not work on WIndows 10.  If they migrate or upgrade then the fix I have in place will be lost.    

I have one user that is the exception to this rule, BUT after further testing it appears whatever issue she is having is related to her local windows profile on her PC.   ANother user logged into her PC and was able to print fine.   So I gave instructions to have their Local IT get her a new windows profile on that PC to see if it fixes the issue.
0
 

Author Closing Comment

by:JrayPatten
Comment Utility
It is the best solution I have found and is working for 99% of the people with the issue till the windows 10 upgrade.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
In this Micro Tutorial viewers will learn how they can get their files copied out from their unbootable system without need to use recovery services. As an example non-bootable Windows 2012R2 installation is used which has boot problems.
In this Micro Tutorial viewers will learn how to restore single file or folder from Bare Metal backup image of their system. Tutorial shows how to restore files and folders from system backup. Often it is not needed to restore entire system when onl…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now