Esri / arcgis-cookbook

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

Unable to generate token. #190

Open J0ss1 opened 5 years ago

J0ss1 commented 5 years ago

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`

pbobov commented 5 years ago

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?

J0ss1 commented 5 years ago

hello this is new install and both URLs are unavailable

tomrussell commented 4 years ago

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

silvajm31 commented 3 years ago

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" ] } }