Portal Change Content Directory Error

996
9
Jump to solution
03-06-2019 12:34 PM
RyanUthoff
Occasional Contributor III

I am in the process of migrating Portal to a new machine. I am following ESRI's documentation to migrate to a new machine, but I am having issues when changing the content directory on the new machine from the shared network location to the local drive of the new machine. This is the error I am receiving in the Portal Administrator Directory after providing the new file path:

com.esri.arcgis.portal.admin.core.PortalException: java.lang.Exception: Rollback: SQLException in put, Batch entry 0 UPDATE cp_container SET parent_container_name=NULL, etag='1551904251440' WHERE container_name='/' was aborted: ERROR: cannot execute UPDATE in a read-only transaction Call getNextException to see other errors in the batch.

Any thoughts on what this could be? 

0 Kudos
1 Solution

Accepted Solutions
JonathanQuinn
Esri Frequent Contributor

Any operation that involves writing to the database, (which happens during joinSite), will fail. Do you have a recovery.conf within the db directory on the machine? If so, try to rename it to recover.conf_bck or something, or move it out of the directory entirely, and restart Portal.

View solution in original post

0 Kudos
9 Replies
DanielCota1
Occasional Contributor

Hi Ryan Uthoff

On the surface, it sounds like this error is alluding to the fact that the underlying database that Portal runs off of is in a read-only mode. As implied, no SQL commands can be done to modify that content directory location. That being said, I did want to ask if this was the documentation you were following:

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

If so, the part that I wanted to emphasize was granting full control permissions to the service account that is running Portal for ArcGIS for the new directory location -- Step 3.

Was this done?

-Daniel

0 Kudos
RyanUthoff
Occasional Contributor III

Hello,

Thank you for your response. I did verify the content directory (both the middle step of the file share location and the final destination of the content directory) have full permissions to the folder. I'm logging into Windows as the same account as the Portal service account is running as, and it has full administrative privileges. I also verified the entire arcgisportal folder has full permissions as well.

I do have a case open with ESRI Technical Support, and the person I am working with watched me follow the migration procedures step by step and he couldn't find anything unusual or anything I'm doing wrong.

0 Kudos
JonathanQuinn
Esri Frequent Contributor

Did you remove the primary/original machine? It sounds like the database on the remaining machine, or new primary, isn't set to read/write, but read-only which is the expected state of the database on the standby.

0 Kudos
RyanUthoff
Occasional Contributor III

If you are referring to step 4 under "Migrate a machine running Portal for ArcGIS" in this article where I unregister the primary/old machine with the new machine, then yes I have done that.

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

0 Kudos
JonathanQuinn
Esri Frequent Contributor

Are you able to create a new item, user or group? Any of those operations write to the database, and if it's in read-only mode, it'll fail.

0 Kudos
RyanUthoff
Occasional Contributor III

I tried to create a new map and I receive the following error message:

Creating the item 'Test1' failed (DBUtil.doUpdateTransaction(): failed, ).

So it does appear to be in read-only mode. Is there any way to get it out of read-only mode? I double checked and the only machine registered with Portal is the new machine. I've already removed the old machine from portal admin. The entire C:\arcgisportal directory also has full permissions to the service account of Portal.

0 Kudos
RyanUthoff
Occasional Contributor III

Also, assuming both machines were registered in Portal Admin, would there a way to be able to trick Portal into thinking the primary machine was down, therefore promoting the standby machine to primary and at least seeing if it allows me to create new content then?

0 Kudos
JonathanQuinn
Esri Frequent Contributor

Any operation that involves writing to the database, (which happens during joinSite), will fail. Do you have a recovery.conf within the db directory on the machine? If so, try to rename it to recover.conf_bck or something, or move it out of the directory entirely, and restart Portal.

0 Kudos
RyanUthoff
Occasional Contributor III

Yes, I do have a recovery.conf. I renamed it and restarted portal, and it now allows me to save content.

Then after doing that, it allowed me to move the content directory back to the local drive of the new machine without giving me the original error message I posted in my original post above. I think that fixed it!

0 Kudos