Unable to get mirroring working

Vote:
 

I'm having trouble with setting up mirroring.

- I've installed it into my site locally. The site was created in Visual Studio and upgraded via NuGet.

- Moved the mirroring service into a seperate web app under my solution (rather than under root) so I can include it under source control (it broke the build if I tried to include it directly in the web app). And I've updated the IIS app created during mirroring install to point to this new location.

- I've updated the assemblies and bindings in the mirroring service to use the same versions as the web app.

- I've updated addresses for clients in the main web app web.config as well as settings in the mirroring web app web.config.

- I've created a QAT environemnt I can use to test mirroring, added the relevant config transformations and deployed.

- I've dropped in some settings to the Admin > Config > Mirroring Settings as best I can figure out, unfortunately the documentation is quite poor on the set-up for 7.5 - I'm mainly refering to http://world.episerver.com/Documentation/Items/Developers-Guide/EPiServer-CMS/75/Deployment/Mirroring/Installing-and-configuring-mirroring/and http://webhelp.episerver.com/CMS/7.5/EN/Default.htm#Configuration/Admin_ToolSettings.htm%3FTocPath%3DAdministering%20the%20website%7CTool%20settings%7C_____0

First time I ran it complained about missing the EPiServer.ImageLibrary assembly, so I added it to the mirroring service and redeployed.

This time I get an error saying:
The job failed: Exception has been thrown by the target of an invocation. [
Error executing task "MirrorSite": The modules finder couldn't find a directory at '~/EPiServer/Shell' Parameter name: moduleResourcePath ()
]

When I look at the mirroring serice on my QAT server I can see a file has been created in the root called 50fe3301-7021-4663-a497-450d6a3de8d7_Source.config which looks like a compiled config file of all the config settings from the main web app on QAT - well I presume QAT as it has the QAT connection string.

I'll be honest I've no idea what I'm doing with this so would be greatful if anyone could offer any suggestions of what I might be doing wrong.

#84655
Apr 03, 2014 17:51
Vote:
 

To give some more background on my requirements our client wants an EPiServer site with failover - and we were going to look at mirroring to provide this due to the fact that EPiServer doesn't store media in the database (and possibly other things).

Also it is to failover to a server and database not even on the same network (so no shared SAN or anything helpful like that).

That's why we were going to use mirroring such that we can try keep a resonably up to date version of the site in standby.

#84656
Apr 03, 2014 17:54
Vote:
 

Hi Mark,

There is a reported bug for this, and hopefully it will be included in the next release (release 11).


Bug #113464: Mirroring throwing errors for Shell

#84657
Apr 03, 2014 18:51
Vote:
 

I've installed the latest update, shows as assmebly versions 7.6.4.0. And that seems to get rid of the error.

Unfortunately I'm still not sure mirroring is working and I'm having another issues unrelated to mirroring that is preventing me checking at the moment. Going to post about that issue then come back to this one.

#84752
Apr 07, 2014 12:25
Vote:
 

Okay - having resolved all other issues, my mirroring job is running and I get the OK status, however I'm not seeing any changes of the intended target site. It doesn't look like it has done anything.

There don't seem to be any logs and I've no real clues to start with to try figure out why this feature just doesn't seem to work.

 

#84780
Apr 07, 2014 14:55
Vote:
 

Ok, so going 2 steps forward and 1 step back with this. Found this article for EpiServer CMS 6 which suggested the mirroring needed to be set-up in both source and target locations and provided some info on what to put in the fields (something that might be handy for the documentation).

Here is the article: http://andersnordby.wordpress.com/2013/01/14/setting-up-mirroring-2-0-in-a-cms-6-r2-environment/

Anyway first run having followed these instructions I got this:

Mirroring job: 'Failover copy'
Mirroring state: Failure during export
The following errors occured:
Could not create instance of content type "ImageFile" since it has an invalid .NET class associated: MyNamespace.WebApp.Models.Media.ImageFile, MyNamespace.WebApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
SourceService: Exported 0 pages
TargetService: Imported 0 pages, moved 0 pages, deleted 0 pages including children

I've since switched to removing all of the EPiServer assemblies directly and insteead just reference my other web application in my mirroring service web app project - which has now got me a little bit further so now in the mirroring logs I see an authentication error:

            <Errors>
              <string>The user YourUser is not Authenticated by system. Please insert valid parameters 'username' and 'password' in transfer provider settings in Mirroring source service configuration file</string>
            </Errors>

I feel like I'm getting closer so fingers crossed.

#84803
Edited, Apr 07, 2014 17:47
Vote:
 

Just to confirm I now see this in my history a couple of seconds after the initial OK.

Mirroring job: 'Failover copy'
Mirroring state: Failure during page package transfer
The following errors occured:
The user MirrorUser is not Authenticated by system. Please insert valid parameters 'username' and 'password' in transfer provider settings in Mirroring source service configuration file
SourceService: Exported 0 pages
TargetService: Imported 0 pages, moved 0 pages, deleted 0 pages including children

#84804
Apr 07, 2014 17:57
Vote:
 

Make sure the user you provided during the mirroring installation is a valid/authenticated user. Doesn't need to be a Admin though. You can change the user in mirroring web.config :

<mirroringTransfer defaultProvider="MirroringTransferServer">

<providers>
<add defaultEndpointName="mirroringTargetEndPoint" chunkSize="4194304" name="MirroringTransferServer" type="EPiServer.MirroringService.MirroringTransferProtocol.WCF.MirroringTransferClient,EPiServer.Enterprise" username="" password="" domain="" />
</providers>
</mirroringTransfer>


#84824
Apr 08, 2014 8:23
Vote:
 

The user is a valid user - Im using the same user in my local and QAT environments and the user is set up as a user under the EPiServer CMS web app, in this case I have given them the WebAdmins role (I'm only using the SqlServerMembershipProvider in my app). And the username and password are declared in the config files for both my mirroring service apps.

I have left domain blank, I presume that is only relevant if I'm using windows membership.

#84836
Apr 08, 2014 10:48
Vote:
 

Okay I have success!

Spotted that the mirroring service defaults to the windows providers and I needed to change these to the same as the web app.

#84837
Apr 08, 2014 10:53
Vote:
 

One thing I have noticed is that the changes that are mirrored don't seemed to be published, despite being published on the source. Is that possible to configure that they inherit the same published state? Or am I seeing a caching issue?

What I'm trying to achieve is as near an exact copy of the live site for the purposes of failover.

Update: Actually it's kind of interesting as the back office says no changes to publish - but the end user site isn't showing the latest version so I'm assuming there is some sort of caching issue or bug there.

#84838
Edited, Apr 08, 2014 10:56
Vote:
 

When you run the mirroring first time, mirroring service looks at the target database for matching PageGUIDs (sent in mirroring package) and creates the new page if matching guid doesn't exist otherwise update the existing one.

Regarding the changes not visible on target site, I suspect that remote events are not properly setup so that on target site after completion of mirroring job, it flushes the cache. 

A default target site web.config looks like : 

<services>
......

<service name="CMS7.5-2/EPiServer.Events.Remote.EventReplication">
<endpoint name="RemoteEventServiceEndPointNetPipe" address="net.pipe://RemoteEvent/CMS7.5-2MirroringService" binding="netNamedPipeBinding" bindingConfiguration="RemoteEventsBindingNetPipe" contract="EPiServer.Events.ServiceModel.IEventReplication" />
....
</services>
whereas target mirroring web.config looks liike: 

<client>
<endpoint name="RemoteEventServiceClientEndPoint" address="net.pipe://RemoteEvent/CMS7.5-2MirroringService" binding="netNamedPipeBinding" bindingConfiguration="RemoteEventsBindingNetPipe" contract="EPiServer.Events.ServiceModel.IEventReplication" />

</client>


#84843
Apr 08, 2014 11:17
Vote:
 

Just looked, in my web app web.config I see this:

    <services>
      <service name="EPiServer.Events.Remote.EventReplication">
        <!-- Uncomment this endpoint and the "RemoteEventServiceClientEndPoint" to enable remote events
            <endpoint name="RemoteEventServiceEndPoint"
                    contract="EPiServer.Events.ServiceModel.IEventReplication"
                    binding="customBinding"
                    bindingConfiguration="RemoteEventsBinding"
                    address="soap.udp://239.255.255.19:5000/RemoteEventService"/>-->
      </service>
      <service name="mymirroringapp.local/EPiServer.Events.Remote.EventReplication">
        <endpoint name="RemoteEventServiceEndPointNetPipe" address="net.pipe://RemoteEvent/mymirroringapp.localMirroringService" binding="netNamedPipeBinding" bindingConfiguration="RemoteEventsBindingNetPipe" contract="EPiServer.Events.ServiceModel.IEventReplication" />
      </service>
    </services>
    <client>
      <!-- Uncomment this endpoint and the "RemoteEventServiceEndPoint" to enable remote events
        <endpoint name="RemoteEventServiceClientEndPoint"
           address="soap.udp://239.255.255.19:5000/RemoteEventService"
           binding="customBinding"
           bindingConfiguration="RemoteEventsBinding"
           contract="EPiServer.Events.ServiceModel.IEventReplication"/>-->
      <endpoint name="mirroringSourceEndpoint" address="http://localhost:17002/MirroringSourceServer.svc" binding="basicHttpBinding" contract="EPiServer.MirroringService.MirroringSourceService.IMirroringSource" />
      <endpoint name="mirroringMonitoringEndPoint" address="http://localhost:17002/MirroringMonitoringServer.svc" bindingConfiguration="MonitoringMirroringBinding" binding="wsDualHttpBinding" contract="EPiServer.MirroringService.MirroringMonitoring.IMirroringMonitoringEventSystem" />
      <endpoint name="RemoteEventServiceClientEndPoint" address="soap.udp://239.255.255.19:5000/RemoteEventService" binding="customBinding" bindingConfiguration="RemoteEventsBinding" contract="EPiServer.Events.ServiceModel.IEventReplication" />
    </client>

 

And my mirroring web.config looks like this:

    <client>
      <endpoint address="" name="mirroringTargetEndPoint" binding="basicHttpBinding" bindingConfiguration="MirroringBinding" contract="EPiServer.MirroringService.MirroringTransferProtocol.Common.IMirroringDataTransfer" />
      <endpoint name="RemoteEventServiceClientEndPoint" address="net.pipe://RemoteEvent/mymirroringapp.localMirroringService" binding="netNamedPipeBinding" bindingConfiguration="RemoteEventsBindingNetPipe" contract="EPiServer.Events.ServiceModel.IEventReplication" />
    </client>

To be honest I've avoided changing the default settings as I don't really understand what these are doing or how these work, and I've not found any documentation about them. These seem to look like the defaults you have above, how can I tell if they are properly set-up?

Should I be uncommenting the commented out parts on the target web app web.config? It lookes like for the client that already has a verion in there with the same name.

Behaviours and bindings are also as default:

    <behaviors>
      <serviceBehaviors>
        <behavior name="DebugServiceBehaviour">
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <customBinding>
        <binding name="RemoteEventsBinding">
          <binaryMessageEncoding />
          <udpTransportCustom multicast="True" />
        </binding>
      </customBinding>
      <webHttpBinding>
        <binding name="IndexingServiceCustomBinding" maxBufferPoolSize="1073741824" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
          <readerQuotas maxStringContentLength="10000000" />
        </binding>
      </webHttpBinding>
      <wsDualHttpBinding>
        <binding name="MonitoringMirroringBinding" maxReceivedMessageSize="20000000">
          <security mode="None" />
        </binding>
      </wsDualHttpBinding>
      <netNamedPipeBinding>
        <binding name="RemoteEventsBindingNetPipe" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536">
          <security mode="None" />
        </binding>
      </netNamedPipeBinding>
    </bindings>
#84848
Apr 08, 2014 12:21
Vote:
 

congfigs looks oaky to me. After mirroring runs successfully, do IISRESET and see if you can see the mirrored content on target site. 

#84907
Apr 09, 2014 8:52
Vote:
 

If I do an IIS reset the mirrored content then shows up fine, so from the point of view of our current failover requirements it's at a level that's usable for what we need now.

Although it would be good to understand and resolve the issue in case of any future requirements that might involve load balanced solutions for example and how we'd manage cache clearing in those sorts of scenarios.

#84928
Apr 09, 2014 15:26
Vote:
 

Hi,

While configuring  content mirroring in my EPIserver CMS7 website i am getting an error message" Not possible to find sitesetting for content with reference".

I have configured mirroring in both the source and target site and both bin folders(root folder and content mirroring Bin folder) and their DLL's are identical.

Any help will be highly appreciated.

Thanks

Gunjan

#112652
Nov 03, 2014 11:53
Vote:
 

Hi Gunjan, 

Haven't seen such error before. When do you get this error ? 

#112722
Nov 04, 2014 12:46
Vote:
 

Hi Shahid,

I am getting this errror message when clicked on check system button after creating the channel.

please advise.

thanks

Gunjan

#112725
Nov 04, 2014 14:23
Vote:
 

Hi,

I have the requirment to invoke content mirroring using c# code.Basically the content mirroring will be getting invoked once the page is getting published using episerver sequential approval workflow.

content mirroring API's will be invoked on onpublishmethod() of the workflow code.

Please update if anyone have any concepts on this.

Regards

Gunjan

#112917
Nov 07, 2014 12:56
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.