Alfresco migrating server

2019-06-05 16:54发布

问题:

I'm migrating Alfresco Community 4.0.b from Server 1 to Server 2. Both are Ubuntu Server 10.04. I have followed the instruction from wiki, and I used binary installation file to install Alfresco on both server.

Database back up and restore code:

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

When starting Alfresco on Server 2, I get this following error:

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

What's missing?

Edited.

Full start up log

回答1:

I've found the solution!

After copying alf_data to Server 2, I need to delete the SOLR index data and start with SOLR rebuilding the index.



回答2:

Everytime when I'm doing migration, I made this:

  • pgDump & restore
  • copy contentStore & contentStore.deleted
  • full re-index

While I'm talking about postgres- there are 2 ways how to dump and restore.

compress dump:

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

For copy files no comment need :o)

And for re-index SOLR- that works



标签: alfresco ecm