Analysing chocolatey.log
This part will focus on how to troubleshoot failed chocolatey package installations.
Last updated
Was this helpful?
This part will focus on how to troubleshoot failed chocolatey package installations.
Last updated
Was this helpful?
The following items are required or helpful for troubleshooting:
Log files, especially chocolatey.log
.
Text editor of your choice with advanced search capabilities, recommended: Notepad++, Visual Studio Code.
Package ID of the failed package, like generic-mozilla-firefox
.
Timestamp of failed installation(s) (not mandatory, but helpful).
To find the entry point of the package installation inside the chocolatey.log
use this exact search string (adapt package id accordingly): generic-mozilla-firefox --version=
(if you are sure about the version string you can add it of course, but it is not mandatory)
This way you will find the starting point(s) of the choco process for the installation or upgrade for the given package ID.
The complete line in the log may look like this, instead of upgrade
may also be install
depending of the operation:
This line already contains some important information, like the package version number to be installed, as well as the used params (package arguments configured in the RealmJoin Portal).
The following lines will contain a lot of (non-relevant) debug information, among others, the complete content of chocolateyInstall.ps1 will be printed out.
Inside the debug information you will the two sections RJAppDeployToolkit: Input Environment Variables
and RJAppDeployToolkit: Resulting Variables
. Both section are located next to each other and show variables and values provided by the RJAppDeployToolkit
The acutal package installation script starts after the following log message:
Depending on the package installation script and the state of the client, the first step will usually be a check if the software is already installed. This is done to determine if an uninstallation will be required prior the actual installation. In the logs this can be tracked using one or more of the following log messages:
After the checks and the possible uninstallations have been executed, the main installation of the application will start, indicated by the following log message (filename will differ of course):
The installation will usually start with the download of the binary file. Start and end of the download are represent by the following log messages:
After completing the download, chocolatey will check the hash of the downloaded file and compare it to the expected value. If the hashed match, the setup file will finally be executed. The log message for the execution, can be found by the following log message:
This message includes the filepath to the setup file, as well as the complete command line, including all (silent-)parameters used to start the setup file. It will also help in finding the relevant setup log file path, if offered by the setup file and included in the package script.
After the process has exited, another log message will be written, again including the complete file path and all parameters. Additionally this message will also include the exit code returned by the setup process, the most important indicator for a success- or unsuccessful installation:
Depending on the package, the package installation may now be followed by so called 'postActions', which may be some registry settings, removal of desktop icons, or even running another setup file (starting over with download of that file). The postActions part will be indicated by the following begin and end messages in the log file:
The chocolatey installation process will be closed with the following log message (wording may differ depending of install / upgrade ):