arcgis-cookbook icon indicating copy to clipboard operation
arcgis-cookbook copied to clipboard

Unable to generate token.

Open J0ss1 opened this issue 6 years ago • 4 comments

hello i have a issue whit the arcgis cookbook and i am not sure what i am doing wrong here is the error text: `* arcgis_enterprise_portal[Configure HTTPS] action configure_https

       ================================================================================
       Error executing action `configure_https` on resource 'arcgis_enterprise_portal[Configure HTTPS]'
       ================================================================================

       RuntimeError
       ------------
       Unable to generate token.

       Resource Declaration:
       ---------------------
       # In C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/arcgis-enterprise/recipes/portal.rb

       103: arcgis_enterprise_portal 'Configure HTTPS' do
       104:   portal_url node['arcgis']['portal']['url']
       105:   username node['arcgis']['portal']['admin_username']
       106:   password node['arcgis']['portal']['admin_password']
       107:   keystore_file node['arcgis']['portal']['keystore_file']
       108:   keystore_password node['arcgis']['portal']['keystore_password']
       109:   cert_alias node['arcgis']['portal']['cert_alias']
       110:   not_if { node['arcgis']['portal']['keystore_file'].empty? }
       111:   retries 5
       112:   retry_delay 30
       113:   action :configure_https
       114: end
       115:

       Compiled Resource:
       ------------------
       # Declared in C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/arcgis-enterprise/recipes/portal.rb:103:in `from_file'

       arcgis_enterprise_portal("Configure HTTPS") do
         action [:configure_https]
         default_guard_interpreter :default
         declared_type :arcgis_enterprise_portal
         cookbook_name "arcgis-enterprise"
         recipe_name "portal"
         retries 5
         retry_delay 30
         portal_url "https://localhost:7443/arcgis"
         username "vagrant"
         password "vagrant"
         keystore_file "C:\\domain_com1.pfx"
         keystore_password "test"
         cert_alias "domain.com"
         not_if { #code block }
       end

       System Info:
       ------------
       chef_version=13.11.3
       platform=windows
       platform_version=10.0.14393
       ruby=ruby 2.4.4p296 (2018-03-28 revision 63013) [x64-mingw32]
       program_name=C:/opscode/chef/bin/chef-client
       executable=C:/opscode/chef/bin/chef-client


   Running handlers:
   [2019-01-14T01:08:52-08:00] ERROR: Running exception handlers
   Running handlers complete
   [2019-01-14T01:08:52-08:00] ERROR: Exception handlers complete
   Chef Client failed. 5 resources updated in 01 hours 32 minutes 50 seconds
   [2019-01-14T01:08:52-08:00] FATAL: Stacktrace dumped to C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/chef-stacktrace.out
   [2019-01-14T01:08:52-08:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
   [2019-01-14T01:08:52-08:00] FATAL: RuntimeError: arcgis_enterprise_portal[Configure HTTPS] (arcgis-enterprise::portal line 103) had an error: RuntimeError: Unable to generate token.

------Exception------- Class: Kitchen::ActionFailed Message: 1 actions failed. Converge failed on instance . Please see .kitchen/logs/portal-windows-2016.log for more details

Please see .kitchen/logs/kitchen.log for more details Also try running kitchen diagnose --all for configuration`

J0ss1 avatar Jan 14 '19 09:01 J0ss1

Was it a new install or an upgrade of Portal for ArcGIS?

Are https://localhost/portal/sharing/rest/generateToken and https://localhost:7443/arcgis/sharing/rest/generateToken URLs available?

pbobov avatar Jan 14 '19 16:01 pbobov

hello this is new install and both URLs are unavailable

J0ss1 avatar Jan 17 '19 08:01 J0ss1

I'm getting this issue as well, on a fresh installation. I see it during Authorize Portal for ArcGIS. Neither generateToken URLs are available, both return 404

tomrussell avatar Sep 15 '19 08:09 tomrussell

Similar issue, I can obtain an authentication token when sending data to my personal ESRI account, but not when I send it to my organization's enterprise account.

Trying to send data to an ESRI data table from an internal application. Following the same process with both accounts. Below is the result when I send data to my enterprise account.

{ "error" : { "code" : 499, "message" : "Token Required", "messageCode" : "GWM_0003", "details" : [ "Token Required" ] } }

silvajm31 avatar May 12 '21 21:05 silvajm31