Wednesday, January 17, 2018

Sitecore 9 analytics data not loading

After installing a fresh copy of Sitecore 9, I noticed that none of my Experience Analytics or Experience Profile data was showing.

Sitecore 9 - Experience Analytics errors
Sitecore 9 - Experience Profile errors
Looking into the developer tools console in Chrome I notice the following error:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
This was for an analytics API call: http://MyDomain/sitecore/api/ao/v1/aggregates/latest-visitors?&pageSize=20&pageNumber=1&sort=LatestVisitStartDateTime%20desc

Sitecore logs files were quite full and the following stood out:
Exception: System.IO.IOException
Message: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
Source: System
   at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
   at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
Nested Exception
Exception: System.Net.Sockets.SocketException
Message: An existing connection was forcibly closed by the remote host
Source: System
   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
   at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
It appeared to be an error in connecting with xConnect. I tried to load the xConnect URL in my browser and the site would not load. Looking at the certificate that my xConnect was configured to use, I noticed that it was issues to a different domain name (sc9test_.xconnect instead of sc9test_.xconnect_client).

After changing the binding in IIS, adding it to my local hosts file and updating the connection string in Sitecore, the analytics errors disappeared.

The xConnect site would also load in my local browser as expected:
Sitecore xConnect loading in browser

No comments:

Post a Comment