EPiWiki.se  - EPiServer notes shared with others
 

Mirroring 2

[Edit]
Common issues with mirroring2 (developed in EPiServer CMS version 6).

Links


Configure EPiServer Mirroring 2

Mirroring packages


The mirroring packages are located in the temp folder for the IIS user %TEMP%\episerver\cms6\mirroring\sourcefiles (C:\Windows\Temp\episerver\cms6\mirroring\sourcefiles on my local workstation).
This folder include .TMP files, top open them up rename it to .ZIP file and uncompress it – it is just a normal EPiServer import package.
Sense this packages is EPiServer import packages it is possible to use the normal import functionality to test them.

Errors in EPiServer Admin Mirroring GUI


Could not find stored procedure 'sp_DatabaseVersion'


The connection string for the mirroring service (normally located in mirroringService/web.config) doesn’t point to an EPiServer CMS database)

Unable to load one or more of the requested types


Probebly the assembly redirests are missing in the mirroring service.
Solution:
Copy all assembly redirects from web.config till mirroringService/web.config

The Dynamic Content control type MapDynamicContentDemo could not be loaded


Copy all the sites assemblies located in the bin/ folder to the mirroring service bin/ folder .

Access to the path 'D:\MyCMS\MirroringService\mysite.config' is denied


The user running the mirroring job needs to have "modify rights" for its own web root so he can write web.config from the database to its own migration folder.

Exception: Specified part does not exist in the package.[]


The transfer packages have been corrupted.
Solution:
Look in the %TEMP%\episerver\cms6\mirroring\sourcefiles for migration packages and remove them one by one to find the faulting package.
The packages should contain:
Handleddata/ - folder for metadata for this package
[Content_Types].xml – needed by the .NET zip functionality
Epix.xml – EPiServer export XML
Idmap.xml – not needed by mirroring but speeds up the importing of data

Object reference not set to an instance of an object


This can mean everything so you have to look in the log file for more information
Set up logging for mirroring 2
on both the source and the destination servers
If the error log is empty
Set the debug level to "ALL" and if still nothing worth full comes out or only "EPiServer.MirroringService.MirroringSourceService.MirroringSourceServer.EPiServer.MirroringService.MirroringSourceService.IMirroringSource.StartMirroring - EPiServer.MirroringService.MirroringTransferProtocol.Common.MirroringFaultExceptionDetail"
You have to attach to the process with a managed debugger and break on exceptions, see How to use Mdbg for more information.
Then you can get a stack trace like this

[p#:9, t#:34] mdbg> w
Thread [#:34]
*0. EPiServer.Web.Hosting.VirtualPathHandler.CreateVirtualPathProviderInstance (source line information unavailable)
 1. EPiServer.Web.Hosting.VirtualPathHandler.InitializeProviders (source line information unavailable)
 2. EPiServer.Web.InitializationModule.InitializeVirtualPathProviders (source line information unavailable)
 3. EPiServer.Web.InitializeEngine.Initialize (source line information unavailable)
 4. EPiServer.Web.InitializationModule.Initialize (source line information unavailable)
...

Solution:
With some help of reflection we can see that I have a non existing VPP handler that CreateVirtualPathProviderInstance throws the execption when he couldn't initialize.
Make all VPPs to point to the same path on the local machine (ex D:\VPP\testFiles) on all mirroring sites.
Remove the external Mysite.web.config from the mirroring root, and restart the source site.
Version author:
Mattias Lövström

EPiServer version

'EPiServer CMS 6'