Select to view content in your preferred language

Import Portal for ArcGIS site fails: failed to update configuration settings

1874
3
Jump to solution
11-01-2022 03:10 AM
NicolasGIS
Regular Contributor

Hello,

Since I upgraded from 10.9.1 to 11.0, my webgisdr restore tests start failing for Portal for ArcGIS with the error message "Failed to update configuration settings.":

NicolasGIS_0-1667296017552.png

Here is the relevant Portal for ArcGIS logs:

<Msg time="2022-10-29T23:10:30,264" type="INFO" code="209156" >Creating HA configuration files. </Msg>
<Msg time="2022-10-29T23:10:31,39" type="INFO" code="209157" >HA configuration files created.</Msg>
<Msg time="2022-10-29T23:10:31,39" type="INFO" code="209160" >Configuring database for HA. </Msg>
<Msg time="2022-10-29T23:10:54,687" type="INFO" code="209161" >Configured database for HA.</Msg>
<Msg time="2022-10-29T23:10:54,687" type="INFO" code="209062" >Storing the config info of machine for portal HA.</Msg>
<Msg time="2022-10-29T23:10:57,178" type="INFO" code="209063" >Stored the config info of machine for portal HA.</Msg>
<Msg time="2022-10-29T23:10:57,178" type="INFO" code="209064" >Updating the JDBC Url for portal HA.</Msg>
<Msg time="2022-10-29T23:10:57,183" type="INFO" code="209065" >Updated the JDBC Url for portal HA.</Msg>
<Msg time="2022-10-29T23:10:57,183" type="INFO" code="209068" >Updating token config for portal HA.</Msg>
<Msg time="2022-10-29T23:10:57,184" type="INFO" code="209069" >Updated token config for portal HA.</Msg>
<Msg time="2022-10-29T23:10:57,184" type="INFO" code="209066" >Editing the directory for portal HA.</Msg>
<Msg time="2022-10-29T23:10:57,406" type="INFO" code="207017" >'content' directory path updated to '{"provider":"FileSystem","connectionString":"D:\\arcgis\\arcgisportal\\content","type":"fileStore"}'.</Msg>
<Msg time="2022-10-29T23:10:57,551" type="INFO" code="207019" >'content' directory registered with the portal.</Msg>
<Msg time="2022-10-29T23:10:57,551" type="INFO" code="209067" >Edited the directory for portal HA.</Msg>
<Msg time="2022-10-29T23:10:57,551" type="INFO" code="209068" >Updating web adaptor configuration.</Msg>
<Msg time="2022-10-29T23:10:57,554" type="INFO" code="209069" >Updated web adaptor configuration.</Msg>
<Msg time="2022-10-29T23:10:57,576" type="INFO" code="217046" >Starting process monitor.</Msg>
<Msg time="2022-10-29T23:10:57,577" type="INFO" code="217055" >Starting watchdog thread run.</Msg>
<Msg time="2022-10-29T23:10:58,92" type="INFO" code="209201" >Failed to update configuration settings. This connection has been closed.</Msg>
<Msg time="2022-10-29T23:10:58,94" type="SEVERE" code="209044" >Upgrade failed. Failed to update configuration settings.</Msg>
<Msg time="2022-10-29T23:10:58,98" type="INFO" code="209074" >Connection file deleted from disk.</Msg>
<Msg time="2022-10-29T23:10:58,112" type="SEVERE" code="209044" >Upgrade failed. com.esri.arcgis.portal.admin.core.site.migration.MigrationException: Failed to update configuration settings.
at com.esri.arcgis.portal.admin.core.site.migration.managers.MigrationRequestHandler.migrate(MigrationRequestHandler.java:265)
at com.esri.arcgis.portal.admin.core.site.migration.MigrationManager.a(MigrationManager.java:548)
at com.esri.arcgis.portal.admin.core.site.migration.MigrationManager.migrate(MigrationManager.java:159)
at com.esri.arcgis.portal.admin.core.site.migration.MigrationManager.migrateInImportSite(MigrationManager.java:142)
at com.esri.arcgis.portal.admin.core.site.backuprestore.BackupRestore.importSite(BackupRestore.java:1003)
at com.esri.arcgis.portal.admin.rest.site.SiteResource.importSite(SiteResource.java:1179)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

I then tried manually to 'importSite' rather than the full webgisdr process: same issue.

Somehow, it reminded me my previous issue with ArcGIS Server:

https://community.esri.com/t5/high-availability-and-disaster-recovery-questions/arcgis-enterprise-11...

I am doing all my testing with arcgis-powershell-dsc and decided to 'importSite' on a Portal for ArcGIS installed manually: it worked.

Just like in the issue with ArcGIS Server, I thought at first that hostname.properties file was the issue. But actually not. It is also configured when Portal for ArcGIS is installed manually and even preventing ArcGIS Powershell DSC from configuring it did not solve the issue.

So looking at ArcGIS Powershell DSC code, I saw that another file that was edited: hostidentifier.properties located in '$InstallDir\framework\runtime\ds\framework\etc'

https://github.com/Esri/arcgis-powershell-dsc/blob/4a33aabf965e2098699bddc499ce1d05003e992d/Modules/...

After DSC run, it was set like the following:

#Set the host identifier.
#If this property is set, it will be used to identify the current host.
#It can be a host name or IP address. But you need to make sure this name
#or IP is well-known in the network.
#Syntax: hostidentifier=<host-identifier>

hostidentifier=myhostname.company.com

#Set the preferred host identifier when hostidentifier is not set.
#You can set it to 'ip' or 'hostname'. default is hostname.
#WARNING: you should NOT set it to "ip if the ip address
#of your machine will ever change.
#Syntax preferredidentifier=ip | hostname

preferredidentifier=hostname

And if I compare to a manual installation, this file is not configured.

#Set the host identifier.
#If this property is set, it will be used to identify the current host.
#It can be a host name or IP address. But you need to make sure this name
#or IP is well-known in the network.
#Syntax: hostidentifier=<host-identifier>

#hostidentifier=192.168.1.1

#Set the preferred host identifier when hostidentifier is not set.
#You can set it to 'ip' or 'hostname'. default is hostname.
#WARNING: you should NOT set it to "ip if the ip address
#of your machine will ever change.
#Syntax preferredidentifier=ip | hostname

#preferredidentifier=ip

So I commented the configuration just like it is when installed manually, restarted the Portal for ArcGIS, and it worked.

I will remove this configuration from ArcGIS Powershell DSC code as I already maintain my own fork since BUG-000124901 is still not solved but it seems to me that it is a bug/regression from Portal for ArcGIS as Powershell DSC configuration of hostidentifier.properties looks correct to me so why would webgisdr restore failed when this file is configured ?

 

Any thought @ChristopherPawlyszyn or @JonathanQuinn ?

 

Thanks for listening !

 

/cc @CedricDespierreCorporon 

Tags (2)
0 Kudos
2 Solutions

Accepted Solutions
JonathanQuinn
Esri Notable Contributor

This is likely the same problem that causes BUG-000152888 Error, "Upgrade failed. Failed to update configuration settings" upon upgrading the Portal for ArcGIS to 11.0 since the code paths are very similar during importSite and upgrades. This will be included in an upcoming security patch.

View solution in original post

0 Kudos
NicolasGIS
Regular Contributor

FYI, "Portal for ArcGIS Security 2022 Update 2 Patch"  including the fix for BUG-000152888 fixed my issue .

Restauration is now fully fonctional ! What a relief 🙂

Many thanks @JonathanQuinnand @CedricDespierreCorporon

View solution in original post

0 Kudos
3 Replies
JonathanQuinn
Esri Notable Contributor

This is likely the same problem that causes BUG-000152888 Error, "Upgrade failed. Failed to update configuration settings" upon upgrading the Portal for ArcGIS to 11.0 since the code paths are very similar during importSite and upgrades. This will be included in an upcoming security patch.

0 Kudos
NicolasGIS
Regular Contributor

Do you have more info / workaround about it ? I think I was just lucky with my trick as it does not seem to work systematically. Could it be timing issue that can happen from time to time ?

0 Kudos
NicolasGIS
Regular Contributor

FYI, "Portal for ArcGIS Security 2022 Update 2 Patch"  including the fix for BUG-000152888 fixed my issue .

Restauration is now fully fonctional ! What a relief 🙂

Many thanks @JonathanQuinnand @CedricDespierreCorporon

0 Kudos