Closed thk70 closed 3 years ago
Hi @thk70 ,
The default timeout for windows_package Resource is 600 seconds (10 minutes):
https://docs.chef.io/resources/windows_package/
Try adding 'timeout' to the below snippet:
For example:
# get all patches within the specified folder and register them
Dir.glob("#{patch_folder}/**/*").each do |patch|
windows_package "Install #{patch}" do
action :install
source patch
installer_type :custom
options '/qn'
timeout 600
end
end
Increase the 600 as needed.
Have you tried manually running the patch? Maybe its timing out due to an error that isn't being caught due to it silently being installed /qn. Can also check Windows Event Viewer Application logs to see if there are any messages that may provide a clue as to why its timing out.
Hi, The packages are for portal 10.7 and named ArcGIS-107-PFA-PSFD-Patch.msp ArcGIS-107-PFA-SEC2020U1-Patch.msp
They install manually without issues. They take approx. 12 and 20 minutes to finish.
Increasing the time as you suggested was a success: Running handlers complete [0mChef Client finished, 3/3 resources updated in 33 minutes 36 seconds[0m
Perhaps this timeout setting should be changed overall, or implemented as an option in the receipts/roles?
Thanks @thk70 glad to hear increasing the timeout worked. We will increase the timeout to 3600 (60 minutes) in the next release of the cookbook.
Hello @thk70 ,
We have addressed this issue in v370:
https://github.com/Esri/arcgis-cookbook/releases/tag/v3.7.0
Thanks!
Hi Some patches cannot be installed due to a timeout issue:
_Mixlib::ShellOut::CommandTimeout: arcgis_enterprise_patches[Install ArcGIS Enterprise Patches] (arcgis-enterprise::patches line 20) had an error: Mixlib::ShellOut::CommandTimeout: windows_package[Install E:/patches/ArcGIS-107-PFA-PSFD-Patch.msp] (E:/chef_cache/cookbooks/arcgis-enterprise/providers/patches.rb line 28) had an error: Mixlib::ShellOut::CommandTimeout: command timed out: ---- Begin output of start "" /wait "e:\patches\arcgis-107-pfa-psfd-patch.msp" /qn & exit %%%%ERRORLEVEL%%%% ---- STDOUT: STDERR: ---- End output of start "" /wait "e:\patches\arcgis-107-pfa-psfd-patch.msp" /qn & exit %%%%ERRORLEVEL%%%% ----
ProcessId: 8532 app_name: C:\Windows\system32\cmd.exe commandline: cmd /c "start "" /wait "e:\patches\arcgis-107-pfa-psfd-patch.msp" /qn & exit %%%%ERRORLEVEL%%%%" timeout: 600
Maybe 10 minutes is a bit short for some patches? Can I increase the timeout manually - like a parameter etc.?