Qlik Community

Deployment & Management

Discussion board where members learn more about Qlik Sense Installation, Deployment and Management.

Announcements
QLIKWORLD LIVE! MAY 16 - 19TH, EARLY BIRD DISCOUNTS! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
frankhanhart
Contributor II
Contributor II

Failed to configure per machine MSI package during upgrade Sept2018 to Sept2019

Hello, I've been struggling to get our Qliksense September 2018 installation to update properly to September 2019 on a Windows 2016 Standard server.

The upgrade process seems to run fine and in the installation logs I see all .MSI's getting installed properly, except the ServiceDispatcher. It is during the installation of this .MSI that I get the error 0x80070643 as shown in the log snippet below.

I've ran SFC and DISM to correct any missing install files for .NET or MSI installer and they both without reporting any issues. I found a post which mentioned that .NET Framework 4.8 might be at fault, but this isn't installed.

After rolling back the Qliksense installation is not complete and only a few services still exist. I have to revert to a snapshot of the server made previously, in order to get the system back online again.

I can't seem to find any solution that works for this and would appreciate any help ! 

 

[2640:2694][2019-10-21T17:38:30]i000: Starting execution of ServiceDispatcher
[0350:2F00][2019-10-21T17:38:30]i301: Applying execute package: ServiceDispatcher, action: Install, path: C:\ProgramData\Package Cache\{2C6EF3BF-EA35-47CB-B09F-D07340A2CEB9}v13.42.1\ServiceDispatcher.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" SERVICEUSER="evd\a-unit4-qlik" USERPASSWORD="*****" BURN="1" INSTALLDIR="C:\Program Files\Qlik\Sense\" MODIFY="0" SKIPSTARTSERVICES="0" LASTSERVICE="QlikSensePrintingService" CONFIGSERVICES="1" DBPASSWORD="*****" USINGPOSTGRESQL="" RANDOMPASSWORD="*****" SKIPDBCONFIG="0" DBHOSTNAME="localhost" DBPORT="4432" DBLIMITEDUSERNAME="qliksenserepository" INSTALLDB="" SKIPINSTALLDBSERVICE="1" ENCODEDUSERPASSWORD="*****" FAIL="" INSTALLTYPE="Upgrade" UPGRADEHYBRIDSERVICES="1"'
[2640:2694][2019-10-21T17:56:52]i000: In Update Progress: 36
[2640:2694][2019-10-21T17:57:18]i000: In Update Progress: 37
[2640:2694][2019-10-21T17:58:07]i000: In Update Progress: 38
[2640:2694][2019-10-21T17:58:52]i000: In Update Progress: 39
[2640:2694][2019-10-21T17:59:44]i000: In Update Progress: 40
[2640:2694][2019-10-21T18:01:46]i000: In Update Progress: 41
[0350:2F00][2019-10-21T18:28:06]e000: Error 0x80070643: Failed to install MSI package.
[0350:2F00][2019-10-21T18:28:06]e000: Error 0x80070643: Failed to execute MSI package.
[2640:2694][2019-10-21T18:28:06]e000: Error 0x80070643: Failed to configure per-machine MSI package.
[2640:2694][2019-10-21T18:28:06]i000: Detected failing msi: ServiceDispatcher
[2640:2694][2019-10-21T18:28:06]i319: Applied execute package: ServiceDispatcher, result: 0x80070643, restart: None
[2640:2694][2019-10-21T18:28:06]e000: Error 0x80070643: Failed to execute MSI package.
[2640:2694][2019-10-21T18:28:06]i000: ProgressTypeMajorUpgrade
[2640:2694][2019-10-21T18:28:06]i000: Starting rollback execution of ServiceDispatcher

Labels (3)
1 Solution

Accepted Solutions
frankhanhart
Contributor II
Contributor II
Author

Post above  did the trick.

Prior to upgrade from older version of Qliksense to a recent one, add the lines below to the appsettings.json file in C:\Program Files\Qlik\Sense\HybridDeploymentService :

"LocalBearerToken": {
"SigningAlgorithm": "RS256",
"Certificate": "C:\\ProgramData\\Qlik\\Sense\\Repository\\Exported Certificates\\.Local Certificates\\server.pem",
"PrivateKey": "C:\\ProgramData\\Qlik\\Sense\\Repository\\Exported Certificates\\.Local Certificates\\server_key.pem"
},

The installation tries to read these settings and set them again. The last step fails. After adding these values, the installation finalized succesfully, and I could start upgrading the apps.

 

Hopefully these posts will help somebody facing a similar issue !

 

 

View solution in original post

5 Replies
frankhanhart
Contributor II
Contributor II
Author

Additional information; I found the snippet belowe in the ServiceDispatcher.log file which might be the trigger to start a roll-back. I checked the .PS1 script and it actually uses a JSON file to create an object. The Certificate property actually exists under $appsettings.Encryption.Certificate, so I don't understand why this error pops up.

 

CAQuietExec: AppDistributionService configuration successful.
MSI (s) (D8:84) [18:22:02:971]: Executing op: CustomActionSchedule(Action=CA_UpgradeHDS,ActionType=11265,Source=BinaryData,Target=**********,CustomActionData=**********)
MSI (s) (D8:2C) [18:22:03:004]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI584.tmp, Entrypoint: CAQuietExec
CAQuietExec: Entering CAQuietExec in C:\Windows\Installer\MSI584.tmp, version 3.11.2318.0
CAQuietExec: "C:\Windows\system32\\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NonInteractive
CAQuietExec: HybridDeploymentService configuration started.
CAQuietExec: WARNING: Skiping the database initialization. No superuser or password
CAQuietExec: specified.
Reading the settings file.
CAQuietExec: C:\Program Files\Qlik\Sense\HybridDeploymentService\Configure-Service.ps1 : The
CAQuietExec: property 'Certificate' cannot be found on this object. Verify that the propert
CAQuietExec: y exists and can be set.
CAQuietExec: + CategoryInfo : InvalidOperation: (:) , R
CAQuietExec: untimeException
CAQuietExec: + FullyQualifiedErrorId : PropertyNotFound,Configure-Service.ps1
CAQuietExec:
CAQuietExec: Error 0x80070001: Command line returned an error.
CAQuietExec: Error 0x80070001: QuietExec Failed
CAQuietExec: Error 0x80070001: Failed in ExecCommon method
CustomAction CA_UpgradeHDS returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (D8:84) [18:22:04:671]: Note: 1: 2265 2: 3: -2147287035
MSI (s) (D8:84) [18:22:04:673]: User policy value 'DisableRollback' is 0
MSI (s) (D8:84) [18:22:04:673]: Machine policy value 'DisableRollback' is 0
Action ended 18:22:04: InstallFinalize. Return value 3.

frankhanhart
Contributor II
Contributor II
Author

Further investigation, during the ServiceDispatcher installation the logfile says :

File: C:\Program Files\Qlik\Sense\HybridDeploymentService\appsettings.json; Won't Overwrite; Won't patch; Existing file is unversioned but modified.

Our current (Sept2018) appsetings.json file in this location doesn't hold the node :

"LocalBearerToken": {
"SigningAlgorithm": "RS256",
"Certificate": "./server.pem",
"PrivateKey": "./server_key.pem"
}

The Powershell script that is executed during the installation IS updated as per the log :

File: C:\Program Files\Qlik\Sense\HybridDeploymentService\Configure-Service.ps1; Overwrite; Won't patch; Existing file is unversioned and unmodified - hash doesn't match source file

I unpacked all installation files from the SchedulerDispatcher.MSI and took a peek at the updated Configure-Service.ps1 script. In this script they try to set 2 variables based on an object (appsettings) created from the unmodified/not-overwritten appsettings.json file:

$appsettings.LocalBearerToken.Certificate = "$localCertificatesLocation\server.pem"
$appsettings.LocalBearerToken.PrivateKey = "$localCertificatesLocation\server_key.pem"

As this node doesn't  exist in the not-updated appsettings.json file, the Powershell script returns the error in previous post, returning in the MSI returning an error code and the whole rollback starts.

This evening, before trying the upgrade for a 4th time, I will modify the appsettings.json file to hold this LocalBearerToken entry in the current appsettings.json file. This should cause the Configure-Service.ps1 script not to throw an error and hopefully finished the installation succesfully. I will post the outcome.

 

 

 

frankhanhart
Contributor II
Contributor II
Author

Post above  did the trick.

Prior to upgrade from older version of Qliksense to a recent one, add the lines below to the appsettings.json file in C:\Program Files\Qlik\Sense\HybridDeploymentService :

"LocalBearerToken": {
"SigningAlgorithm": "RS256",
"Certificate": "C:\\ProgramData\\Qlik\\Sense\\Repository\\Exported Certificates\\.Local Certificates\\server.pem",
"PrivateKey": "C:\\ProgramData\\Qlik\\Sense\\Repository\\Exported Certificates\\.Local Certificates\\server_key.pem"
},

The installation tries to read these settings and set them again. The last step fails. After adding these values, the installation finalized succesfully, and I could start upgrading the apps.

 

Hopefully these posts will help somebody facing a similar issue !

 

 

ivan_will
Partner
Partner

This issue can be resolved by making sure the account is actually a Service Account.  Even Administrative accounts are NOT service accounts unless specified.

Depending on the Windows OS version you can do the following:

1. Open Administrative Tools (older versions, Control Panel, new versions, click on Start)

2. Select Local Security Policy, expand Local Policies, click on User Rights Assignment

3. Select Act as part of the operating system. If your user is already listed, skip to Step 5

4. Click on Add User or Group and add the desired user account.  Click on Check Names and make note of the entire name, example:  MYHOST\myservice

5. Return to the listing for User Rights Assignment and select Log on as a service, following the same directions as above

6. Close Administrative Tools and return to the Sense installation

6. Using the same exact name that appeared with Check Names, enter the service account name in the User dialog, with the correct password.

ivan_will
Partner
Partner

Second possible resolution might be: 

The issue with the installation may come from using the wrong computer/maschine name! 
Somehow it accepts the user and credentials but then fails, the easiest way is to use the exact name of machine name/user name taken from the properties of a file, security tab and then use the account full name from there.

Hope the above helps.
Stay safe