Esri / arcgis-cookbook

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

Portal automatically switches from FQDN to machine IP #339

Open Ayushyadav19 opened 1 year ago

Ayushyadav19 commented 1 year ago

Hi @cameronkroeker,

I was deploying Portal for ArcGIS v10.9.1 through chef. After the successful execution of the chef script when I tried to access the portal on FQDN URL i.e https://portal.doamin.com:7443/arcgis I was not able to access it.

After digging deeper I found from the chef logs that the machine name and its admin URL are automatically switched to the machine's IP and when I tried to access the portal on the machine's IP I was able to access it. But I wasn't able to figure out the root cause behind it.

Can you please help me why the portal automatically moved to the machine's IP from FQDN?

For reference, I am attaching the portal chef script, debug logs and portaladmin screenshot. Kindly look at line numbers - 657, 661, 989, and 993 in the log file.

Portal.txt

Portal_log.txt

image

Any help will be much appreciated.

Thanks Ayush

cameronkroeker commented 1 year ago

Hi @Ayushyadav19,

Please try the suggestions here:

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

If the deployment is in AWS, the node['arcgis']['configure_cloud_settings'] will default to true, and specify ip address instead of hostname.

Thanks, Cameron K.

Ayushyadav19 commented 1 year ago

Hi @cameronkroeker,

Thanks for the info. Yes, the deployment is in AWS only. I clean and uninstall the portal by following this technical article and after set node['arcgis']['configure_cloud_settings'] to false and re-ran the chef script again it didn't work.

image

I don't know what is causing the issue now.

Please let me know if have any input on this.

Thanks Ayush

cameronkroeker commented 1 year ago

Hi @Ayushyadav19,

Check to ensure the following two files are using hostname rather than ip:

<Portal installation directory>\framework\etc\hostname.properties, and <Portal installation directory>\framework\runtime\ds\framework\etc.

https://enterprise.arcgis.com/en/portal/latest/install/windows/installing-portal-for-arcgis.htm#ESRI_SECTION1_139D5EECE2EF489C84DA7DD2B57A0FCE

The following 2 attributes should be setting those two files:

node['arcgis']['portal']['hostname'] = Host name or IP address of Portal for ArcGIS machine specified in the hostname.properties file. Default value is ''.

node['arcgis']['portal']['hostidentifier'] = Host name or IP address of Portal for ArcGIS machine specified in hostidentifier.properties file. Default value is node['arcgis']['portal']['hostname'].

If you set the chef run logging to debug mode, there should be messages logged indicating what values these files are getting updated to. You can add -l debug -L <path of your choice>/chef-run-debug.log to your chef-solo/chef-client commands and it will log debug messages to a log file.

Thanks, Cameron K.