Esri / arcgis-cookbook

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

Issue with running the cookbook as a base deployment on a single machine #260

Closed agiubleanu closed 3 years ago

agiubleanu commented 3 years ago

Hi,

The windows prerequisites are installed, but when it reaches the portal install phase it throws this error. Any ideea? (Instead of silently installing itself, the self extracting archive is shown to me on desktop; i have used the setup_archive variable).

The command line was: chef-solo -j C:\chef\roles\arcgis-enterprise-windows_mine.json

Anfd here is the console output:

Expected process to exit with [0], but received '2' ---- Begin output of "E:\Portal_for_ArcGIS_Windows_1081_175214.exe" /qn INSTALLDIR="C:\Program Files\ArcGIS\Portal" CONTENTDIR="C:\arcgisportal" USER_NAME="arcgis" PASSWORD="Run_As_Pa$$w0rd" ---- STDOUT: STDERR: ---- End output of "E:\Portal_for_ArcGIS_Windows_1081_175214.exe" /qn INSTALLDIR="C:\Program Files\ArcGIS\Portal" CONTENTDIR="C:\arcgisportal" USER_NAME="arcgis" PASSWORD="Run_As_Pa$$w0rd" ---- Ran "E:\Portal_for_ArcGIS_Windows_1081_175214.exe" /qn INSTALLDIR="C:\Program Files\ArcGIS\Portal" CONTENTDIR="C:\arcgisportal" USER_NAME="arcgis" PASSWORD="Run_As_Pa$$w0rd" returned 2

Resource Declaration:
---------------------
# In c:/chef/local-mode-cache/cache/cookbooks/arcgis-enterprise/recipes/install_portal.rb

 62: arcgis_enterprise_portal 'Install Portal for ArcGIS' do
 63:   install_dir node['arcgis']['portal']['install_dir']
 64:   product_code node['arcgis']['portal']['product_code']
 65:   data_dir node['arcgis']['portal']['data_dir']
 66:   setup node['arcgis']['portal']['setup']
 67:   setup_options node['arcgis']['portal']['setup_options']
 68:   run_as_user node['arcgis']['run_as_user']
 69:   run_as_password node['arcgis']['run_as_password']
 70:   run_as_msa node['arcgis']['run_as_msa']
 71:   if node['platform'] == 'windows'
 72:     not_if { Utils.product_installed?(node['arcgis']['portal']['product_code']) }
 73:   else
 74:     not_if { EsriProperties.product_installed?(node['arcgis']['run_as_user'],
 75:                                                node['hostname'],
 76:                                                node['arcgis']['version'],
 77:                                                :ArcGISPortal) }
 78:   end
 79:   action :install

Compiled Resource:
------------------
# Declared in c:/chef/local-mode-cache/cache/cookbooks/arcgis-enterprise/recipes/install_portal.rb:62:in `from_file'

arcgis_enterprise_portal("Install Portal for ArcGIS") do
  action [:install]
  default_guard_interpreter :default
  declared_type :arcgis_enterprise_portal
  cookbook_name "arcgis-enterprise"
  recipe_name "install_portal"
  install_dir "C:\\Program Files\\ArcGIS\\Portal"
  run_as_user "arcgis"
  run_as_password "Run_As_Pa$$w0rd"
  product_code "{0803DE56-BAE9-49F5-A120-BA249BD924E2}"
  data_dir "C:\\arcgisportal"
  setup "E:\\Portal_for_ArcGIS_Windows_1081_175214.exe"
  setup_options ""
  run_as_msa false
  not_if { #code block }
end

System Info:
------------
chef_version=14.14.29
platform=windows
platform_version=10.0.14393
ruby=ruby 2.5.7p206 (2019-10-01 revision 67816) [x64-mingw32]
program_name=C:/opscode/chef/bin/chef-solo
executable=C:/opscode/chef/bin/chef-solo

Running handlers: [2020-11-18T09:32:53+02:00] ERROR: Running exception handlers Running handlers complete [2020-11-18T09:32:53+02:00] ERROR: Exception handlers complete Chef Client failed. 1 resources updated in 25 seconds [2020-11-18T09:32:53+02:00] FATAL: Stacktrace dumped to c:/chef/local-mode-cache/cache/chef-stacktrace.out [2020-11-18T09:32:53+02:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report [2020-11-18T09:32:53+02:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: arcgis_enterprise_portal[Install Portal for ArcGIS] (arcgis-enterprise::install_portal line 62) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2' ---- Begin output of "E:\Portal_for_ArcGIS_Windows_1081_175214.exe" /qn INSTALLDIR="C:\Program Files\ArcGIS\Portal" CONTENTDIR="C:\arcgisportal" USER_NAME="arcgis" PASSWORD="Run_As_Pa$$w0rd" ---- STDOUT: STDERR: ---- End output of "E:\Portal_for_ArcGIS_Windows_1081_175214.exe" /qn INSTALLDIR="C:\Program Files\ArcGIS\Portal" CONTENTDIR="C:\arcgisportal" USER_NAME="arcgis" PASSWORD="Run_As_Pa$$w0rd" ---- Ran "E:\Portal_for_ArcGIS_Windows_1081_175214.exe" /qn INSTALLDIR="C:\Program Files\ArcGIS\Portal" CONTENTDIR="C:\arcgisportal" USER_NAME="arcgis" PASSWORD="Run_As_Pa$$w0rd" returned 2

cameronkroeker commented 3 years ago

Hello @agiubleanu,

Would you be able to share your C:\chef\roles\arcgis-enterprise-windows_mine.json file? Feel free to scrub out any of the sensitive information from it. It also may help if you could pass along the chef-run.log or stacktrace.out file. This will give us a picture of what is happening during the action :unpack.

Based on the error you provided its passing the setup archive (Portal_for_ArcGIS_Windows_1081_175214.exe) as the "setup" attribute:

setup "E:\Portal_for_ArcGIS_Windows_1081_175214.exe":

arcgis_enterprise_portal("Install Portal for ArcGIS") do
  action [:install]
  default_guard_interpreter :default
  declared_type :arcgis_enterprise_portal
  cookbook_name "arcgis-enterprise"
  recipe_name "install_portal"
  install_dir "C:\\Program Files\\ArcGIS\\Portal"
  run_as_user "arcgis"
  run_as_password "Run_As_Pa$$w0rd"
  product_code "{0803DE56-BAE9-49F5-A120-BA249BD924E2}"
  data_dir "C:\\arcgisportal"
  setup "E:\\Portal_for_ArcGIS_Windows_1081_175214.exe"
  setup_options ""
  run_as_msa false
  not_if { #code block }
end

Try moving the Portal_for_ArcGIS_Windows_1081_175214.exe into a folder so that its not directly in the root of E:\. For example:

"portal": {
   "setup_archive": "E:\\some_folder\\Portal_for_ArcGIS_Windows_1081_175214.exe"
}

Thanks, Cameron K.

agiubleanu commented 3 years ago

Hi Cameron,

Thx for the suggestion. I got it working, by using the setup variable after extracting the archive and modifying the paths ( e.g. i extracted "E:\some_folder\Portal_for_ArcGIS_Windows_1081_175214.exe" to Documents , changed the setup_archive to setup variable and pointed it to the extracted location in the Documents folder ). Thx for the support, i consider this issue resolved.

cameronkroeker commented 3 years ago

Hi Cameron,

Thx for the suggestion. I got it working, by using the setup variable after extracting the archive and modifying the paths ( e.g. i extracted "E:\some_folder\Portal_for_ArcGIS_Windows_1081_175214.exe" to Documents , changed the setup_archive to setup variable and pointed it to the extracted location in the Documents folder ). Thx for the support, i consider this issue resolved.

@agiubleanu glad to hear you got it working by pre-extracting the setup archive and using the setup variable instead of setup_archive. Very strange though that we couldn't get the setup_archive working. If you wish to revisit this please feel free to re-open.

Thanks, Cameron K.