Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Product install fails when run under System account #36

Closed
robbAtEBSCO opened this issue Aug 2, 2017 · 6 comments
Closed

Product install fails when run under System account #36

robbAtEBSCO opened this issue Aug 2, 2017 · 6 comments
Labels
Stale This is marked as stale and will be closed shortly

Comments

@robbAtEBSCO
Copy link

robbAtEBSCO commented Aug 2, 2017

Cookbook version

4.2.1

Chef-client version

13.2.20

Platform Details

Windows Server 2008 R2

Scenario:

Trying to install 'WDeploy36' package with webpi cookbook.

Steps to Reproduce:

Add webpi_product resource with install action to cookbook and update on Chef Server. Next scheduled run of chef-client will pickup new resource and attempt to run under System account.

Expected Result:

Product is installed successfully.

Actual Result:

Product install fails with errors:

Chef Log:

Install completed (Failure): 'Web Deploy 3.6'
WDeploy_Only_3_6 : Failed.
Error opening installation log file. Verify that the specified log file location exists and is writable
...
Web Deploy 3.6 False
Log Location: C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\Web Platform Installer\logs\install\2017-08-02T12.46.29\WebDeploy_amd64_en-US.txt
...
Web Deploy 3.6 False
Install of Products: FAILURE
STDERR:
---- End output of "WebpiCmd.exe" /Install /products:WDeploy36 /suppressreboot /accepteula /Log:c:/chef/cache/WebPI.log ----
Ran "WebpiCmd.exe" /Install /products:WDeploy36 /suppressreboot /accepteula /Log:c:/chef/cache/WebPI.log returned -1

Event Log:

Failed to end a Windows Installer transaction C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\Web Platform Installer\installers\WDeploy_Only_3_6\7CB7AFE101DE1CDB1A723F6CA3CB554F7D427661\WebDeploy_amd64_en-US.msi. Error 1622 occurred while ending the transaction.

Further notes:

If I run chef-client as my user the install completes successfully. I expect it has something to do with permissions to the System temp directory.

@robbAtEBSCO
Copy link
Author

robbAtEBSCO commented Aug 2, 2017

Found an old post with similar details running Chef in Azure -

https://stackoverflow.com/questions/29723429/chef-webpi-cookbook-fails-install-in-azure

@stuartpreston
Copy link

It's a bit strange because an MSI error 1622 refers to a problem writing a log file. Which is strange because it should be writable by SYSTEM. If you know of a specific workaround we can look at making changes to the cookbook. I'll try and carve out some time to give it a test myself.

@robbAtEBSCO
Copy link
Author

The SO link I posted yesterday has the workaround. THanks!

@robbAtEBSCO
Copy link
Author

This workaround is a bit intrusive as it temporarily changes the AppData path for all users but does set it back to the default after the WebPI install. That being said the alternative is to ask WebPI package authors to update their packages to respect the log path. Many of these package authors are long gone or have moved on to other work and are not likely to fix it. We could make this an optional step and force consumers to explicitly choose to enable it to avoid unintended consequences.

WebPI is a very common package manager on Windows, and I think its important to make this situation easier for those new to Chef on Windows.

@github-actions
Copy link

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

@github-actions github-actions bot added the Stale This is marked as stale and will be closed shortly label Jan 25, 2021
@github-actions
Copy link

github-actions bot commented Feb 2, 2021

Closing due to inactivity. If this is still an issue please reopen or open another issue. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

@github-actions github-actions bot closed this as completed Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale This is marked as stale and will be closed shortly
Projects
None yet
Development

No branches or pull requests

2 participants