Upgrade issues from 5.0.0 to 5.2.f

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member

Upgrade issues from 5.0.0 to 5.2.f

Hello,

I'm having some issues trying to update to 5.2.f  from Alfresco Community v5.0.0 (c r91299-b145) schema 8009, on postgres DB backend.

I have installed Alfresco 5.2.f on a new server, migrated the alf_data folder, imported the old DB and pointed the alfresco-global.properties settings to the old DB. As my authentication backend is LDAP, i copied also my ldap subsystem config files in the correct locations.

At first start, migrate applies some patches to the database, then it throws out the following errors in Alfresco-PostgreSQLDialect-Validation-Post-Upgrade migration logfile:

Difference: missing index from database, expected at path: .alf_node_properties.idx_alf_nprop_b
Difference: missing index from database, expected at path: .alf_node_properties.idx_alf_nprop_d
Difference: missing index from database, expected at path: .alf_node_properties.idx_alf_nprop_f

and fails to start.

I have tried to manually create the missing DB indexes idx_alf_nprop_d, idx_alf_nprop_b, idx_alf_nprop_f   doing a diff from a stock alfresco 5.2.f database, without success: after restarting alfresco, the startup fails trowing out a generic error:

...

org.alfresco.error.AlfrescoRuntimeException: 06160001 Workflow deployment failed

...

Caused by: org.alfresco.error.AlfrescoRuntimeException: 06160000 Required people system path not found: sys:system

..

no other error is displayed in alfresco log.

Full alfresco.log is at : 2017-07-16 12:30:12,517 INFO [org.alfresco.repo.admin] [localhost-startStop-1] - Pastebin.com 

 

thanks for any help.

7 Replies
Highlighted
Master

Re: Upgrade issues from 5.0.0 to 5.2.f

That error can only occur if - for some reason - the specified node has been deleted. There is no functionality in Alfresco that would delete it without user interaction or custom code, so it must have been done by someone. Do you have a backup of your DB that you can restore and check via the Node Browser? The container sys:system should be directly below the workspace://SpacesStore root node.

Highlighted
Active Member

Re: Upgrade issues from 5.0.0 to 5.2.f

hello Axel, thanks for your answer. The dump i'm using is coming from a working 5.0.0 install (that is our production server); the /opt/alfresco/alf_data folder has been rsynced completely. 

I have accessed the production server using the node browser, and sys:system doesn't seem to be present (see attached screenshots) - should i recreate it somehow before trying the migration again? how?

Thank you for your kind support.

Highlighted
Master

Re: Upgrade issues from 5.0.0 to 5.2.f

Those screenshots don't show the real root - you are looking only at the list of roots and the virtual category root. The other node (without a name) is the real root.

Customer

Re: Upgrade issues from 5.0.0 to 5.2.f

As additional comment, in the Alfresco Administration console under /alfresco, you have a more powerful node browser for accessing sys:system

Regards.

--C.

Highlighted
Master

Re: Upgrade issues from 5.0.0 to 5.2.f

Be aware though that there is a difference between the system store (system://system) and the sys:system node inside of workspace://SpacesStore. You can actually use either Node Browser (Repository or Share) to access both of them - even on Share you can select the store.

Highlighted
Customer

Re: Upgrade issues from 5.0.0 to 5.2.f

True, thanks for pointing this out.

--C.

Highlighted
Active Member

Re: Upgrade issues from 5.0.0 to 5.2.f

Thank you Axel. I'm editing this message as I found out the backup i was importing was incomplete - sorry for the wasted time.

Starting alfresco 5.2.f with the full database dump from 5.0.0 is now failing with the following errors, after performing the database upgrade. I had imported the new dump over an empty database to avoid problems.

2017-07-17 15:06:15,541 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Connecting to database: jdbcSmiley Tongueostgresql://127.0.0.1:5432/alfold, UserName=alfresco, PostgreSQL Native Driver
2017-07-17 15:06:15,541 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Schema managed by database dialect org.hibernate.dialect.PostgreSQLDialect.
2017-07-17 15:06:16,862 WARN [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Schema validation found 5 potential problems, results written to: /opt/alfresco/tomcat/temp/Alfresco/Alfresco-PostgreSQLDialect-Validation-Pre-Upgrade-alf_-8168871806305473997.txt
2017-07-17 15:06:17,374 WARN [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Schema validation found 5 potential problems, results written to: /opt/alfresco/tomcat/temp/Alfresco/Alfresco-PostgreSQLDialect-Validation-Pre-Upgrade-act_-8472448825149335966.txt
2017-07-17 15:06:18,885 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Normalized schema dumped to file /opt/alfresco/tomcat/temp/Alfresco/Alfresco-schema-PostgreSQLDialect-pre-upgrade-alf_-8350063793896123451.xml.
2017-07-17 15:06:18,885 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Normalized schema dumped to file /opt/alfresco/tomcat/temp/Alfresco/Alfresco-schema-PostgreSQLDialect-pre-upgrade-act_-64698149398329546.xml.
2017-07-17 15:06:18,889 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Executing database script /opt/alfresco/tomcat/temp/Alfresco/AlfrescoSchema-PostgreSQLDialect-Update-2397993156503016133.sql (Copied from classpath:alfresco/dbscripts/upgrade/4.2/org.hibernate.dialect.PostgreSQLDialect/migrate-locale-multilingual.sql).
2017-07-17 15:06:18,915 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Executing database script /opt/alfresco/tomcat/temp/Alfresco/AlfrescoSchema-PostgreSQLDialect-Update-4513836255035472422.sql (Copied from classpath:alfresco/dbscripts/create/org.hibernate.dialect.PostgreSQLDialect/AlfrescoCreate-AuthorizationTables.sql).
2017-07-17 15:06:18,963 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Executing database script /opt/alfresco/tomcat/temp/Alfresco/AlfrescoSchema-PostgreSQLDialect-Update-3862001863789305159.sql (Copied from classpath:alfresco/dbscripts/upgrade/4.2/org.hibernate.dialect.PostgreSQLDialect/migrate-activiti-workflows.sql).
2017-07-17 15:06:18,987 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Executing database script /opt/alfresco/tomcat/temp/Alfresco/AlfrescoSchema-PostgreSQLDialect-Update-6603881073123952916.sql (Copied from classpath:alfresco/dbscripts/upgrade/5.0/org.hibernate.dialect.PostgreSQLDialect/activiti-del-unused-after-5-16-2.sql).
2017-07-17 15:06:18,994 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Executing database script /opt/alfresco/tomcat/temp/Alfresco/AlfrescoSchema-PostgreSQLDialect-Update-1285244595592388067.sql (Copied from classpath:alfresco/dbscripts/upgrade/5.0/org.hibernate.dialect.PostgreSQLDialect/update-activiti-default-timestamp-column.sql).
2017-07-17 15:06:19,001 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Executing database script /opt/alfresco/tomcat/temp/Alfresco/AlfrescoSchema-PostgreSQLDialect-Update-3135473372320058835.sql (Copied from classpath:alfresco/dbscripts/upgrade/5.0/org.hibernate.dialect.PostgreSQLDialect/activiti-correct-tenant-id-MSSQL.sql).
2017-07-17 15:06:19,006 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Executing database script /opt/alfresco/tomcat/temp/Alfresco/AlfrescoSchema-PostgreSQLDialect-Update-2013682401108914571.sql (Copied from classpath:alfresco/dbscripts/upgrade/5.1/org.hibernate.dialect.PostgreSQLDialect/activiti-upgrade-5-19-0.sql).
2017-07-17 15:06:19,073 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] All executed statements: /opt/alfresco/tomcat/temp/Alfresco/AlfrescoSchema-PostgreSQLDialect-All_Statements-4815426248066549359.sql.

2017-07-17 15:06:20,037 WARN [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Schema validation found 3 potential problems, results written to: /opt/alfresco/tomcat/temp/Alfresco/Alfresco-PostgreSQLDialect-Validation-Post-Upgrade-alf_-8109210033575826942.txt
2017-07-17 15:06:20,551 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Compared database schema with reference schema (all OK): class path resource [alfresco/dbscripts/create/org.hibernate.dialect.PostgreSQLDialect/Schema-Reference-ACT.xml]
2017-07-17 15:06:22,762 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Normalized schema dumped to file /opt/alfresco/tomcat/temp/Alfresco/Alfresco-schema-PostgreSQLDialect-post-upgrade-alf_-3993401493155974892.xml.
2017-07-17 15:06:22,762 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Normalized schema dumped to file /opt/alfresco/tomcat/temp/Alfresco/Alfresco-schema-PostgreSQLDialect-post-upgrade-act_-6277987423568471995.xml.
2017-07-17 15:06:23,416 ERROR [org.alfresco.repo.descriptor.RepositoryDescriptorDAOImpl] [localhost-startStop-1] updateDescriptor:
org.springframework.dao.DuplicateKeyException:
### Error updating database. Cause: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "protocol"
Detail: Key (protocol, identifier)=(system, system) already exists.
### The error may exist in alfresco/ibatis/#resource.dialect#/node-insert-SqlMap.xml
### The error may involve alfresco.node.insert.insert_Store-Inline
### The error occurred while setting parameters
### SQL: insert into alf_store (id, version, protocol, identifier, root_node_id) values (?, ?, ?, ?, ?)
### Cause: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "protocol"
Detail: Key (protocol, identifier)=(system, system) already exists.
; SQL []; ERROR: duplicate key value violates unique constraint "protocol"
Detail: Key (protocol, identifier)=(system, system) already exists.; nested exception is org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "protocol"
Detail: Key (protocol, identifier)=(system, system) already exists.

Thanks again for your kind help.