Tag: powershell
Failed to launch session with the error code “Your session ‘AppName’ did not launch successfully due to error code 3500. Please contact your administrator for more information about the error.” on Citrix Workspace App During App/Desktop Launch
Causes and Solutions
Cause 1: For Multi-session OS machines, the VDA machine is reaching the maximum load you specified in one of following load management policies:
- Maximum number of sessions
- CPU usage
- Disk usage
- Memory usage
- Memory usage base load
Solution 1: Please confirm if the VDA Server has reached the settings you specified in above HDX policies. This can be checked:
- Using Citrix Director: Trends => Load Evaluator Index tab.
- Using PowerShell:
Get-BrokerMachine |Select DNSName, LoadIndex, LoadIndexes
When troubleshooting the issue, please consider:
- Logging off idle or disconnected sessions
- Increasing the number of VDA servers hosting the published resource to the Delivery Group.
- Resolving the performance issue on the VDA server if it is running into performance problems.
Cause 2: The Random single-session OS or multi-session OS machine the user is connecting to is in maintenance mode.
Solution 2: Please turn off Maintenance Mode for that machine from Citrix Studio or PowerShell cmdlet:
Set-BrokerMachineMaintenanceMode -InputObject <domainname><hostname> $false
Cause 3: The user attempts to launch an app or desktop in Citrix Workspace app after access to the resource in the Delivery Group has been removed, but before the user has refreshed avaialbe apps in Citrix Workspace app.
Solution 3:
- If Citrix Workspace app Self-Service Plug-in is disabled by Manage SelfServieMode policy , right click the Citrix Workspace app icon in Windows notification area and click Refresh.
- From the Citrix Workspace app, click the user name, in the dropdown list, and click Refresh Apps.
Cause 4: The VDA machine to host the HDX session is not registered to any of the Delivery Controller servers in the site.
Solution 4: Please refer to How to Troubleshoot Virtual Delivery Agent (VDA) Registration issues to resolve VDA registration issue.
Cause 5: There are insufficient random/non-persistent Windows desktop VDA machines available for the user to successfully launch one.
Solution 5: Please power on more VMs in the Delivery Group or add more VDA machines to the Delivery Group.
Cause 6: Pass-through authentication to Citrix Workspace app is attempted but the XML trust service is not correctly configured.
Solution 6: Please run the following PowerShell command as an administrator on the Delivery Controller:
Set-BrokerSite -TrustRequestsSentToTheXmlServicePort $True
Cause 7: SSL related registry settings under “HKLMSYSTEMCurrentControlSetControlTerminal ServerWdsicawd” are rolled back to the default values after installing CU on VDA 1912 LTSR. (This is problem only when HdxSslEnabled is true on your delivery group.)
Solution 7: Please refer to Configure TLS on a VDA using the PowerShell script and enable TLS with “Enable-VdaSSL.ps1” on VDA. This is a bug. Investigation is in progress under CVADHELP-17421. Please contact technical support if you need help.
Related:
Error on Studio: “A working instance for the Configuration Logging Service could not be found”
- Get-Service Citrix* | Stop-Service -Force
- Get-Service Citrix* | Start-Service
Note: Studio is not going to show the same error message anymore, and it should prompt for a Mandatory upgrade again. Do not proceed with the upgrade yet, and make sure you have a good backup of the database before continuing with the following steps.
2. Re-register the Log and Monitor services connection strings with the following PowerShell commands:
Set-MonitorDBConnection -DataStore Monitor -DBConnection $nullSet-MonitorDBConnection -DBConnection $nullSet-LogDBConnection -DataStore Logging -DBConnection $nullSet-LogDBConnection -DBConnection $null
$cs="Server=$ServerName;Initial Catalog=$SiteDBName;Integrated Security=True"$csLogging= "Server=$ServerName;Initial Catalog=$LogDBName;Integrated Security=True"$csMonitoring = "Server=$ServerName;Initial Catalog=$MonitorDBName;Integrated Security=True"
Set-LogDBConnection -DBConnection $csSet-LogDBConnection -DataStore Logging -DBConnection $csLoggingSet-MonitorDBConnection -DBConnection $csSet-MonitorDBConnection -DataStore Monitor -DBConnection $csMonitoring
3. Proceed with the Mandatory upgrade on Studio by clicking the “Start the automatic Site upgrade” button. If prompted, enter the credentials used by the controllers to connect to the database.
4. Wait for the upgrade to finish, and then Studio should start to work properly.
Related:
XenApp 7.x: Error: the data base is already been configured
Error Id: XDDS:36FD07F4
Exception:
Citrix.Console.Models.Exceptions.ScriptException The database has already been configured.
at Citrix.Console.PowerShellInteraction.CmdletExecutionMethods.CreateException[T](ICommonLog logger, ExecutionResults`1 results, ICmdletExecutionHost host)
at Citrix.Console.PowerShellInteraction.CmdletExecutionMethods.Execute[T](ISdkCmdlet`1 sdkCmd, ICmdletExecutionHost host, Boolean allowFailover)
at Citrix.Console.PowerShellInteraction.SdkServiceBase.SetDatabaseConnection(ICmdletExecutionHost cmdletExecutionHost, String instanceAddress, DataStore dataStore, String databaseConnection, Boolean force)
at Citrix.Console.PowerShellSdk.UpgradeService.UpgradeTasks.ServiceConfigurationTask.AttachServiceDatastoresToDatabaseServer(ServiceEndpointAnalysis servicesWithUnregisteredServiceInstance, ICmdletExecutionHost host, String databaseConnection)
at Citrix.Console.PowerShellSdk.UpgradeService.UpgradeTasks.ServiceConfigurationTask.<>c__DisplayClass10_0.<RunUpgradeTask>b__5(ICmdletExecutionHost host)
at Citrix.Console.PowerShellInteraction.SimplePowerShellScript.<>c__DisplayClass4_0.<Run>b__0(ICmdletExecutionHost host)
at Citrix.Console.PowerShellInteraction.PowerShellScript`1.Run()
at Citrix.Console.PowerShellSdk.UpgradeService.UpgradeTasks.ServiceConfigurationTask.RunUpgradeTask(IProgressReporter progressReporter, ITaskLogger taskLogger)
at Citrix.Console.PowerShellSdk.UpgradeService.UpgradeTasks.UpgradeTaskBase.RunUpgrade(IProgressReporter progressReporter, ITaskLogger taskLogger)
at Citrix.Console.PowerShellSdk.UpgradeService.UpgradeTasks.UpgradeTaskBase.RunUpgrade(IProgressReporter progressReporter, ITaskLogger taskLogger)
at Citrix.Console.PowerShellSdk.UpgradeService.UpgradeTasks.Upgrade.RunUpgradeTask(IProgressReporter progressReporter, ITaskLogger taskLogger)
at Citrix.Console.PowerShellSdk.UpgradeService.UpgradeTasks.UpgradeTaskBase.RunUpgrade(IProgressReporter progressReporter, ITaskLogger taskLogger)
at Citrix.Console.DeliveryCenter.UI.Mmc.UpgradeResultPaneViewModel.UpgradeTask(IProgressReporter progressReporter, UserCredentials databaseCredentials)
at Citrix.Console.Common.OperationTimer.TimeBlock(Action operation)
at Citrix.Console.CommonControls.ProgressDisplay.GenericProgressOperationWithFeedBack.PerformOperationInternal()
at Citrix.Console.CommonControls.ProgressDisplay.ProgressWindowOperation.PerformOperation()
at Citrix.Console.CommonControls.ProgressDisplay.ProgressWindowViewModel.PerformAction(Action operationComplete)
DesktopStudio_ErrorId : DatabaseConnectionDetailsAlreadyConfigured
Sdk Error Message : Cannot transition directly from using one data store to another; clear the existing data-store connection first.
Sdk Error ID : Citrix.XDPowerShell.Status.DatabaseConnectionDetailsAlreadyConfigured,Citrix.EnvTest.Sdk.DataStore.Commands.SetEnvTestDBConnectionCommand
ErrorCategory : NotSpecified
DesktopStudio_PowerShellHistory : SimplePowerShellScript
Related:
Unable to Remove XenDesktop Delivery Controllers from the XenDesktop Site
Complete the steps to remove the orphaned Delivery Controller (Controller) from a XenDesktop 7.x site:
-
Run the Get-BrokerController command from PowerShell to get the SID of the orphaned Controller.
-
Execute the following PowerShell script, replacing the XenDesktopDatabase with your XenDesktop database and the DCSID with your SID of the Controller you want to remove:
asnp Citrix*$DBName = "XenDesktopDatabase"$EvictedSID = "DCSID"## Generate Database 'Evict' Scripts for XenDesktop DataStore##Get-ConfigServiceStatusGet-LogSite Get-BrokerController -Filter {(SID -eq $EvictedSID)} -MaxRecordCount 2147483647Add-Content "$PWDevict_$sid.txt" (Get-AcctDBSchema -DatabaseName $DBName -ScriptType 'Evict' -Sid $EvictedSID)Add-Content "$PWDevict_$sid.txt" (Get-HypDBSchema -DatabaseName $DBName -ScriptType 'Evict' -Sid $EvictedSID)Add-Content "$PWDevict_$sid.txt" (Get-ProvDBSchema -DatabaseName $DBName -ScriptType 'Evict' -Sid $EvictedSID)Add-Content "$PWDevict_$sid.txt" (Get-BrokerDBSchema -DatabaseName $DBName -ScriptType 'Evict' -SID $EvictedSID)Add-Content "$PWDevict_$sid.txt" (Get-MonitorDBSchema -DatabaseName $DBName -DataStore 'Site' -ScriptType 'Evict' -Sid $EvictedSID)Add-Content "$PWDevict_$sid.txt" (Get-SfDBSchema -DatabaseName $DBName -ScriptType 'Evict' -Sid $EvictedSID)Add-Content "$PWDevict_$sid.txt" (Get-EnvTestDBSchema -DatabaseName $DBName -ScriptType 'Evict' -Sid $EvictedSID)Add-Content "$PWDevict_$sid.txt" (Get-ConfigDBSchema -DatabaseName $DBName -ScriptType 'Evict' -Sid $EvictedSID)Add-Content "$PWDevict_$sid.txt" (Get-LogDBSchema -DatabaseName $DBName -DataStore 'Site' -ScriptType 'Evict' -Sid $EvictedSID)Add-Content "$PWDevict_$sid.txt" (Get-AdminDBSchema -DatabaseName $DBName -ScriptType 'Evict' -Sid $EvictedSID)Add-Content "$PWDevict_$sid.txt" (Get-AnalyticsDBSchema -DatabaseName $DBName -ScriptType 'Evict' -Sid $EvictedSID)Add-Content "$PWDevict_$sid.txt" (Get-AppLibDBSchema -DatabaseName $DBName -ScriptType 'Evict' -Sid $EvictedSID)Add-Content "$PWDevict_$sid.txt" (Get-TrustDBSchema -DatabaseName $DBName -ScriptType 'Evict' -Sid $EvictedSID)Add-Content "$PWDevict_$sid.txt" (Get-OrchDBSchema -DatabaseName $DBName -ScriptType 'Evict' -Sid $EvictedSID)# Script completed successfully# Generate Database 'Evict' Scripts for 'Logging' DataStore##Get-ConfigServiceStatus Get-LogSite Get-BrokerController -Filter {(SID -eq $EvictedSID)} -MaxRecordCount 2147483647Add-Content "$PWDevict_$sid.txt" (Get-LogDBSchema -DatabaseName $DBName -DataStore 'Logging' -ScriptType 'Evict' -Sid $EvictedSID)# Script completed successfully# Generate Database 'Evict' Scripts for 'Monitor' DataStore##Get-ConfigServiceStatus Get-LogSite Get-BrokerController -Filter {(SID -eq $EvictedSID)} -MaxRecordCount 2147483647Add-Content "$PWDevict_$sid.txt" (Get-MonitorDBSchema -DatabaseName $DBName -DataStore 'Monitor' -ScriptType 'Evict' -Sid $EvictedSID)# Script completed successfully
After running the script, the evict.txt file is created under the users profile. The file could also be generated under C:Windowssystem32, if ran in IDE PowerShell as administrator. The file contains a script required to run on the SQL server.
Related:
CVAD-While Installing the Citrix components (Delivery Controller, Storefront,License )/, it prompts for reboot. Error “You must restart the machine before continuing ” “
-1. Open an elevated PowerSell session.
2. Install-Module PendingReboot ( Internet access required on DDC machine )
3 . Set-ExecutionPolicy -ExecutionPolicy “Unrestricted”)
4. Import-Module PendingReboot
5. Test-PendingReboot -detailed
6 – Delete the registry key mentioned in the Powershell output.
7- Now the DDC, can be upgraded without restart prompt.
Related:
When Launching an App-V Application, This Message is Shown “Cannot Start”.
Get-AppvClientPackage -All
The command output shows a failure, and the message “The Microsoft Application Virtualization Service may not have been started. Verify that the service is running.
That may indicate that App-V is not enabled on the VDA.
Run command Enable-App-V and restart Desktop service.
NOTE: If VDAs are not persistent, run the command in master image and update the catalog.
Related:
XenApp/Xendesktop 7.X Exception “Cannot Connect To Database Server” Of Type “Citrix.Fma.Sdk.Dal.DALConnectionFailedException”. Ensure that the database is correctly configured and accessible.
- Collect Wireshark logs from Delivery Controller and SQL server to check if the issue is due to intermittent network issues.
- Collect PSSDIAG logs from SQL Database Server to check if there are any SQL Performance issue.
- As a workaround you can increase the Connection Pool size of Monitor Service.
1. Take a backup of Delivery controller and the Database Server.
2. On the Delivery Controller, launch Powershell as an admin.
3. Run asnp citrix*
4. Run Get-MonitorDataStore and copy the ConnectionString value.
5. Then run the below powershell cmdlets to Nullify the Monitor DB Connection:
Set-MonitorDBConnection -DataStore Monitor -DBConnection $null
Set-MonitorDBConnection -DBConnection $null
6. Then run the below powershell cmdlets to reset the ConnectionString value with Max Pool Size parameter added and value set to 200.
Example:
Set-MonitorDBConnection -DataStore Monitor -DBConnection “Server=SQL;Initial Catalog=xxxxx;Integrated Security=True;Max Pool Size=200”
Set-MonitorDBConnection -DBConnection “Server=SQL;Initial Catalog=xxxxx;Integrated Security=True;Max Pool Size=200”
7. Modify the String value as per the ConnectionString output you get from Step No. 4 and then restart the Citrix Monitor service.
Related:
Citrix Cloud – Unable to delete hosting connection, Error Connection “Connection name” cannot be deleted because it is being used by the following Objects and/or background actions.
https://docs.citrix.com/en-us/citrix-virtual-apps-desktops-service/sdk-api.html
Note: It recommend not to install Remote PowerShell SDK with any other Citrix Components installed.
2. Add the Citrix snap-ins:
asnp Citrix*
3. Authenticate to Citrix Cloud.
Note: If you have multiple Customers associated to your account you will get a drop down to select the correct one that you are targeting.
Get-XdAuthentication
4. Get the PS Path of the hosting connection and resource(s)
ls XDHyp:Connections
ls XDHyp:HostingUnits
Example hosting connection path: “DHyp:ConnectionsHosting Connection Name”
Example Resource path: “XDHyp:HostingUnitsResource Name”
5. Remove the Resource(s) Path:
Remove-Item -Path "XDHyp:HostingUnitsResource Name"
6. Remove Hosting Connection Path:
Remove-Item -Path "XDHyp:ConnectionsHosting Connection Name"
7. Removing Hosting connection Entry:
Remove-BrokerHypervisorConnection -Name "Hosting Connection Name"