Esri / arcgis-cookbook

Chef cookbooks for ArcGIS
Apache License 2.0
300 stars 116 forks source link

Unable to apply patch #247

Closed ClaesGIS closed 3 years ago

ClaesGIS commented 4 years ago

Hello

Info

Relevant cookbook arcgis-enterprise::patches Cookbook version: 3.5 Arcgis Server version: ArcGIS_Server_Windows_1071_169677 Patch to apply: arcgis-1071-s-sec2020u1-patch.msp Stacktrace.out: stacktrace.out.txt Comment: All paths has been verified and manually installing the patch works

How to reproduce

  1. Configure node['arcgis']['repository']['patches'] so it points to the folder containing the patch
  2. Add arcgis-enterprise::patches to the run list
  3. Run manually or wait for automatic/scheduled run

Let me know if you need any additional information.

EDIT: Put the wrong info regarding ArcGIS Server version

Kind regards Claes

cameronkroeker commented 4 years ago

Hello @ClaesGIS,

The arcgis-1071-s-sec2020u1-patch.msp patch is for ArcGIS Server 10.7.1 (ArcGIS_Server_Windows_1071_169677).

If installing ArcGIS Server 10.6.1 (ArcGIS_Server_Windows_1061_163968) try using patch ArcGIS-1061-S-SEC2020U1-Patch.msp.

https://support.esri.com/en/download/7775

Thanks, Cameron

ClaesGIS commented 4 years ago

Hello @ClaesGIS,

The arcgis-1071-s-sec2020u1-patch.msp patch is for ArcGIS Server 10.7.1 (ArcGIS_Server_Windows_1071_169677).

If installing ArcGIS Server 10.6.1 (ArcGIS_Server_Windows_1061_163968) try using patch ArcGIS-1061-S-SEC2020U1-Patch.msp.

https://support.esri.com/en/download/7775

Thanks, Cameron

Thanks for the reply. I've updated the original post. I accidently put the wrong Version for arcgis server. The correct one (running) is ArcGIS_Server_Windows_1071_169677.

cameronkroeker commented 4 years ago

Hello @ClaesGIS, The arcgis-1071-s-sec2020u1-patch.msp patch is for ArcGIS Server 10.7.1 (ArcGIS_Server_Windows_1071_169677). If installing ArcGIS Server 10.6.1 (ArcGIS_Server_Windows_1061_163968) try using patch ArcGIS-1061-S-SEC2020U1-Patch.msp. https://support.esri.com/en/download/7775 Thanks, Cameron

Thanks for the reply. I've updated the original post. I accidently put the wrong Version for arcgis server. The correct one (running) is ArcGIS_Server_Windows_1071_169677.

Thanks @ClaesGIS for the clarification. For the node['arcgis']['repository']['patches'] directory instead of referencing a UNC shared location (\\fileserver.internal\arcgis-server\install\patches\10.7) could you try a local path (C:\arcgis-server\install\patches\10.7)?

ClaesGIS commented 4 years ago

Local path made no difference. The user running chef-client is the same one as the one running arcgis. The account is part of the local administrator group.

cameronkroeker commented 4 years ago

@ClaesGIS Thanks for trying the local path. I have not been able to reproduce this error, tried both paths local and UNC. The stacktrace.out is indicating the command times out. Are there any errors in the Windows Event viewer that may provide a clue? Also what is the OS version?

thk70 commented 3 years ago

@ClaesGIS Did you ever resolve this? I have the same issue. Log says: * arcgis_enterprise_patches[Install ArcGIS Enterprise Patches] action install (skipped due to only_if) No patches are being installed. Using cookbooks 3.6.1, Chef Client (solo) 14.14.29, ArcGIS Server 10.7 Patch location on E: drive

cameronkroeker commented 3 years ago

@ClaesGIS Did you ever resolve this? I have the same issue. Log says: * arcgis_enterprise_patches[Install ArcGIS Enterprise Patches] action install (skipped due to only_if) No patches are being installed. Using cookbooks 3.6.1, Chef Client (solo) 14.14.29, ArcGIS Server 10.7 Patch location on E: drive

Hi @thk70,

I think the issue you are running into is slightly different. In @ClaesGIS case the command looked to be timing out:

command_line: cmd /c "start "" /wait "\\fileserver.internal\arcgis-server\install\patches\10.7\arcgis-1071-s-sec2020u1-patch.msp"   /qn & exit %%%%ERRORLEVEL%%%%"
timeout: 600

However, in your case it looks like the patch install is being skipped entirely due to the only_if clause:

* arcgis_enterprise_patches[Install ArcGIS Enterprise Patches] action install (skipped due to only_if)

https://github.com/Esri/arcgis-cookbook/blob/ae704a00cef52d34057569e36214f8669d539266/cookbooks/arcgis-enterprise/recipes/patches.rb#L21

Chef must not be detecting any patches to install within the location defined in node['arcgis']['repository']['patches']. Would you be able to share your role json file (feel free to scrub out any sensitive info)? Also, which patches are you trying to install?

Thanks, Cameron K.

thk70 commented 3 years ago

Hi @cameronkroeker,

My role file is very similar to the one in the wiki section: { "arcgis" : { "patches" : { "local_patch_folder" : "E:\installs\Esri_Software\Enterprise\10.7\Server\server-patches" } }, "run_list": [ "recipe[arcgis-enterprise::patches]" ] }

The patch directory contains these files: image

Thanks,

cameronkroeker commented 3 years ago

Thanks @thk70. Instead could you try this?

{ "arcgis" : { "repository" : { "patches" : "E:\\installs\\Esri_Software\\Enterprise\\10.7\\Server\\server-patches" } }, "run_list": [ "recipe[arcgis-enterprise::patches]" ] }

I suspect this example here is incorrect. I am not able to find node['arcgis']['patches']['local_patch_folder'] defined anywhere in the cookbooks. I suspect what is happening is since node['arcgis']['repository']['patches'] is not defined in your json file the cookbooks is looking for the patches here::

https://github.com/Esri/arcgis-cookbook/blob/ae704a00cef52d34057569e36214f8669d539266/cookbooks/arcgis-repository/attributes/default.rb#L29-L30

And since this location does not exist, it is being skipped due to the only_if statement.

Using node['arcgis']['repository']['patches'] within your json file should override this default location and the cookbooks will check for the patches within E:\\installs\\Esri_Software\\Enterprise\\10.7\\Server\\server-patches.

thk70 commented 3 years ago

Great @cameronkroeker - That worked! Thanks!

However I'm getting the commonly error "Access Denied" to the patch files. Can you tell me which User context the script is running?

cameronkroeker commented 3 years ago

Great @cameronkroeker - That worked! Thanks!

However I'm getting the commonly error "Access Denied" to the patch files. Can you tell me which User context the script is running?

Glad to hear that worked, I'll get the wiki patch recipe example updated. From my understanding it should be the account that is running chef client.

Thanks, Cameron K.

thk70 commented 3 years ago

OK, thanks again. It's working now. It's running as the user executing the script (own) which makes sense. Without excessive deep diagnostics I have solved the Access Denied issue by assigning temporary Read Execute to "Everyone" to the patch files. My own account has Full access already.

cameronkroeker commented 3 years ago

The original error in this thread is similar to the following issue, which contains the suggested workaround. In the next release of the cookbook we will be increasing the timeout to 3600 (60 minutes).

https://github.com/Esri/arcgis-cookbook/issues/268