Erreur de création de table après un Dump

cancel
Showing results for 
Search instead for 
Did you mean: 
kimblue
Member II

Erreur de création de table après un Dump

Bonjour,

Je migre les données d'Alfresco d'un Windows à Linux. La version installée sur Linux est la 3.2r

J'ai fais une 1ère migration des données en faisant un dump de la base sur Windows et une restauration sur la base Linux.
Avant de migrer définitivement je fais des test incrémentale. Donc j'ai refais un dump et j'essaye de restaurer sur la machine Linux mais j'ai une erreur SQL que voici :

ERROR 1005 (HY000) at line 1989: Can't create table './alfresco/jbpm_action.frm' (errno: 121)

Quelqu'un pourrai m'apporter de l'aide ?

Merci
4 Replies
kimblue
Member II

Re: Erreur de création de table après un Dump

Bonjour,

Finalement je suis revenu à une configuration d'origine et j'ai fais une restauration de la base à partir du dump des données d'Alfresco de la machine Windows.

Mais j'ai une nouvelle erreur :

11:35:06,524  ERROR [domain.schema.SchemaBootstrap] Statement execution failed:
   SQL: alter table JBPM_ACTION add index FK_ACTION_REFACT (REFERENCEDACTION_), add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION (ID_)
   Error: Can't create table './alfresco/#sql-5191_9.frm' (errno: 121)
   File: /produit/alfresco/tomcat/temp/Alfresco/AlfrescoSchema-MySQLInnoDBDialect-Update-4289316320900502540.sql
   Line: 29
11:35:06,525  ERROR [domain.schema.SchemaBootstrap] Schema auto-update failed
java.sql.SQLException: Can't create table './alfresco/#sql-5191_9.frm' (errno: 121)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2548)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2477)
        at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:741)
        at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:587)
        at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
        at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.executeStatement(SchemaBootstrap.java:1092)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptFile(SchemaBootstrap.java:1046)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:744)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1258)
        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)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:617)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:69)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)
        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
11:35:06,527  ERROR [web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 03290000 Schema auto-update failed
        at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1386)
        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)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:617)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:69)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)
        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.sql.SQLException: Can't create table './alfresco/#sql-5191_9.frm' (errno: 121)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2548)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2477)
        at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:741)
        at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:587)
        at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
        at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.executeStatement(SchemaBootstrap.java:1092)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptFile(SchemaBootstrap.java:1046)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:744)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1258)
        … 35 more

J'ai recherché sur le forum et je suis tombé dessus :
http://forums.alfresco.com/en/viewtopic.php?f=8&t=13927

Mais je ne sais pas quelle solution apportée :
- supprimer les fichiers dans temp
- ou commenter la partie shema.upgrade ?

Autre chose, je crois que la version du post précédent n'est pas la même que la mienne (3.2r) car le fichier custom-repository.properties n'existe pas. Et la variable schema.upgrade se trouve dans repository.properties

Et il y certaine variable qui se trouvent dans 2 fichiers, ex. :
- dans reporitory.properties j'ai  : index.recovery.mode=VALIDATE
- et dans alfresco-global.properties j'ai : index.recovery.mode=FULL

J'ai la même chose pour la variable dir.root, je l'ai dans les 2 fichiers.

Quel fichiers est pris en compte?

Merci pour aide.
christophes
Member II

Re: Erreur de création de table après un Dump

En ce qui concerne le problème "Schema auto-update failed", il faut que tu vérifies que l'utilisateur avec lequel tu lances Alfresco a les droits d'écrire dans le répertoire où tu as ta base de données. Le plus simple, mais pas le plus sûr par la suite, est de lancer Alfresco avec l'utilisateur root le temps de la mise à jour du schéma de la base de données.

Et il y certaine variable qui se trouvent dans 2 fichiers, ex. :
- dans reporitory.properties j'ai : index.recovery.mode=VALIDATE
- et dans alfresco-global.properties j'ai : index.recovery.mode=FULL

J'ai la même chose pour la variable dir.root, je l'ai dans les 2 fichiers.

Quel fichiers est pris en compte?
Encore une fois le fichier pris en compte dans cette version d'Alfresco sera alfresco-global.properties dont le but est de rassembler dans un seul fichier toutes les propriétés qui étaient avant dispersées dans plusieurs fichiers.

Christophe
kimblue
Member II

Re: Erreur de création de table après un Dump

Merci pour ta réponse.

J'ai essayé de démarrer Alfresco en étant root et j'ai la même erreur. Et il me demande de revenir à une configuration de base (que j'ai déjà fais).

Pour la configuration de la base Alfresco j'ai ça :

grant all on alfresco.* to 'monuser'@'localhost' identified by 'mdp' with grant option;


Donc je suppose que mon user à les droit d'écriture sur la base Alfresco?

Et le répertoire où se trouve ma base appartient au user Mysql.
christophes
Member II

Re: Erreur de création de table après un Dump

Est-ce que tu as dans le fichier alfresco-global.properties les lignes suivantes:
# Database configuration
db.schema.update=true
db.schema.update.lockRetryCount=24
db.schema.update.lockRetryWaitSeconds=5
db.driver=org.gjt.mm.mysql.Driver
db.name=alfresco
db.url=jdbc:mysql:///${db.name}
db.username=monuser
db.password=mdp
db.pool.initial=10
db.pool.max=20
Il faut que dans ce fichier le username et password correspondent à ceux défini dans ta configuration de la base Alfresco.

Christophe