Esri / arcgis-cookbook

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

Portal licensing upgrade issue #257

Open drobinson13 opened 3 years ago

drobinson13 commented 3 years ago

Hi,

I'm receiving the following error trying to upgrade from 10.6 to 10.8.1, using v3.6.0 of the cookbooks.

Running handlers: [2020-09-10T12:37:19+01:00] ERROR: Running exception handlers Running handlers complete [2020-09-10T12:37:19+01:00] ERROR: Exception handlers complete Chef Client failed. 3 resources updated in 45 seconds [2020-09-10T12:37:20+01:00] FATAL: Stacktrace dumped to c:/chef/local-mode-cache/cache/chef-stacktrace.out [2020-09-10T12:37:20+01:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report [2020-09-10T12:37:20+01:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: arcgis_enterprise_portal[Authorize Portal for ArcGIS] (arcgis-enterprise::portal line 49) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1' ---- Begin output of "C:\Program Files\Common Files\ArcGIS\bin\SoftwareAuthorization.exe" /VER 10.8.1 /LIF "C:\Temp\portal1081.json" /S ---- STDOUT: Error authorizing with the following file

Initially i thought it was due to line 51 of portal.rb containing a new parameter that hadn't been defined in the node.json: authorization_file_version node['arcgis']['portal']['authorization_file_version'] However populating it with "10.8.1" - the upgrade still fails. I suspect the issue is the use of SoftwareAuthorization.exe, which is usually utilised for licensing Server from .prvc (and older versions of Portal), rather the import JSON license method 10.7.x - onwards?

cameronkroeker commented 3 years ago

Hi @drobinson13 ,

In your json file ensure to specify the following attribute:

node['arcgis']['portal']['user_license_type_id'] = Portal for ArcGIS administrator user license type Id.

10.7+ uses user type license and the cookbook will validate the license and pass it through the portal create site api to do the authorization. Otherwise it will use the software authorization tool.

https://github.com/Esri/arcgis-cookbook/blob/master/cookbooks/arcgis-enterprise/recipes/portal.rb#L47

and

https://github.com/Esri/arcgis-cookbook/blob/master/cookbooks/arcgis-enterprise/providers/portal.rb#L250-L278

By default if the node['arcgis']['portal']['authorization_file_version'] is not definded in the json file it will use the node['arcgis']['version']:

https://github.com/Esri/arcgis-cookbook/blob/master/cookbooks/arcgis-enterprise/attributes/portal.rb#L80

drobinson13 commented 3 years ago

Hi @cameronkroeker - i had spotted that one as well!

"user_license_type_id" : "creatorUT"

Still the same issue.

pbobov commented 3 years ago

Portal for ArcGIS 10.8.1 should not run SoftwareAuthorization tool because the software authorization process in 10.8.1 uses portal admin API. Something went wrong with the licensing type check at https://github.com/Esri/arcgis-cookbook/blob/master/cookbooks/arcgis-enterprise/providers/portal.rb#L257.

Please check if isUserTypeLicensing value returned by /arcgis/portaladmin?f=json request is true and that the version of Portal for ArcGIS returned by portaladmin is 10.8.1. (See https://github.com/Esri/arcgis-cookbook/blob/master/cookbooks/arcgis-enterprise/libraries/portal_admin_client.rb#L710).

cameronkroeker commented 2 years ago

Hello @drobinson13,

I wanted to follow up to see if any progress has been made with this issue? If not, there is a new release of cookbooks you could try v3.8.0.

Also, looks like another user is running into the same error. Going to tag it incase there is a resolution found:

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

Thanks, Cameron K.