cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco database upgrade failure

bsubramanian
Champ in-the-making
Champ in-the-making
Hi There

We are upgrading alfresco 2.1.2 (Enterprise edition) to 2.2.1 (Enterprise edition) in our development suite running on RHEL 5 with MYSQL database and Jboss 4.2.1. The process we followed was.

1.   Stopped the old alfresco instance running
2.   Backed up the old mysql database using mysqldump command.
3.   Took the backup of alf_data folder along with database dump
4.   Created a new instance of Jboss App server
5.   Deployed the new alfresco.war into deploy folder
6.   Updated the custom-repository.properties, custom-hibernate-dialect.properties, ldap-authentication.properties

       The update in custom-repository.properties  is as follows

dir.root=/home/OSATPortal/jboss-4.2.1.GA/bin/alfresco_2.2.1/alf_data
dir.indexes=/home/OSATPortal/jboss-4.2.1.GA/bin/alfresco_2.2.1/alf_data/lucene-indexes
index.recovery.mode=VALIDATE
db.schema.update=true
db.username=alfresco
db.password=alfresco
db.pool.initial=10
db.pool.max=100
db.driver=com.mysql.jdbc.Driver
db.url=jdbc:mysql://localhost/alfresco

7.   Restored the alf_data from backup (I wanted to retain the old alf_data folder as is which existed in ‘/home/OSATPortal/jboss-4.2.1.GA/bin/alf_data’
8.   Started the Jboss instance.

It finds the db dialect “23:10:17,004 INFO  [STDOUT] 23:10:17,003 INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.”

And waits for a few moments and the throw the ERROR

“23:12:20,149 INFO  [STDOUT] 23:12:20,135 ERROR [domain.schema.SchemaBootstrap] Schema auto-update failed
org.alfresco.error.AlfrescoRuntimeException: A previous schema upgrade failed or was not completed.  Revert to the original database before attempting the upgrade again.
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1008)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
   at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
   at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)”

In one of the forum posts I saw that the reason for this issue could be the space constraint (http://forums.alfresco.com/en/viewtopic.php?f=8&t=13936&p=46277). Even after emptying some memory I am facing the same issue.  Am I missing any steps? I am attaching the log file for your reference.


At present memory statistics in this machine is as follows.

[root@localhost ~]# free -m
          total       used       free     shared    buffers     cached
Mem:          1391       1348         43          0         34        600
-/+ buffers/cache:        712        678
Swap:         3071          0       3071


[root@localhost ~]# free -b
             total          used          free          shared    buffers     cached
Mem:    1458696192    1413660672   45035520          0      36806656  629583872
-/+ buffers/cache:  747270144  711426048
Swap:   3221168128     110592 3221057536



Thanks
Bala
6 REPLIES 6

norgan
Champ in-the-making
Champ in-the-making
Hello Bala,
I had the same problem on installation of a Lab 3.0 Version. My only solution was "delete alf_data & database and restart from scratch". I didn't even get to the import of my old data. Maybe that helps. Otherwise, beeing a user of the Enterprise Version, the support should be available to you, right?

Good Hunting,
Norgan

bsubramanian
Champ in-the-making
Champ in-the-making
Hi Norgan

I had a suggestion from support team (Unfortunately, it didn't work for me) to delete the database table "alf_bootstrap_lock". The steps to be repated are

— delete current db
— restore db from backup
— REMOVE alf_bootstrap_lock table
— delete alfresco app dir from:  <JBOSS-DIR>\\server\default\tmp\deploy \tmp61353alfresco-exp.war
— comment this out:  index.recovery.mode=VALIDATE
— restart jboss (assuming the war file is on the deploy dir)

Could you try to get back your data from older db if it will not hurt your current installation and let me know?

Thanks
Bala

loftux
Star Contributor
Star Contributor
Have you tried to get this up and running on a 'clean' install?

By doing so you can rule out basic connectivity and configuration problems. Once that is done, remove the test data, then load your db and alf_data  with the actual data and now try the upgrade.

bsubramanian
Champ in-the-making
Champ in-the-making
The clean install works fine. The issue arises only when we try to restore the db from a back up. Were you able to upgrade your stuff to 2.2 SP1?

Thanks
Sonia

maxmax
Champ in-the-making
Champ in-the-making
Hi,
had same thing with 2.1.1 to 2.1.6 … when u catch this error the best is always to start back from your backups

but the working trick for me was to add in the custom-repo file :
 
db.schema.update=true
db.schema.update.lockRetryCount=24
db.schema.update.lockRetryWaitSeconds=5

when

toltech
Champ in-the-making
Champ in-the-making
Hello,
I have also been experiencing problems with an upgrade, But if you want to upgrade (2.2. -> 3.0) and this fails, how do you upgrade from backup? alf_data and the database are belonging to 2.2 and can not be used. To the only solution I can think of, is to make a dump through one of the other interfaces (e.g. FTP), import this directory structure in the new installation also using CIFS of FTP and recreate the user and right structure by hand, which is of course an error prone method.

Any ideas?
Robert