This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
Unable to install K2 5.0 Language Pack with an error logged during installation on the Language Pack Installation/K2 Site step.
You are unable to install K2 5.0 Language Pack with an error logged during installation on the Language Pack Installation/K2 Site step. Installer trace contains the following lines with "Logged Error" tag:
Component.ExecuteTarget: Logged Error: Target did not complete successfully: German - Site - Globalization
WorkerPanel.Execute:Logged Error: Component update failed: K2 Workspace
Below you can find steps to troubleshoot the specific issue described above. But these steps also can be considered as generic guidance on how to analyze installer trace errors.
Let's consider the troubleshooting process step by step:
1. Your K2 environment by itself works fine yet the K2 Language Pack installation fails. We start by opening the installer trace log using the link provided on the final page of the Setup Manager wizard:
2. Once the trace file is open we can start searching for any errors or warnings using keywords "Logged Error" and "Logged Warning".
When analyzing installer traces always start with performing searches using the following keywords "Logged Warning" and "Logged Error" and make sure you address / understand all of these errors.
Quite frequently when trace contains errors tagged "Logged Error" it is necessary to review trace very carefully as lines which are tagged by the "Logged Error" tag only represent some failed logical step during installation processes, whereas real error and root cause of this failure can precede this error in a trace log.
In this case the first entry tagged with "Logged Error" tag says "Target did not complete successfully: German - Site - Globalization":
And if we continue searching using the same key word we will also see a second error logged:
It makes sense to focus on the very first error entry as all subsequent errors may be just a result of the first error and we need to look at the lines preceeding to it to understand what exactly is failing as lines which are tagged by the "Logged Error" tag only represent some failed logical step during the installation process whereas real error and root causes of this failure can precede this error in the trace log.
In this case, right above the "Target did not complete successfully: German - Site - Globalization" error line we can see that the following command is failing:
"ProcessWrapper.ExecuteAppCmd: Execute AppCmd.exe with arguments: set config "[K2SITENAME]" /section:globalization /uiculture:de
ProcessWrapper.ExecuteAppCmd: Process Output: ERROR ( message:Cannot find SITE object with identifier "[K2SITENAME]". )"
But it is still not possible to see the root cause based on this error. We see that the K2 site has the default site name, it is reachable and placed on the same server as the other K2 components. You can even execute the same command manually and see that it completes without any issues (providing you replace [K2SITENAME] with appropriate values.
3. As it is still unclear why we are getting an error, we need to scroll up in the log searching for other errors which might possibly cause the error we saw. And in this case we can find the following error:
This is the actual error which triggered installation failure which is logged in the very beginning of the installation trace. The error message says:
"DatabaseFunctions.GetSQLVersion: Could not get version from SQL: System.Data.SqlClient.SqlException (0x80131904): Cannot open database "K27" requested by the login. The login failed. Login failed for user 'DENALLIX\Administrator'."
We see that in this case the Setup Manager used the incorrect K2 database name ("K27" instead of "K2").
4. How can the K2 Setup Manager fail to connect to the K2 database/use the wrong name while the environment itself connected to the database and works fine? It can happen when the environment \Setup\Configuration.config file has the wrong database name in the connection string:
This connection string has no impact on the running environment, yet it is one which K2 installers are using to pull all the settings on the early setup stages before we explicitly point our setup to the K2 database. In most environments, these settings are always correct as they are populated with appropriate settings after the initial install and this connection string can only have a wrong setting if it has been edited manually or if the K2 database was renamed (though we normally re-run the Setup Manager after this and it updates this setting too).
A wrong connection string makes it impossible for the K2 Language Pack installer to pull the required information from the K2 database, in particular the value of the variable [K2SITENAME] which was triggering this error:
"ProcessWrapper.ExecuteAppCmd: Execute AppCmd.exe with arguments: set config "[K2SITENAME]" /section:globalization /uiculture:de ProcessWrapper.ExecuteAppCmd: Process Output: ERROR ( message:Cannot find SITE object with identifier "[K2SITENAME]". )"
Once you update the Configuration.config file the K2 Language Pack installation will work without any errors.
In addition to the installer trace log analysis approach described above you may use the K2 Configuration Analysis tool to make sure that it reports no errors. For example in the described scenario some of Configuration Analysis tasks for the K2 Site will fail too. In case your K2 environment has strange issues be sure to run the K2 Configuration Analysis tool and resolve reported warnings.