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.
- 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
- 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
- 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.
- Update the file Configuration.config in tINSTALLDIR]\K2\Setup. Pre K2 5.6 this file is not encrypted.
- Edit the file and add the extra parameters Encrypt=True;TrustServerCertificate=True to the connectionstring called HostServerDB.
- Save the changes and copy and replace this file in location SINSTALLDIR]\K2\Setup.
- 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.
- In location tINSTALLDIR]\K2\Setup find the file Configuration.config.
- Contact support to help decrypt the Configuration.config file from the above location.
- Once decrypted edit the file and add the extra parameters Encrypt=True;TrustServerCertificate=True to the connectionstring called HostServerDB.
- Save the changes and copy and replace this file in location INSTALLDIR]\K2\Setup.
- 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.