The Enterprise Eightfold Path

QuickPost – XenDesktopServerSetup crashes when installing XenApp or XenDesktop 7.6

The Enterprise Eightfold Path

QuickPost – XenDesktopServerSetup crashes when installing XenApp or XenDesktop 7.6

By James Rankin   |     Tuesday 17 March 2015

Tags:

Today, whilst trying to put together a XenDesktop PoC system, I was confronted with an error that had me stumped for quite some time.

The installer (AutoSelect.exe from the XenDesktop 7.6 installation files), seemed to run OK at first

I selected either XenApp or XenDesktop, it didn’t matter which was used

But as soon as I clicked on Delivery Controller, at first I was experiencing a crash of the installer itself, shown below

Looking in the event logs revealed a .Net-related error

Trying various common remedial methods – using Run As Administrator, pre-installing the .Net features, etc. – didn’t seem to make any difference. Hmmm!

Next stop was to dig out the XenDesktop installer log from its hiding place deep in %LOCALAPPDATA%\Local\Temp\Citrix\XenDesktop Installer\XenDesktop Installation.txt and check for errors. The AutoRun part of the installer also has a log, found typically (in an RDP session) at %TEMP%\Citrix\XenDesktop Installer\AutoRun.log, but in this case that was completing successfully.

Parsing the XenDesktop Installation.txt file showed the following

$ERR$ : AutoRun:Unable to record application type in the registry, error Access to the registry key ‘HKEY_LOCAL_MACHINE\SOFTWARE\Citrix’ is denied

This seemed strange, given that we were using a local Administrator account, so I went into the Registry, created the key HKLM\Software\Citrix key manually, and made sure my account had Full Control permissions to the key.

Running the Delivery Controller installer again, this time it didn’t crash. But another problem now manifested itself – the installer screen would simply sit with the animation moving (highlighted below), but never actually progressing any further

Stranger still!

I went in again and looked at the XenDesktop installer log. This time it was progressing further, but coming to an end at a particular point. The entire log is reproduced below. There are two errors near the start (shown in bold), but the installer seems to continue afterwards before coming to a halt in some sort of pre-requisite check

Date: Tuesday, March 17, 2015

Application version 7.6.0.5019

Running from C:\Testing\x64\XenDesktop Setup\MetaInstallerCore.dll

12:05:58.9597 $ERR$ : XenDesktopSetup:The follow command line arguments were specified: ‘/NOSPLASHSCREEN /XENDESKTOP ‘

12:05:58.9627 $ERR$ : XenDesktopSetup:Error whilst parsing arguments: System.NullReferenceException: Object reference not set to an instance of an object.

at Citrix.MetaInstaller.ArgumentParser..ctor(String[] args, ICollection`1 availableGroups)

at Citrix.MetaInstaller.Server.MetaInstallerServerApplication.ParseArguments(String[] args)

at Citrix.MetaInstaller.MetaInstallerApplication.Run(String[] args)

12:05:58.9627 : XenDesktopSetup:Current User Preferences follows state: invalid-cmdline

12:05:58.9687 : XenDesktopSetup:ShowUI = False

NoReboot = False

NoPrerequisites = False

UIMode = Normal

LogPath =

VerboseLog = False

WorkingDirectory = C:\Users\gklp76a\AppData\Local\Temp\rbt_fed69622-52aa-420e-b0ed-38e2dfb8be4f

InstallDirectory = C:\Program Files\Citrix

PreselectedComponents =

CDRoot =

InstallationResuming = False

EnableFlashSecurity = False

EnableProGraphics = False

ChangeFirewall = False

ConfigureUdpPorts = False

ConfigureRemoteAssistance = False

InstallRemoteAssistance = True

OptimizeVirtualMachine = False

IsVirtualMachine = False

IsVMWareVirtualMachine = False

XenAppServerLocation =

FarmGuid =

ControllerNames =

WcfPort =

NoCitrixWDDM = False

CitrixWddmOnHyperV = False

EnablePersonalVDisk = False

DoNotEnableDesktopExperience = False

MasterImage = False

User overriden virtual machine False

NoResume = False

AllowClientHostedAppsUrl (LAA)False

12:05:58.9697 : XenDesktopSetup:MetaInstaller terminating

12:05:58.9697 : XenDesktopSetup:InstallationManager instantiated

12:05:58.9697 : XenDesktopSetup:InstallationManager instantiated

12:05:58.9697 : XenDesktopSetup:InstallationManager instantiated

12:05:58.9717 : XenDesktopSetup:Component ‘Microsoft Visual x64 C++ 2008 Runtime’ and dependencies instantiated.

12:05:58.9717 : XenDesktopSetup:Component ‘Printing Server Role’ and dependencies instantiated.

12:05:58.9727 : XenDesktopSetup:Component ‘Citrix Universal Print Server’ and dependencies instantiated.

12:05:58.9797 : XenDesktopSetup:Product with upgrade code {C6B77583-0ED3-4E64-B9EF-19AFB65A5CEE} is not installed.

12:05:58.9817 : XenDesktopSetup:InstallationManager instantiated

12:05:58.9817 : XenDesktopSetup:InstallationManager instantiated

12:05:58.9817 : XenDesktopSetup:InstallationManager instantiated

12:05:58.9817 : XenDesktopSetup:Component ‘Microsoft Visual x64 C++ 2008 Runtime’ and dependencies instantiated.

12:05:58.9817 : XenDesktopSetup:Component ‘Printing Server Role’ and dependencies instantiated.

12:05:58.9817 : XenDesktopSetup:Component ‘Citrix Universal Print Server’ and dependencies instantiated.

12:05:58.9817 : XenDesktopSetup:Product with upgrade code {C6B77583-0ED3-4E64-B9EF-19AFB65A5CEE} is not installed

Searching for information on the product referenced in the last line showed no relevant hits whatsoever. So, as usual in these situations, it was off to Process Monitor to see what was happening.

Process Monitor revealed only more confusing things – the installer process (XenDesktopInstaller.exe) was simply repeatedly creating, querying and closing a 0KB file called c:\ProgramData\Citrix AutoRun Waiting

This again looks very odd, and this process continues until you terminate the installer process, or delete the Citrix AutoRun Waiting file, of which either will bring the installation process to a premature end.

Concentrating on the last line from the log, I wondered if the pre-requisite checker was failing to install one of the required roles or features properly. To this end, I set off into Server Manager and tried to install Remote Desktop Services manually.

Now, imagine my surprise when the role installation failed with an “Access Denied” error!

installation encountered the following errors…

The request to add or remove features on the specified server failed.

Installation of one or more roles, role services, or features failed.

Access is denied. Error: 0x80070005

This is a bit of a “WTF” moment, as we are logged on as a local Administrator. However – the account isn’t a domain administrator (third-party consultants like me rarely are!), could this be the problem?

Permissions-wise, aside from the filesystem, the only other pertinent part of the Windows operating system is the Local Security Policy – user rights. Our investigation now led us into the security console – secpol.msc

Now, everything looks normal, apart from one entry – the user right for “Manage auditing and security log” has been changed via Group Policy.

So local Administrators have had this right removed from them – could this be the cause of all our issues?

Indeed it is – restoring the “Manage auditing and security log” user right now allows XenDesktop setup to proceed and complete successfully

Incidentally, if you can’t get this changed on a domain level, using the old ntrights.exe from the Windows Server 2003 Resource Kit will allow you to add the privilege by using the command

ntrights +r SeSecurityPrivilege -u username

Sneaky! Anyway, you can see that I’ve finally managed to successfully complete my XenDesktop install – about time!

Summary

So, lessons learned from this are

1. Try not to customize your user rights too heavily from the defaults. In the absence of domain authentication, removing user rights from local Administrators can invoke the law of unintended consequences (I once saw a server that could not be shut down because of custom user rights)

2. Be aware that installers can fail in this situation, even if the user right appears to have no real relevance to installing software. SQL Server setup will do a pre-requisite check for this user right, which means that this behaviour has probably been observed previously.

3. Process Monitor and log files are your friends (admittedly not so helpful in this situation, but they certainly pointed me in the right direction)

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Join our mailing list

Sign up for our newsletter today and we'll send you exclusive content including free guides and articles. We promise not to send you spam and we don't share your details with anybody else.

Contact us

Howell Technology Group
One Trinity Green
Eldon Street
South Shields
NE33 1SA

T. 0191 4813446

Email us

Cookies policy

The HTG website uses cookies to store information on your computer. By continuing to browse this website you are agreeing to our use of cookies. Learn more

Accept

Thank you - you've accepted our cookies policy.