Troubleshooting errors

This topic list some of the errors that you might come across while setting up Secure Private Access.

Certificate errors Database creation errors StoreFront failures Public gateway/callback gateway failures Secure Private Access Server not reachable

Certificate errors

Error message: Unable to get the certificates automatically from one or more Gateway servers. Workaround: Update the Gateway Certificate the same way in which you would for Citrix Virtual Apps and Desktops.

Database creation errors

  • Error message: Failed to create database

    Resolution: For Automatic case - The machine must have READ, WRITE, UPDATE permissions to create tables within the database on the SQL server.

  • Error message: Failed to create database: A database already exists.

    This error message might occur in any of the following scenarios.

    • If the Automatic configuration option is selected while configuring the databases.
    • If the admin is creating a database, it must be an empty database. This error message can appear if the database is a non-empty database.

      Resolution: You must create an empty database.

    • You uninstall Secure Private Access and retry the setup with the same site name. In this case, the database from the previous installation would not have been deleted.

      Resolution: You must manually delete the database.

    • You choose to set up the database manually (by selecting Manual Configuration in the Configuring Databases page) by using the script, and then change to the Automatic Configuration option but use the same site name. In this case, a database with the same name is already created while running the script.

      Resolution: You must rename the site and then run the script again.

    • The machine does not have the READ, WRITE, UPDATE permissions to create tables within the database on the SQL server.

      Resolution: Enable appropriate permissions on the machine. For details, see Permissions required to set up databases.

  • Error message: Failed to create database: Connection failed

    Resolution:

    • Check database network connectivity from your machine. Ensure that the SQL server port is open on the firewall.
    • If using a remote SQL server, check if the SQL server has login created with the Secure Private Access machine identity, Domain\hostname$.
    • If using a remote SQL server, confirm that the machine identity has the correct role assigned, system administrator role.
    • If using a Local SQL server (not from the installer), check if the NT AUTHORITY\SYSTEM user must have a login created.

StoreFront failures

  • Error message: Failed to create StoreFront entry for: <Store URL>

    Update the StoreFront entries from the Settings tab if it is not visible. After you have set up Secure Private Access using the wizard, you can edit StoreFront entries from the Settings tab. Note down the StoreFront Store URL for which this error occurred.

    Resolution:

    1. Click Settings and then click the Integrations tab.
    2. In StoreFront Store URL, add the StoreFront entry if it is not visible.
  • Error message: Failed to configure StoreFront entry for: <Store URL>

    Resolution:

    1. There might be a PowerShell execution policy restriction in place. Run the PowerShell script command Get-ExecutionPolicy for details.

    2. If it is restricted, you must bypass this and run a StoreFront configuration script manually.
    3. Click Settings and then click the Integrations tab.
    4. In StoreFront Store URL, identify the StoreFront URL entry for which the error occurred.
    5. Click the Download Script button next to this Store URL and run this PowerShell script with admin privileges on the machine on which the corresponding StoreFront installation is present.

    Note:

    If you are retrying the installation after uninstalling, ensure that you don’t have an entry with the name “Secure Private Access” in the StoreFront configuration (StoreFront > store> Delivery Controller -> Secure Private Access). If Secure Private Access is present, delete this entry. Manually download and run the script from the Settings > Integrations page.

  • Error message: StoreFront configuration is not local for: <Store URL>

    After you have set up Secure Private Access using the wizard, you can edit gateway entries from the Settings tab. Note down the StoreFront Store URL for which this error occurred.

    Resolution:

    This issue occurs if StoreFront is not installed on the same machine as Secure Private Access. You must manually run the StoreFront configuration on the machine where you have installed StoreFront.

    1. Click Settings and then click the Integrations tab.
    2. In StoreFront Store URL, identify the StoreFront URL entry for which the error occurred.
    3. Click the Download Script button next to this Store URL and run this PowerShell script with admin privileges on the machine on which the corresponding StoreFront installation is present.

    Note:

    To run the StoreFront PowerShell script, open the Windows x64 compatible PowerShell window with admin privileges and then run ConfigureStorefront.ps1. StoreFront script is not compatible with Windows PowerShell (x86).

Public gateway/callback gateway failures

Error message: Failed to create Gateway entry for: <Gateway URL> OR Failed to create Callback Gateway entry for: <Callback Gateway URL>

Resolution:

Note the Public Gateway or Callback Gateway URL for which the failure occurred. After you have set up Secure Private Access using the wizard, you can edit gateway entries from the Settings tab.

  1. Click Settings and then click the Integrations tab.
  2. Update the public gateway address or the callback gateway address and the virtual IP address for which the failure occurred.

Secure Private Access Server not reachable

Error message: Failed to update IIS pool. Failed to restart IIS pool

Resolution:

  1. Go to Application pools in Internet Information Services (IIS) and check that the following application pools have started and are running:
  • Secure Private Access Runtime Pool
  • Secure Private Access Admin Pool

Also check that the default IIS site "Default Web Site" is up and running.

Database connectivity check failures

Error Message: Connectivity check failed

Database connectivity check can fail due the multiple reasons:

  • The database server is not reachable from the Secure Private Access plug-in host machine due to a firewall.

    Resolution: Check if the database port (default port 1433) is open on the firewall.

  • The Secure Private Access plug-in host machine does not have the permission to connect to the database.

    Resolution: See SQL database permissions for Secure Private Access.

Gateway connectivity check failed. Unable to fetch public certificate

Error Message: Post installation configuration fails with the error “Gateway connectivity check failed. Unable to fetch a public certificate….”

Resolution:

  • Upload the gateway public certificate to the Secure Private Access database manually using the config tool.
  • Open the PowerShell or the command prompt window with admin privileges.
  • Change the directory to the Admin\AdminConfigTool folder under the Secure Private Access installation folder (for example, cd “C:\Program Files\Citrix\Citrix Access Security\Admin\AdminConfigTool”)
  • Run the following command:

    .\AdminConfigTool.exe /UPLOAD_PUBLIC_GATEWAY_CERTIFICATE <PublicGatewayUrl> <PublicGatewayCertificatePath>

Authentication issues

The Secure Private Access runtime service IIS authentication configuration might not work as the Integrated Windows Authentication (IWA) is not supported.

Miscellaneous

Create Secure Private Access diagnostics support bundle

Perform the following steps to create a Secure Private Access diagnostics support bundle:

  • Open the PowerShell or the command prompt window with admin privileges.
  • Change the directory to the Admin\AdminConfigTool folder under the Secure Private Access installation folder (for example, cd “C:\Program Files\Citrix\Citrix Access Security\Admin\AdminConfigTool”).
  • Run the following command:

    .\AdminConfigTool.exe /SUPPORTBUNDLE <output folder>

SQL database permissions for Secure Private Access

For automatic database creation, the Secure Private Access plug-in host machine must have the permissions to connect to the database and create database schema.

Remote database:

Perform the following steps to set up the permissions for a remote database.

  1. Create an empty database with the name syntax CitrixAccessSecurity<Site Name>. Here <Site Name> is the Secure Private Access site name. (for example. CitrixAccessSecuritySPA).

    CREATE DATABASE CitrixAccessSecurity<SiteName>

  2. Create an SQL server login for the machine identity for the Secure Private Access virtual machine. For example, if your Secure Private Access broker machine name is HOST1 and the machine domain is DOMAIN1, then the machine identity is “DOMAIN1\HOST1$”. If the login is already created, then you can ignore this step.

    USE CitrixAccessSecurity<SiteName>

    CREATE LOGIN [DOMAIN1\HOST1$] FROM WINDOWS

    Domain name can be found using the following query:

    SELECT DEFAULT_DOMAIN()[DomainName]

  3. Assign the db_owner role to the machine identity.

    USE CitrixAccessSecurity<SiteName>

    EXEC sys.sp_addrolemember [db_owner], 'DOMAIN1\HOST1$'

    ALTER USER [DOMAIN1\HOST1$] WITH DEFAULT_SCHEMA = dbo;

Local database:

Perform the following steps to set up the permissions for a local database.

  1. Create an empty database with the name syntax CitrixAccessSecurity<Site Name>. Here <Site Name> is the Secure Private Access site name. (for example, CitrixAccessSecuritySPA).

    CREATE DATABASE CitrixAccessSecurity<SiteName>

  2. Create an SQL server login for NT AUTHORITY\SYSTEM user. If the login is already created then you can ignore this step.

    USE CitrixAccessSecurity<SiteName>

    CREATE LOGIN [NT AUTHORITY\SYSTEM] FROM WINDOWS

  3. Assign the db_owner role to the “NT AUTHORITY\SYSTEM” user.

    USE CitrixAccessSecurity<SiteName>

    EXEC sys.sp_addrolemember [db_owner], 'NT AUTHORITY\SYSTEM'

    ALTER USER [NT AUTHORITY\SYSTEM] WITH DEFAULT_SCHEMA = dbo;

When you manually create the database, the downloaded database script adds the permissions to the machine identity.