Troubleshoot issues#

Learn how to resolve common errors or issues you may encounter when using the Ansys App Portal and Light Deployment Templates™ platform.

Platform services or portal is not accessible#

To resolve this issue:

  1. Check network connectivity in WSL by running the following command in the WSL terminal:

    • WSL
    ping google.com
    
    Example of expected response:

    You should see a response similar to the following if network connectivity is available:

    ../_images/check-network-wsl.png

    If the network is not available, run the following commands on the host machine and then restart the host:

    • PowerShell
    wsl --shutdown
    netsh winsock reset
    netsh int ip reset all
    netsh winhttp reset proxy
    ipconfig /flushdns
    
  2. Check the hosts file entries.

    Note

    On Windows operating systems, the hosts file is located at C:\\Windows\\System32\\drivers\\etc\\hosts.

    1. Ensure that the hosts file contains the correct mapping of the WSL Native IP address (WSL_MACHINE_IP in the .env file) with platform services.

      Example of correct mapping:
      • hosts
      <wsl_native_ip> keycloak.<hostname>.<domain_name>
      <wsl_native_ip> traefik.<hostname>.<domain_name>
      <wsl_native_ip> oauth.<hostname>.<domain_name>
      <wsl_native_ip> portal.<hostname>.<domain_name>
      

      Tip

      To fetch the <wsl_native_ip> value, run this command in the WSL terminal:

      • WSL
       ip addr show eth0
      
    2. Ensure that there are no duplicate entries with different IP addresses in the hosts file for the platform services.

      Example of incorrect duplicate entries:
      • hosts
      <wsl_native_ip> portal.<hostname>.<domain_name>
      <some_other_ip> portal.<hostname>.<domain_name>
      

User cannot log in to portal or receives an error when accessing portal UI#

In this case, the user can access the Ansys App Portal™, but either cannot log in or receives an error when attempting to access the UI.

To resolve this issue:

  1. Check the user registration details in the Keycloak Admin Console.

  2. Search for the user with the correct name (as specified in the user registration form).

  3. In the user details, verify that the user is registered with the correct email domain name (as specified in the .env file).

    Note

    The email address for the user must have the email domain specified while deploying the platform. Once platform is deployed, in the .env file, the email domain is specified as OP_EMAIL_DOMAIN.

    Example of invalid email domain:

    In this example, the user test1 is registered with a domain of @test.com. This is invalid because the platform was launched with a domain of @example.com.

    ../_images/invalid-user-list.png

For more information, see Manage users.

Error occurs while starting platform services#

To resolve this issue:

  1. Check WSL network connectivity.

    • WSL
    ping -c 4 google.com
    
  2. If WSL network connectivity is not available, run these commands on the host machine and then restart the host:

    • PowerShell
    netsh winsock reset
    netsh int ip reset all
    netsh winhttp reset proxy
    ipconfig /flushdns
    

Projects of an app deployed on the portal are not accessible#

To resolve this issue:

  1. Check for the app service entry in the hosts file of the host machine.

    Tip

    On Windows operating systems, the hosts file is located at C:\\Windows\\System32\\drivers\\etc\\hosts.

  2. Ensure that the hosts file contains the correct mapping of the WSL native IP address with the app service.

    Example of correct mapping:
    hosts#
     <wsl_native_ip> solutions.<hostname>.<domain_name>
    

    Tip

    To fetch the <wsl_native_ip> value, run this command in the WSL terminal:

    • WSL
    ip addr show eth0
    
  3. Ensure that there are no duplicate entries with different IP addresses in the hosts file for the app service.

    Example of incorrect duplicate entries:
    hosts#
    <wsl_native_ip> solutions.<hostname>.<domain_name>
    <some_other_ip> solutions.<hostname>.<domain_name>
    

Cannot start optiSLang#

When starting optiSlang, the following error message is shown:

Cannot start optiSLang 242. Please contact your IT admin to make sure that optiSLang is reachable and try again.

The error is likely caused by the host machine being unable to reach the WSL Linux distribution files system.

One way to verify this is to open the WSL file system from Windows Explorer. If you get an error like the one shown here, it confirms that the host machine is not able to reach the WSL file system.

../_images/error_accessing_linux_file_system.png

To resolve this issue:

  1. Restart WSL by running this script:

    • PowerShell
       wsl --shutdown
       wsl
    
  2. Restart the platform as described in Start the platform.

Connection to the site is not secure#

When accessing the platform services, you receive a warning message that the connection to the site is not secure.

To resolve this issue, click Continue to site.

../_images/continue-site.png

Cannot connect to the Product Instance Manager. Please contact your IT admin to make sure that this component is reachable#

When you execute the optiSLang workflow, the following error message is shown:

Cannot connect to the Product Instance Manager
../_images/pim_connection_error.png

To resolve this issue:

  1. In the root directory of the platform, run the following command to activate the virtual environment:

    • PowerShell
    .\.venv\Scripts\activate
    
  2. Stop only the product instance manager by running the following command:

    • PowerShell
    python .\src\ansys\saf\one_node\main.py -s pim -a stop
    
  3. Start only the product instance manager by running the following command:

    • PowerShell
    python .\src\ansys\saf\one_node\main.py -s pim
    

    Note

    To start the product instance manager, accept the license agreement by typing y.

Cannot execute the Deploy-Platform.ps1 script#

When executing the Deploy-Platform.ps1 script, you get the following error messages:

Script is not digitally signed:
../_images/signed_error.png

To resolve this issue:

  1. Locate Ansys_App_Portal_and_Light_Deployment_Templates.zip

  2. Right-click the zip file and select Properties.

  3. Unblock the file, click Apply and then click OK.

    ../_images/unblock.png
  4. Unzip the Ansys_App_Portal_and_Light_Deployment_Templates.zip.

  5. Continue the steps as defined in Deploy and start the platform.

Corrupt virtual environment#

If you receive the following messages, it means that your virtual environment is corrupt.

Access is denied to the virtual environment activation script:
../_images/access-denied-to-venv-activation-script.png
Access is denied to the virtual environment files:
../_images/access-denied-to-venv-files.png

To resolve these issues:

  1. Close all running terminals where the platform script was launched.

  2. Navigate to the root directory of the platform and manually delete the .venv directory.

  3. Continue the steps described in Deploy and start the platform.

Cannot execute the Start-Platform.ps1 script after operating system is restarted#

If you receive the following error message when executing the Start-Platform.ps1 script after restarting the operating system:

<port> is in use, please release it and try starting the platform again.

../_images/os_restart_port_busy.png

To resolve this issue:

  1. Identify the process that is using the port by running the following command in PowerShell:

    • PowerShell
    netstat -ano | findstr :<port>
    
  2. Note the PID of the process that is using the port.

  3. Terminate the process by running the following command in PowerShell:

    • PowerShell
    taskkill /pid <PID> /F
    
  4. Execute the Start-Platform.ps1 script again.