Known Issue: K2 5.6 upgrade failing on the configuration service.

  • 20 April 2023
  • 0 replies
  • 1711 views

Badge +4
 

 Known Issue: K2 5.6 upgrade failing on the configuration service.

KB003704

PRODUCT

Automation On-Prem

BASED ON

Automation On-Prem

 

Issue

When upgrading from an earlier version of K2 Five to K2 5.6 the upgrade might fail during the service configuration due to a .NET 6.0 change.    

Error

Multiple errors can be encountered due to this issue. The errors below are an example:

Error in the install logs when trying to upgrade to K2 5.6: “System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:5560”.
Error in the K2 Configuration API logs: “Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The target principal name is incorrect.)”

Resolution

These steps need to be completed before upgrading to K2 5.6. If you upgrade to 5.6 and do not complete the steps, support will need to assist in getting the values in the correct state for the failing upgrade.

 

Follow the steps below if you haven’t upgraded to K2 5.6.

  1. If you use a Microsoft Azure SQL Database configured with Azure Private Link, then you must use the standard FQDN (Fully qualified domain name) for the connection, such as xx.database.windows.net .  https://techcommunity.microsoft.com/t5/azure-database-support-blog/azure-sql-db-private-link-private-endpoint-connectivity/ba-p/1235573 
     
  2. Run the script attached to this article to ensure that the added parameters are there. 
    • If you are upgrading from K2 5.3 and earlier, then use the “Re-encryption script to add values for upgrading to K2 5.6 pre K2 5.4” script.
    • If you are upgrading from K2 5.4 and later then use the “Re-encryption script to add values for upgrading to K2 5.6 post K2 5.4” script.
    • If you’re using a custom encryption password from the article below, then you will change the password (OPEN MASTER KEY DECRYPTION BY PASSWORD =*********) in the script  

       

  3. If you’re on a version of K2 5.2 or earlier, you can skip step 3. 
    Update your K2ConnectionString in the appsettings.Production.json file located in [INSTALLDIR]\K2\SourceCode.Configuration.Api. In the file locate the non-encrypted connectionstring value for the K2 Configuration service, then add Encrypt=True;TrustServerCertificate=True to the K2ConnectionString. 
     
  4. Update the file Configuration.config in [INSTALLDIR]\K2\Setup. Pre K2 5.6 this file is not encrypted.
     
  5. Edit the file and add the extra parameters Encrypt=True;TrustServerCertificate=True to the connectionstring called HostServerDB.
     
  6. Save the changes and copy and replace this file in location [INSTALLDIR]\K2\Setup.
     
  7. Save the changes and proceed with the K2 5.6 upgrade.

 

Follow the steps below to install FixPacks if you have upgraded to K2 5.6 and applied the steps above.

  1. In location [INSTALLDIR]\K2\Setup find the file Configuration.config.
     
  2. Contact support to help decrypt the Configuration.config file from the above location.
     
  3. Once decrypted edit the file and add the extra parameters Encrypt=True;TrustServerCertificate=True to the connectionstring called HostServerDB.
     
  4. Save the changes and copy and replace this file in location [INSTALLDIR]\K2\Setup.
     
  5. Run the installer.

 

Considerations

  • Azure SQL
  • If you perform a reconfigure and click OK on the Database Configurations screen, it will overwrite the values within the Database and SourceCode.Configuration.Api.dll.config, even if no changes were made. Support will need to be contacted to rectify this issue.

 


0 replies

Be the first to reply!

Reply