Esri / arcgis-cookbook

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

Error executing action `create_site` on resource 'arcgis_enterprise_portal[Create Portal Site]' #193

Open J0ss1 opened 5 years ago

J0ss1 commented 5 years ago

Hello i have problem with creating a site. And I have tried this for a weeks now, and still i have not had any success. Can someone help me. I am trying to make arcgis for portal, but chef can not make website. i can make website in virtualbox via URL link: https://localhost:7443/arcgis/home/createadmin.html i can add my attributes as well, if needed.

` Resource Declaration:

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

        76: arcgis_enterprise_portal 'Create Portal Site' do
        77:   portal_url node['arcgis']['portal']['url']
        78:   portal_private_url node['arcgis']['portal']['private_url']
        79:   web_context_url node['arcgis']['portal']['web_context_url']
        80:   username node['arcgis']['portal']['admin_username']
        81:   password node['arcgis']['portal']['admin_password']
        82:   full_name node['arcgis']['portal']['admin_full_name']
        83:   email node['arcgis']['portal']['admin_email']
        84:   description node['arcgis']['portal']['admin_description']
        85:   security_question node['arcgis']['portal']['security_question']
        86:   security_question_answer node['arcgis']['portal']['security_question_answer']
        87:   install_dir node['arcgis']['portal']['install_dir']
        88:   #content_dir node['arcgis']['portal']['content_dir']
        89:   content_store_type node['arcgis']['portal']['content_store_type']
        90:   content_store_provider node['arcgis']['portal']['content_store_provider']
        91:   content_store_connection_string node['arcgis']['portal']['content_store_connection_string']
        92:   object_store node['arcgis']['portal']['object_store']
        93:   log_level node['arcgis']['portal']['log_level']
        94:   log_dir node['arcgis']['portal']['log_dir']
        95:   max_log_file_age node['arcgis']['portal']['max_log_file_age']
        96:   upgrade_backup node['arcgis']['portal']['upgrade_backup']
        97:   upgrade_rollback node['arcgis']['portal']['upgrade_rollback']
        98:   root_cert node['arcgis']['portal']['root_cert']
        99:   root_cert_alias node['arcgis']['portal']['root_cert_alias']
       100:   action :create_site
       101: end
       102:

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

       arcgis_enterprise_portal("Create Portal Site") do
         action [:create_site]
         default_guard_interpreter :default
         declared_type :arcgis_enterprise_portal
         cookbook_name "arcgis-enterprise"
         recipe_name "portal"
         install_dir "C:\\Program Files\\ArcGIS\\Portal"
         portal_url "https://localhost:7443/arcgis/home/"
         portal_private_url "https://domain.com:7443/arcgis/home"
         web_context_url "https://domain.com/portal"
         username "admin"
         password "Passw0rd"
         full_name "Administrator"
         email "admin@domain.com"
         security_question "Your favorite ice cream flavor?"
         security_question_answer "bacon"
         content_store_type "fileStore"
         content_store_provider "FileSystem"
         content_store_connection_string "C:\\arcgisportal\\content"
         object_store "null"
         log_level "WARNING"
         log_dir "C:\\arcgisportal\\logs"
         max_log_file_age 90
         upgrade_backup true
         upgrade_rollback true
         root_cert ""
         root_cert_alias ""
       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-21T02:23:13-08:00] ERROR: Running exception handlers
   Running handlers complete
   [2019-01-21T02:23:13-08:00] ERROR: Exception handlers complete
   Chef Client failed. 32 resources updated in 08 minutes 15 seconds
   [2019-01-21T02:23:13-08:00] FATAL: Stacktrace dumped to C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/chef-stacktrace.out
   [2019-01-21T02:23:13-08:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
   [2019-01-21T02:23:13-08:00] FATAL: RuntimeError: arcgis_enterprise_portal[Create Portal Site] (arcgis-enterprise::portal line 76) had an error: RuntimeError: `

best regards

Joosep

pbobov commented 5 years ago

Could you provide the contents of the stacktrace.out file form C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/chef-stacktrace.out?

tomrussell commented 5 years ago

Hi @pbobov

I'm having a similar issue with my installation. We're using the latest cookbook version (3.4.0) to install ArcGIS Enterprise on CentOS, the environment is offline and I've managed to load in the necessary dependencies (Java/ Tomcat, yum packages, etc)

I noticed in the output from @J0ss1 theirs fails after 8 minutes, mine usually takes almost an hour to return anything from the create site stage. Unfortunately I won't be able to provide the full contents of the stacktrace output as extracting files from this environment is a lengthy process, but the top few lines contain the following:

TypeError: portal.rb:60: exception object expected
portal_admin_client.rb:817 in 'raise'
portal_admin_client.rb:817 in 'validate response'
portal_admin_client.rb:126 in 'complete upgrade'
providers/portal in 'block in class from file'

I appreciate this might not be much to go on, but any suggestions would be much appreciated

Nickolaitc commented 5 years ago

Hello @tomrussell,

Could you please provide your Chef template in which you are running your chef deployment off of?

Any chance you could provide the full failure response?

The previous user I noticed was utilizing incorrect information:

portal_url "https://localhost:7443/arcgis/home/" portal_private_url "https://domain.com:7443/arcgis/home"

As we don't need the /home included for the URL and PrivatePortalURL. It could be other information provided however as errors generated when attempting to create a Portal site can be tied to values given.

tomrussell commented 5 years ago

Hi @Nickolaitc - thanks for getting back to me

I'm using the arcgis-enterprise-rhel template, from the 3.4.0 cookbook

We've gotten a little further in our investigation, we've managed to identify that the failure is happening while the initial portal installation is being upgraded with the license file, I can verify that this fails through the web UI as well. In both places I get a 500 error code response with no error message. We also noticed the portal postgres database crashed, is this a likely cause for the error? How do we troubleshoot this?

Nickolaitc commented 5 years ago

Hey @tomrussell

With the 3.4.0 cookbook and the pre-configured roles files, there are still a few things we will need to complete before we can just utilize this file.

An example would be "java". 10.7.x doesn't utilize JDK, it actually utilizes OpenJDK. "java":{ "install_flavor": "openjdk", "jdk_version": "8" },

How is space looking on this CentOS system?

tomrussell commented 5 years ago

The VM is fresh, there's over 70GB free space on there

Would we need to clean install the VM to be able to install Java with the OpenJDK installer? Is there anything else that would need altering for this role file to work correctly?

Nickolaitc commented 5 years ago

@tomrussell that should be plenty of space, but, how is that space allocated to the directories in which we are using for the Enterprise?

It is hard to tell what could need changing. I know something else that could be problematic is the "version" is listed as 10.7 when it should be 10.7.1.

Could you provide the template with your edits?

You shouldn't need a new clean VM. When you run Chef, it should get the OpenJDK for you and install/configure it as well so you shouldn't have to do anything manually. I ran a test with Chef kitchen, when using the oracle java, it will fail out because oracle java requires authentication while as OpenJDK doesn't.

tomrussell commented 5 years ago

Hi @Nickolaitc,

ArcGIS should have the full volume allocated for installation and the data directories

I've attached the Enterprise RHEL template with the modifications I've made to support installing Java and Tomcat without internet access

arcgis-enterprise-rhel.json.zip

Nickolaitc commented 5 years ago

@tomrussell Have you been able to test the Portal .json license in any other Portal for 10.7.1? Can you verify the license is in fact 10.7.1 and not 10.7?

Could you please clarify for us as well: -This is a clean 10.7 installation correct? -When you accessed the Portal UI manually following the installation, did you see "create a new site" or "continue Portal Upgrade"?

tomrussell commented 5 years ago

The installation files I’m using are for 10.7, the license has been verified for that version. Is the 3.4.0 version of the cookbook only supporting 10.7.1?