Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Migrating to new linux VM and DB

Jacob Connelly August 9, 2018

Hi all, I'm trying to migrate our confluence server to a new linux VM, as well as a new postgresql DB. The original server is running linux with confluence 5.9.5 and postgresql.

I've gone over the documentation, and still seem to be running into errors. I followed the process at https://confluence.atlassian.com/doc/migrating-confluence-between-servers-184150.html but was unable to get the server started afterwards.

My confluence is too large to do an XML backup (I've tried, and it fails halfway thru), so I am moving the DB using a psql_dump. I'll walk through my process so far, and if anyone can see where I'm going wrong, I would appreciate it.

  • Spin up fresh Ubuntu linux VM. 
  • Install confluence 5.9.5(x64)
  • Stop the confluence service.
  • Remove all files in the confluence home directory on the new server.
  • Copy the contents of the confluence home directory (/var/atlassian/application-data/confluence/) from the old server to the new server using rsync.
  • Restore the Postgresql DB using psql (including creating accounts and setting permissions).
  • Start the confluence service.
  • Note: I do not move the server.xml file from the old server as it contains the address for our proxy. When I do, it causes my localhost connection to redirect to our production server instead of the localhost.

At this point I am able to "connect" to the server, but I'm always routed to localhost:8090/errors.jsp. No actual error page is shown. I have tried removing my plugin folders to rebuild the cache with no luck. Any advice would be helpful, and I'll happily give any more info I may have forgotten. Thanks!

1 answer

0 votes
Sattesh M
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 20, 2018

Hello Jacob,

It seems like you've followed the right steps to migrate Confluence between servers.

There might have been a couple of things that might have been missed, so do check on the following.

  1. After copying the home directory from the old server to the new server, check the confluence.cfg.xml file to see if the hibernate.connection.url is set correctly, and is pointing to the correct database and has the correct username and password as well.
  2. Also, if you've used a datasource connection, the database config would be in the server.xml file, so do copy the server.xml file as well, and just edit the connector port section and remove the proxy attributes so that it does not get redirected to the old server's address. If there is a datasource connection, you can also copy over the connection to the new server.xml file instead.
  3. There are logs, in the Confluence Installation, and Home directory, in the logs folder, so do check the latest logs in those folders, and scroll all the way to the bottom to see if you notice any errors when we try to start Confluence.

Hope that helps, and let me know if you have any questions.

Cheers,
Sattesh

Jacob Connelly October 10, 2018

Thanks for the input! I have tried the suggested fixes, and am still encountering the same issue.

I double checked the information in the cofluence.cfg.xml and updated it to reflect the login credentials/location to the new PSQL server. 

We are not using a datasource connection, however I did remove the proxy information and copied the Server.xml to the new install.

I've pasted snipets from my logs (Top: Catalina.out, Bottom: Atlassian-Confluence.log)). I'm getting errors, but not quite sure what they mean.

SEVERE [http-nio-8090-exec-4] org.apache.catalina.core.StandardHostValve.custom Exception Processing ErrorPage[errorCode=500, location=/500page.jsp]
com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
at com.atlassian.confluence.plugin.servlet.filter.ServletFilterModuleContainerFilter.getServletModuleManager(ServletFilterModuleContainerFilter.java:20)
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:62)
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:46)
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:720)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:468)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:391)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:318)
at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:439)
at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:305)
at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:399)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at com.atlassian.spring.container.ContainerManager.getComponent(ContainerManager.java:33)
at com.atlassian.confluence.util.LazyComponentReference$Accessor.get(LazyComponentReference.java:42)
at com.atlassian.util.concurrent.Lazy$Strong.create(Lazy.java:85)
at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:321)
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)
... 29 more

 

2018-10-09 00:20:22,187 ERROR [scheduler_Worker-7] [org.quartz.core.ErrorLogger] schedulerError Job (pluginSchedulerJobGroup.com.atlassian.analytics.client.upload.RemoteFilterRead:job threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException]
at org.quartz.core.JobRunShell.run(JobRunShell.java:234)
at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool.lambda$runInThread$185(ConfluenceQuartzThreadPool.java:16)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
at com.atlassian.util.concurrent.ResettableLazyReference.get(ResettableLazyReference.java:87)
at com.atlassian.analytics.client.hash.BcryptAnalyticsEmailHasher.readRemoteInstructions(BcryptAnalyticsEmailHasher.java:123)
at com.atlassian.analytics.client.upload.RemoteFilterRead.execute(RemoteFilterRead.java:65)
at com.atlassian.scheduler.compat.local.LocalOnlyPluginJob.execute(LocalOnlyPluginJob.java:30)
at com.atlassian.sal.confluence.scheduling.ConfluencePluginScheduler$ConfluencePluginJob.execute(ConfluencePluginScheduler.java:84)
at com.atlassian.scheduler.quartz1.Quartz1JobFactory$ClassLoaderProtectingWrappedJob.execute(Quartz1JobFactory.java:65)
at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
... 2 more
Caused by: java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:78)
at java.io.InputStreamReader.<init>(InputStreamReader.java:113)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1906)
at org.apache.commons.io.IOUtils.toString(IOUtils.java:778)
at org.apache.commons.io.IOUtils.toString(IOUtils.java:759)
at com.atlassian.analytics.client.hash.reader.RemoteHashingInstructionsReader.readInstructions(RemoteHashingInstructionsReader.java:27)
at com.atlassian.analytics.client.hash.BcryptAnalyticsEmailHasher$HashingInstructionsResettableLazyReference.create(BcryptAnalyticsEmailHasher.java:154)
at com.atlassian.analytics.client.hash.BcryptAnalyticsEmailHasher$HashingInstructionsResettableLazyReference.create(BcryptAnalyticsEmailHasher.java:144)
at com.atlassian.util.concurrent.ResettableLazyReference$InternalReference.create(ResettableLazyReference.java:140)
at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:321)
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)
... 10 more
2018-10-09 01:28:19,271 WARN [scheduler_Worker-1] [atlassian.upm.pac.PacClientImpl] fetchMpacAppInfo Error when querying application info from MPAC: com.atlassian.marketplace.client.MpacException: org.apache.http.conn.ConnectTimeoutException: Connect to marketplace.atlassian.com:443 [marketplace.atlassian.com/23.20.2.132, marketplace.atlassian.com/52.207.4.69, marketplace.atlassian.com/18.211.158.60] failed: connect timed out
2018-10-09 14:00:40,791 WARN [scheduler_Worker-1] [atlassian.upm.notification.PluginLicenseNotificationCheckerImpl] updateRemotePluginLicenseNotifications Automatic license update check failed: com.atlassian.upm.mac.HamletException: org.apache.http.conn.ConnectTimeoutException: Connect to marketplace.atlassian.com:443 [marketplace.atlassian.com/52.207.4.69, marketplace.atlassian.com/18.211.158.60, marketplace.atlassian.com/23.20.2.132] failed: connect timed out
Jacob Connelly October 10, 2018

Thanks for the input! I have tried the suggested fixes, and am still encountering the same issue.

I double checked the information in the cofluence.cfg.xml and updated it to reflect the login credentials/location to the new PSQL server. 

We are not using a datasource connection, however I did remove the proxy information and copied the Server.xml to the new install.

I've pasted snipets from my logs (Top: Catalina.out, Bottom: Atlassian-Confluence.log)). I'm getting errors, but not quite sure what they mean.

SEVERE [http-nio-8090-exec-4] org.apache.catalina.core.StandardHostValve.custom Exception Processing ErrorPage[errorCode=500, location=/500page.jsp]
com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
at com.atlassian.confluence.plugin.servlet.filter.ServletFilterModuleContainerFilter.getServletModuleManager(ServletFilterModuleContainerFilter.java:20)
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:62)
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:46)
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:720)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:468)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:391)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:318)
at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:439)
at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:305)
at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:399)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at com.atlassian.spring.container.ContainerManager.getComponent(ContainerManager.java:33)
at com.atlassian.confluence.util.LazyComponentReference$Accessor.get(LazyComponentReference.java:42)
at com.atlassian.util.concurrent.Lazy$Strong.create(Lazy.java:85)
at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:321)
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)
... 29 more

 

2018-10-09 00:20:22,187 ERROR [scheduler_Worker-7] [org.quartz.core.ErrorLogger] schedulerError Job (pluginSchedulerJobGroup.com.atlassian.analytics.client.upload.RemoteFilterRead:job threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException]
at org.quartz.core.JobRunShell.run(JobRunShell.java:234)
at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool.lambda$runInThread$185(ConfluenceQuartzThreadPool.java:16)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
at com.atlassian.util.concurrent.ResettableLazyReference.get(ResettableLazyReference.java:87)
at com.atlassian.analytics.client.hash.BcryptAnalyticsEmailHasher.readRemoteInstructions(BcryptAnalyticsEmailHasher.java:123)
at com.atlassian.analytics.client.upload.RemoteFilterRead.execute(RemoteFilterRead.java:65)
at com.atlassian.scheduler.compat.local.LocalOnlyPluginJob.execute(LocalOnlyPluginJob.java:30)
at com.atlassian.sal.confluence.scheduling.ConfluencePluginScheduler$ConfluencePluginJob.execute(ConfluencePluginScheduler.java:84)
at com.atlassian.scheduler.quartz1.Quartz1JobFactory$ClassLoaderProtectingWrappedJob.execute(Quartz1JobFactory.java:65)
at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
... 2 more
Caused by: java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:78)
at java.io.InputStreamReader.<init>(InputStreamReader.java:113)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1906)
at org.apache.commons.io.IOUtils.toString(IOUtils.java:778)
at org.apache.commons.io.IOUtils.toString(IOUtils.java:759)
at com.atlassian.analytics.client.hash.reader.RemoteHashingInstructionsReader.readInstructions(RemoteHashingInstructionsReader.java:27)
at com.atlassian.analytics.client.hash.BcryptAnalyticsEmailHasher$HashingInstructionsResettableLazyReference.create(BcryptAnalyticsEmailHasher.java:154)
at com.atlassian.analytics.client.hash.BcryptAnalyticsEmailHasher$HashingInstructionsResettableLazyReference.create(BcryptAnalyticsEmailHasher.java:144)
at com.atlassian.util.concurrent.ResettableLazyReference$InternalReference.create(ResettableLazyReference.java:140)
at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:321)
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)
... 10 more
2018-10-09 01:28:19,271 WARN [scheduler_Worker-1] [atlassian.upm.pac.PacClientImpl] fetchMpacAppInfo Error when querying application info from MPAC: com.atlassian.marketplace.client.MpacException: org.apache.http.conn.ConnectTimeoutException: Connect to marketplace.atlassian.com:443 [marketplace.atlassian.com/23.20.2.132, marketplace.atlassian.com/52.207.4.69, marketplace.atlassian.com/18.211.158.60] failed: connect timed out
2018-10-09 14:00:40,791 WARN [scheduler_Worker-1] [atlassian.upm.notification.PluginLicenseNotificationCheckerImpl] updateRemotePluginLicenseNotifications Automatic license update check failed: com.atlassian.upm.mac.HamletException: org.apache.http.conn.ConnectTimeoutException: Connect to marketplace.atlassian.com:443 [marketplace.atlassian.com/52.207.4.69, marketplace.atlassian.com/18.211.158.60, marketplace.atlassian.com/23.20.2.132] failed: connect timed out
Jacob Connelly October 10, 2018

Sorry for the multiple post. The site wasn't showing my replies for a while.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events