Problem upgrading to Docker install

20 views
Skip to first unread message

Kevin Klein

unread,
Nov 1, 2022, 3:48:12 PM11/1/22
to dotCMS User Group
So I'm trying to upgrade a binary 5.3.8/MySQL install to a standard Docker 5.3.8/Postgres install.

I successfully backed up data and assets from the standalone system and posted the ZIP file to an Amazon S3 bucket.

I then modified the docker-compose file to set the CUSTOM_STARTER_URL to point to the file in S3.

Initial bootup of the Docker DotCMS container goes well. I can see the starter being downloaded and then imported into DotCMS. However the import process aborts part way through with an error:

dotcms_1         | Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "workflow_scheme_x_structure" violates foreign key constraint "workflow_scheme_x_structure_structure_id_fkey"
dotcms_1         |   Detail: Key (structure_id)=(c938b15f-bcb6-49ef-8651-14d455a97045) is not present in table "structure".

The structure_id corresponds to a Content Type called "Persona" in the structure table, but oddly this Content Type does not appear in the Content Types admin tab of the UI.

Any suggestions as to what I can do to get the import to complete? 

I have already run "Fix Assets Inconsistencies" and that doesn't seem to help.

Kevin Klein

unread,
Nov 2, 2022, 3:58:07 PM11/2/22
to dotCMS User Group
Well, I didn't have much choice here but to manually prune data directly from the database. There were only a few things that had to be touched.
I suspect that at one time we had a license (trial?) that allowed for custom Workflows, but then we let it expire. Now there is orphaned Workflow junk, and the export is smart enough to exclude some of it but not all.

The good news is that I now have the Docker-based install up and running using Postgres with our existing assets and data.

Will Ezell

unread,
Nov 3, 2022, 9:20:41 AM11/3/22
to dot...@googlegroups.com
Kevin:

Glad to hear that you got it going.  Data is always the challenge in upgrades and migrating from MySQL at the same time makes that doubly true.  Now you gotta take it to v22.03  :) 








--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/837efb12-4023-4e24-a5bb-5f281dc136f5n%40googlegroups.com.


--



382 NE 191st St #92150
Miami, Florida 33179-3899
Main: 
305-900-2001 | Direct: 978.294.9429

Kevin Klein

unread,
Nov 3, 2022, 2:43:10 PM11/3/22
to dotCMS User Group
Good segue to my next problem.

I'm trying to upgrade to v22.02 LTS. Here's what I did:
1. Updated the docker-compose.yml file for the new version. I changed the dotcms image label and the configuration parameters from the 5.3 names to the 22.02 equivalents.
2. Did a "chown -R 65001:65001" on the /data/shared volume in /var/lib/docker/volumes
3. Deleted and re-added the Linux dotcms user & group with the new uid/gid.

Now when I do "docker-compose up -d", I'm getting the following error in the dotcms log:
Caused by: com.dotmarketing.exception.DotRuntimeException: /data/shared/assets/server/secrets/dotSecretsStore_1667500393626.p12.tmp
     at com.dotcms.security.apps.SecretsKeyStoreHelper.saveSecretsStore(SecretsKeyStoreHelper.java:175)
      at com.dotcms.security.apps.SecretsKeyStoreHelper.createStoreIfNeeded(SecretsKeyStoreHelper.java:109)
      ... 57 more
Caused by: java.nio.file.AccessDeniedException: /data/shared/assets/server/secrets/dotSecretsStore_1667500393626.p12.tmp

Will Ezell

unread,
Nov 3, 2022, 5:11:42 PM11/3/22
to dot...@googlegroups.com
what does it say if you 
ls -la /var/lib/docker/volumes/ .... /data/shared/assets/server/secrets
are the file owner and group correct?
You should be able to remove the whole /secrets directory.  It should recreate one for you. 

Kevin Klein

unread,
Nov 3, 2022, 5:25:45 PM11/3/22
to dot...@googlegroups.com
[root@ip-10-0-0-7 _data]# ls -la /var/lib/docker/volumes/dotcms_cms-shared/_data/assets/server/secrets
total 0
drwxrwxrwx 2 dotcms dotcms   6 Nov  2 22:10 .
drwxrwxrwx 8 dotcms dotcms 245 Nov  2 22:10 ..
[root@ip-10-0-0-7 _data]#

And the user "dotcms" has uid = 65001

You received this message because you are subscribed to a topic in the Google Groups "dotCMS User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dotcms/u4VRzu1okQc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dotcms+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAPL0VyHkXFS9bc75_-MFBWaJwT7rtn04bGw%2B%3D%2BkP533xzoEPew%40mail.gmail.com.

Kevin Klein

unread,
Nov 8, 2022, 1:17:22 PM11/8/22
to dotCMS User Group
Figured it out. Had to run the chown -R on the _data directory itself. Otherwise that leaves /data/shared owned by root in the container, and dotCMS doesn't appear to like that.
Reply all
Reply to author
Forward
0 new messages