Jump to content
Welcome to our new Citrix community!
  • 0

Printer redirection not working after scheduled reboot due to long wait for IP address assignment?

David Joye


I'm running 1912CU5 on Windows Server 2019 VMs that are hosting apps (not desktops), these VMs are scheduled to reboot nightly and have previously experienced the issue where they would sometimes not power on after the scheduled reboot, I followed https://support.citrix.com/article/CTX223434 to resolve that issue. Probably not related since I resolved the boot hang long ago, but I've recently been seeing an issue where the VMs fail to perform printer redirection after having been rebooted; this only happens to a small number of the VMs and I don't believe it's a Citrix software issue. When the issue is present, no user printers show in Print Management on affected hosts, printer redirection just doesn't work and users get a 'frozen' screen when attempting to print.


I checked the System event logs on the affected VMs, I started from the point when the VM booted and noticed events for problems reaching the domain controller, getting group policy, and performing an action to set a service principle name parameter for the machine object in AD. Based on those events I'm going to assume that it took longer than expected for the VM to obtain an IP address and resulted in issues with initialization of Citrix services. To fix the problem on the affected servers, I ran gpupdate /force and restarted the Print Spooler service, which also restarts the Citrix print service, and I could then see that print redirection was now working for new connections to the affected servers.


What can be done to ensure the VMs get a network connection quickly after a reboot? I did just now set DHCP reservations for the VMs, so I'm hoping that helps them grab their IP faster. I use BIS-F and the Citrix Optimizer tool when prepping the images, but I could be missing something beneficial in those settings. I could probably trigger a scheduled task to wait for network connectivity and then perform the gpupdate and spooler restart based on event log items, but I'm open to suggestions.

Link to comment

2 answers to this question

Recommended Posts

  • 0

Triggering a spooler restart with Task Scheduler appears to have helped cover up this problem.


- The task is triggered based on the occurrence of event ID 808 in Microsoft-Windows-PrintService/Admin

- A PowerShell script is used to perform "Restart-Service Spooler -Force" since this will restart the Windows print spooler and associated services (Citrix Print Management)

- The PS script has a "Sleep 120" before the service restart because I assume the system is busy at the time when the issue occurs during OS boot


With that said, perhaps I could have simply set the print services to a delayed start, but this will suffice. I've monitored two scheduled reboots and see that the scheduled task had been activated on some hosts and could see that printers were redirecting on those hosts after users connected, so I'm satisfied with this as a solution until I rebuild the templates.

  • Like 1
Link to comment
  • 0

I don't believe that the DHCP reservations helped, I did get by one day without issues, but found another host with the issue this morning. I did find a useful event, Event ID 808, in Event Viewer under Applications and Services Logs -> Microsoft -> Windows -> PrintService: Admin. The text from the event is: The print spooler failed to load a plug-in module cpmon.dll, error code 0x35. This event appears on the affected host shortly after boot.


I'm going to create a scheduled task triggered by the event, the task will wait a few minutes and then restart the print spooler service. I'll post that info if that seems to work and hopefully be able to use that as a temporary fix because I'm only seeing this issue on a specific machine set, so it might be a good time for me to just rebuild the template from scratch.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...