Alfresco迁移服务器

时间:2012-08-07 08:34:06

标签: alfresco ecm

我正在将Alfresco Community 4.0.b从服务器1迁移到服务器2.两者都是Ubuntu Server 10.04。我已经关注instruction from wiki,我使用二进制安装文件在两台服务器上安装Alfresco。

数据库备份和恢复代码:

pg_dump -U postgres -h localhost -p 5432 -F c -v -f alfresco_db alfresco

pg_restore -U postgres -h localhost -p 5432 -C -d postgres -v alfresco_db

在服务器2上启动Alfresco时,出现以下错误:

2012-08-07 07:50:15,623  ERROR [web.context.ContextLoader] [main] Context initialization failed
java.lang.NullPointerException
   at org.alfresco.repo.web.scripts.RepoStore.findNodeRef(RepoStore.java:315)
   at org.alfresco.repo.web.scripts.RepoStore$7$1.execute(RepoStore.java:685)
   at org.alfresco.repo.web.scripts.RepoStore$7$1.execute(RepoStore.java:682)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.repo.web.scripts.RepoStore$7.doWork(RepoStore.java:681)
   at org.alfresco.repo.web.scripts.RepoStore$7.doWork(RepoStore.java:678)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:519)
   at org.alfresco.repo.web.scripts.RepoStore.getDocument(RepoStore.java:677)
   at org.springframework.extensions.webscripts.DeclarativeRegistry.initWebScripts(DeclarativeRegistry.java:367)
   at org.springframework.extensions.webscripts.DeclarativeRegistry.reset(DeclarativeRegistry.java:178)
   at org.springframework.extensions.webscripts.AbstractRuntimeContainer.reset(AbstractRuntimeContainer.java:259)
   at org.alfresco.repo.web.scripts.RepositoryContainer.init(RepositoryContainer.java:633)
   at org.alfresco.repo.web.scripts.RepositoryContainer$5.execute(RepositoryContainer.java:603)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.repo.web.scripts.RepositoryContainer.reset(RepositoryContainer.java:598)
   at org.alfresco.repo.web.scripts.RepositoryContainer$4.doWork(RepositoryContainer.java:553)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:519)
   at org.alfresco.repo.web.scripts.RepositoryContainer.onApplicationEvent(RepositoryContainer.java:557)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:209)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:180)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
   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:546)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
   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:519)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
   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:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Aug 7, 2012 7:50:15 AM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
INFO: WSSERVLET12: JAX-WS context listener initializing
Aug 7, 2012 7:50:24 AM com.sun.xml.ws.transport.http.servlet.WSServletDelegate <init>
INFO: WSSERVLET14: JAX-WS servlet initializing
Aug 7, 2012 7:50:24 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Aug 7, 2012 7:50:24 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors

缺少什么?

编辑。

Full start up log

2 个答案:

答案 0 :(得分:1)

我找到了解决方案!

将alf_data复制到Server 2之后,我需要删除SOLR索引数据并从SOLR重建索引开始。

答案 1 :(得分:0)

每当我进行迁移时,我都会这样做:

  • pgDump&amp;还原
  • copy contentStore&amp; contentStore.deleted
  • 完全重新索引

虽然我在谈论postgres,但有2 ways how to dump and restore

压缩转储:

pg_dump -Fc -U <DBUSER> <DBSCHEMA> > <fileName>.sql.Fc
pg_restore -U <DBUSER> -d <DBSCHEMA> <fileName>.sql.Fc

plain txt / sql:

pg_dump dbname > outfile
psql dbname < infile

对于复制文件,无需评论:o)

重新索引SOLR- that works