2012-08-07 502 views
1

我正在將Alfresco Community 4.0.b從服務器1遷移到服務器2.兩者都是Ubuntu Server 10.04。我遵循instruction from wiki,我使用二進制安裝文件在兩臺服務器上安裝Alfresco。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上開始露天,我得到這個以下錯誤:

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

+0

您顯示的錯誤不是很明顯。你可以附上完整的啓動日誌,以便我們可以看到錯誤發生之前你在哪個過程中? – DocWatson 2012-08-07 15:04:33

+0

你確定轉儲和恢復沒有錯誤嗎?只有它看起來像一些/所有的數據沒有通過 – Gagravarr 2012-08-07 15:14:39

+0

@ConsultStan傳輸我已經編輯了我的文章並添加了完整的啓動日誌。 – supta 2012-08-08 01:33:13

回答

1

我已經找到了解決方案!

將alf_data複製到服務器2後,我需要刪除SOLR索引數據並從SOLR開始重建索引。

0

每次當我在做遷移,我做了這個:

  • pgDump &恢復
  • 複製contentStore & 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 

普通TXT/SQL:

pg_dump dbname > outfile 
psql dbname < infile 

對於複製文件無可奉告需要:O)

而對於重指數SOLR- that works