Migrating portal to new machine: error attempting to join the existing portal

546
7
12-31-2019 04:12 AM
TobiSellekaerts
New Contributor III

I am attempting to migrate our portal from one machine to another using the instructions here:

Migrate to new machines—Portal for ArcGIS (10.6) | ArcGIS Enterprise 

In the section 'Migrate a machine running Portal for ArcGIS', step 3, I'm encountering an error.  Here's the setup:

I have Server A, our current portal, and Sever B, our new portal.  I copied C:\\arcgisportal\content (from the C: drive on Server A) to a shared folder and changed the portal directory to the new location.  (I created a new portal item on Server A and visually confirmed that the item was created on the shared folder, and not in C:\arcgisportal.)  On this site:

Changing the portal content directory—Portal for ArcGIS (10.6) | ArcGIS Enterprise 

it states that I'm only able to move the content directory, and not the index, db, or temp directories, to a network share.  So those directories are still in C:\arcgisportal on Server A.  (And the directions only state to move the content directory, and not the others.)

So back to step 3, which says 'Sign in to the new machine's ArcGIS Portal Administrator Directory, click Join Site, and provide the existing portal URL (in the format https://portalhost.domain.com:7443) and the credentials to its primary site administrator account. ** Both the old and new machines are joined to the portal.'. At the **, I'm getting the following error message:

'Error: There was an error when attempting to join the existing portal. Cannot read from directory path "C:\arcgisportal". Please check that the location is valid and that the Portal service account has permissions to the location.' 

What is it looking for in C:\arcgisportal?

- content has been moved

- the directions didn't say to move db, temp, or index

I've restarted Portal for ArcGIS, restarted Server A, and checked permissions on the new location of content without success.

One wrinkle is that Server A is running 10.6.1. Server B is running 10.7.1.  I need to upgrade and move the portal.  My attempts to upgrade Server A in place have all failed, so I was hoping to do both in one go. 

Many thanks.

UPDATE: I left Server A configured to point to the content folder on the shared drive. I renamed C:\arcgisportal\content to C:\arcgisportal\content_old when I migrated the content to the shared drive.  A few hours later, the portal on server A was behaving a bit strange - the 'featured maps and apps' section on the main page wasn't drawing. (It may have been doing this earlier.)  In the portaladmin, it still shows it's configured to point to {networkShare}\arcgisportal\content. However, when I login to Server A, I find it has created a new folder C:\arcgisportal\content (!!!).  It's like the configuration shows it's pointing to the shared drive, but somewhere it's holding on to the previous location of C:\arcgisportal\content and not finding it, recreated it.

0 Kudos
7 Replies
JonathanQuinn
Esri Frequent Contributor

First, the two portals must be on the same version, so you won't be able to join the 10.7.x portal to the 10.6.x portal.

Second, when you installed Portal on Server B, did you use the C:\arcgisportal for the default directory during the install? If not, the account used to run the service will attempt to create the C:\arcgisportal directory on Server B if it has permissions to. There's a bug to improve the error returned if either the default directory path on Server A doesn't exist on Server B or the path can't be created. Server B will want to use the same path for the index, db and temp directories as Server A.

I would start by making sure the versions are the same. Is this a base deployment, all on one machine? Another approach is to use the DR tool to move the entire configuration to the new machine, so you can upgrade the new environment separately from your primary environment:

Migrate to a new machine in ArcGIS Enterprise using the WebGIS DR tool 

0 Kudos
TobiSellekaerts
New Contributor III

Thank you very much for the answer.

The machine 'spontaneously' recreating C:\arcgisportal\content is Server A, the existing deployment, and not the new install.  (I've rolled that machine back now so we are functional again.)

I have uninstalled 10.7.1 from Server B and am doing a fresh install of 10.6.1 now.  I'm going to try the WebGIS DR tool method and will get back to the thread with the results.

0 Kudos
TobiSellekaerts
New Contributor III

Solution path 1: I have installed 10.6.1 on Server B (to avoid the version mismatch) and attempted to join the portal, and am getting the same error: "'Error: There was an error when attempting to join the existing portal. Cannot read from directory path "C:\arcgisportal". Please check that the location is valid and that the Portal service account has permissions to the location.' I don't see anything in the logs of Server A.  The logs for Server B show the same error message, followed by:

Join site failed; reverting Join site configuration on local machine.

The process monitor did not find the connection of the configuration store.  The site may not have been initialized. After the site is initialized, the check for database processes will be reattempted.

Starting process monitor.

Starting watchdog thread run.

Solution path 2: I used WebGIS DR to backup my site from Server A, and it backed up everything (looked successful based on run time and backup file size): Portal, Hosting Server, Data Store, and the GIS servers.   I installed 10.6.1 on Server B, and finished the portal configuration silently.  I then restored the backup using WebGIS DR, which ran for about an hour without an error.  However, when I opened the portal site on Server B, it was a new empty site.  Should I have not finished the portal configuration before restoring the backup?

Thanks again for your help.

0 Kudos
JonathanQuinn
Esri Frequent Contributor

For solution 1, it still sounds like you're running into BUG-000104178 - Improve the error message when configuring Portal HA fails due to mismatched locations of the arcgisportal folder. Can you confirm that the dir.tmp, dir.logs, dir.db, and dir.index properties within <install dir>\framework\etc\portal-config.properties match between the portal machines? Can you confirm that the content directory is set to a share within https://portal.domain.com:7443/arcgis/portaladmin/system/directories/content? If you were to create an item, can you make sure it is written to the share?

For solution 2, you need to fully set up the site before running a restore. This means creating the Portal and Server sites, registering the Data Store, Web Adaptors, and federating. Did the output indicate that all components were restored correctly?

0 Kudos
TobiSellekaerts
New Contributor III

Thank you for the feedback. 

Solution 1: On server A, the 'old' server, the portal install directory is on the C: drive.  On the new server, it is on the E: drive (this is out of my control, and has been dictated by the IT support shop).  So the location of <install dir>\framework\etc\portal-config.properties is different between the two machines.  Does this mean that this process will fail? EDIT: spoke with Anthony Giles who informed me this will indeed cause it to fail, so I'm abandoning Solution 1.  On to solution 2!

Solution 2: I did not fully set up the site (i.e. federation, data store) before attempting the restore. It did not restore correctly.  EDIT: will this fail as well due to the install directory mismatch?

Solution 3: I've been sent a link to some python (using the ArcGIS API for Python) which would allow me to migrate content and users from one portal to another; I have this as another potential solution.

0 Kudos
TobiSellekaerts
New Contributor III

We've given up trying to migrate our content to a new portal server.  We've tried joining the existing portal, and also tried using WebGISDR to backup/restore, both without luck.  We're now trying to build a new portal from scratch on the new machine.

0 Kudos
JonathanQuinn
Esri Frequent Contributor

Do you recall what errors you were getting when you tried the approaches? Did you reach out to Tech Support? If so, do you have the case numbers? I'd like to understand why things failed.

0 Kudos