Sitecore xDB Cloud 2.0 – Configuration, Connection, and Troubleshooting

In earlier, blog posts we discussed the basics of xDB Cloud, some of the advantages and disadvantages of using xDB Cloud as well some useful terminologies. Now we will see how to configure xDB Cloud for various environments. Consider below versions of the resources for our exercise:

  • Sitecore Experience Platform 8.1 rev. 160519 (8.1 Update-3)
  • xDB Cloud 2.o
  • Sitecore xDB Cloud 8.1 rev. 160721

Configuration

  • Get xDB subscription by getting in touch with Sitecore. Make sure it is attached with your license id. If you make any change to your licensing than reassure it is still attached with the xDB Cloud. Consider the usage and requirement of business subscribe a number of xDB Cloud database set required.

  • Once you have subscribed for xDB Cloud, To request an xDB Cloud 2.0 customer set, You required below things:

    • Your License ID (11111111111111). Get it from the license file. Sitecore 8.1 now requires a license with the “Sitecore.xDB.base” key to enable all features of the Experience Platform. If your license file does not contain this key, Sitecore will default to Experience Management (CMS-only) mode. Any customers or partners with a license to Experience Platform should contact their account manager or login to SPN if they are missing this key.
    • Your Deployment Id (COMPANYPROD81). Get it based on a role of the instance like Dev, Stag, Prod etc. If you do not receive it from Sitecore support, get it using Rest API.
    • The version of Sitecore that you are running (8.1 rev. 160519).
    • The preferred location for your xDB Cloud environment. See the xDB Cloud Service compatibility tables for compatible data center locations. Though, you don’t required it to specify anywhere.
    • MongoDB connection strings:
      analytics, live, tracking.history, tracking.contact. If you do not receive it from Sitecore support, get it using Rest API.
    • A Search index connection string (applicable to Sitecore 8.2.1 and later): cloud.search.
    • Reporting service settings, including the address of the service and the thumbprint of the SSL certificate. If you do not receive it from Sitecore support, get it using Rest API.
  • Download xDB Cloud Client based on Sitecore version and xDB Cloud version. In our case, we needed to download Sitecore xDB Cloud 8.1 rev. 160721. Check https://kb.sitecore.net/articles/966080 for xDB Cloud Service compatibility tables.

  • Now, we need to Enable/Disable the config files as per the role we are configuring.

    • CM: Enable/Disable the files as described in https://doc.sitecore.net/sitecore_experience_platform/81/setting_up_and_maintaining/xdb/configuring_servers/configure_a_content_management_server and Config Enable Disable spreadsheet. Note: based on the version of Sitecore, this will be very.
    • CD: Enable/Disable the configs as described in https://doc.sitecore.net/sitecore_experience_platform/81/setting_up_and_maintaining/xdb/configuring_servers/configure_a_content_delivery_server and Config Enable Disable spreadsheet. Note: based on the version of Sitecore, this will be very.
    • CM + CD (Development): Ensure that the following configuration files are disabled or removed from your local installation by adding .disabled to the end of the file name.
      File path (relative to the website root) Configuration file name
      /App_Config/Include Sitecore.Analytics.Processing
      .Aggregation.Services.config
      /App_Config/Include Sitecore.Analytics.Processing
      .Services.config
      /App_Config/Include Sitecore.Analytics.Tracking
      .Database.ScaledCM.config
      /App_Config/Include Sitecore.MarketingProcessing
      Role.config
      /App_Config/Include Sitecore.PathAnalyzer
      .Processing.config
      /App_Config/Include/CES Sitecore.CES.DeviceDetection
      .CheckInitialization.config
      /App_Config/Include/ContentTesting Sitecore.ContentTesting
      .Processing.Aggregation.config
      /App_Config/Include/ExperienceAnalytics Sitecore.ExperienceAnalytics
      .Aggregation.config
      /App_Config/Include/ExperienceAnalytics Sitecore.ExperienceAnalytics
      .ReAggregation.config
      /App_Config/Include/ExperienceAnalytics Sitecore.ExperienceAnalytics
      .StorageProviders.config
      /App_Config/Include/ExperienceAnalytics Sitecore.ExperienceAnalytics
      .Reduce.config
  • Configure a content management server to use a remote Reporting Service Server as per https://doc.sitecore.net/sitecore_experience_platform/setting_up_and_maintaining/xdb/configuring_servers/configure_a_content_management_server_to_use_a_remote_reporting_service_server Specify ReportingServiceUrl given by Sitecore Support. If you do not receive it from Sitecore support, get it using Rest API.

  • For xDB Cloud 2.0, Update the Path Analyzer configurations. If you connect to a dedicated remote reporting instance, then the content management server no longer has direct access to the Sitecore.Analytics SQL Server reporting database. Instead, the Path Analyzer client retrieves data from a remote reporting server with direct access to the SQL database using Web API services. To enable the Path Analyzer client to communicate with the remote reporting server, make the following configuration file changes:

    Configuration file Folder Enable Disable
    Sitecore.PathAnalyzer
    .RemoteClient.config
    App_Config/Include Picture 154
    Sitecore.PathAnalyzer
    .Processing.config
    App_Config/Include Picture 155
    Sitecore.PathAnalyzer
    .Services.RemoteServer.config
    App_Config/Include Picture 156
  • In the XdbCloud folder (Website/App_Config/Include/xDBCloud), delete the following files. If they already have the extension.disabled it is a good idea to delete them at this point.

    • Sitecore.Cloud.Xdb.config
    • Sitecore.ContentSearch.Cloud.Index.Analytics.config
    • Sitecore.ContentSearch.Cloud.Default.IndexConfiguration.config

 

  • Use the Sitecore Installation Wizard to install the Sitecore xDB Cloud 8.1 rev. 160721 package.

  • To configure instance to communicate with dedicated Azure services of Sitecore xDB Cloud

    • In the fileConnectionStrings.config(Website/App_Config), configure the MongoDB database connection strings by using the connection strings from the response that you received from Sitecore Support. If you do not receive it from Sitecore support, get it using Rest API.The MongoDB connection strings:
      • analytics
      • tracking.live
      • tracking.history
      • tracking.contact

      Note: For a CD instance, you do not require the tracking.history connection string.

    • In the ConnectionStrings.config file (Website/App_Config), add the analytics.cloud.index Connectionstring. Which you generally do not find in ConnectionStrings.config
    • In the ConnectionStrings.config file (Website/App_Config), ensure the following connection string is removed:<add name="reporting" connectionString="Data Source=…"/>
    • In the Xdb Cloud folder (Website/App_Config/Include/xDBCloud), enable the following configuration file:
      • Sitecore.Cloud.Xdb.config

      For versions prior to 8.2 Update-1, also enable below config files:

      • Sitecore.ContentSearch.Cloud.DefaultIndexConfiguration.config
      • Sitecore.ContentSearch.Azure.Index.Analytics.config
        (There isn't such config file available. Enable below config file instead.)
        Sitecore.ContentSearch.Cloud.Index.Analytics.config
    • In the folder (Website/App_Config/Include/), disable the following configuration files:
      • Sitecore.ContentSearch.Lucene.Index.Analytics.config
      • Social\Sitecore.Social.Lucene.Index.Analytics.Facebook.config
    • In the Sitecore.Cloud.Xdb.config file (Website/App_Config/Include/Xdb Cloud), configure the reporting service by using the actual Service URL and SSL certificate thumbprint from the response that you received from Sitecore Support, for example:
      <httpTransportFactory patch:instead="httpTransportFactory" type="Sitecore.Cloud.Xdb.CloudBasedTransportFactory, Sitecore.Cloud.Xdb" singleInstance="true">
      <param desc="serviceUrl">[reporting service URL]</param>
      <param desc="certificateThumbprint">[SSL certificate thumbprint]</param>
      </httpTransportFactory>

      By setting this reporting service properly, you will able to see experience analytics reports working on your Sitecore instance. Still you need to confirm if analytics data are getting stored to MongoDB or not.

  • To complete the xDB Cloud client configuration and connection to the xDB Cloud service, you must deploy marketing definitions.

    • On the Sitecore Launchpad, click Control Panel, Analytics, Deploy marketing definitions.
    • In the Deploy marketing definitions dialog box, select all of the definitions and taxonomies and click Deploy.

Connection

After successfully configuring xDB Cloud for your website, you will be very eager to test it by connecting to MongoDB. But unfortunately there isn’t a straight forward of doing same as you cannot connect to xDB Cloud using Robomongo or MongoVUE tool.

These are the best possible ways doing same:

  • Using Rest API like
  • By generating some random traffic on the site, and by manually or technically doing Session Abandon to reflect the Contact details in Experience Profile.
  • Give a unique name to the site definition rather than website, and generate the random traffic to get the unique site name reflected in Analytics Reports when Session ends.
  • If none of the above trick work than there is maximum chance of connectivity issue, means your data is not getting saved to MongoDB. But still as last option, you can contact Sitecore Support and request full database set collections as backup. By examining the backup collections, you can confirm weather data is getting stored or not.

Troubleshooting

While configuring/connecting xDB Cloud, I ran into several issues. Below are some note on that if you face the same, can save your day by applying these tweaks:

  • While deploying Marketing Definitions to complete the configuration/setup, i was getting following error:
    MarketingDefinitions
    Kiran Patil – Maiden Indian Sitecore MVP, found following error in log file Could not find configuration node: marketingDefinitions/asset/repositories/remote.
    And with his analytical ability he was able to solve this by enabling following config file Sitecore.Xdb.Remote.Client.MarketingAssets.config in \Website\App_Config\Include\
  • While data was getting stored to xDB Cloud at one infrastructure without touching Firewall settings, at another infrastructure it was not getting saved by performing all same steps mentioned above. By checking log file I found error ERROR unable to connect to a member of the replica set matching the read preference primary.
    One of the thing i tried to get rid of this error is removing replica set and secondary servers from ConnectionString which didn’t solved the issue but ended up changing error to ERROR Unable to connect to server *.mongolab.com:[port]: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    I ended up reverting the change. And looking into Firewall related settings. Will share my learning once i solve the issue.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s