Troubleshooting Sitecore IP Geolocation service

  • Description

    The IP Geolocation service provides information about the physical location of website visitors when you use Sitecore DMS or xDB.

    In the situation when you suspect that the collected information is either incorrect or not up-to-date, use one of the following solutions.

    There may be the following related symptoms:

    • The location data are incorrect in the Analytics reports;
    • Lookups are not counted in the App Center UI;
    • This or similar errors appear in log files: 
      ManagedPoolThread #4 2015:06:28 00:00:36 ERROR Error retrieving geo ip information for ip 000.000.000.000
      Exception: System.Net.WebException
      Message: The operation has timed out
      Source: System
      at System.Net.HttpWebRequest.GetResponse()
      at Sitecore.CES.Client.WebClient.ExecuteRequest(String requestUri)
      at Sitecore.CES.Client.ResourceConnector`1.Request(String endpoint, Object[] parameters)
      at Sitecore.CES.GeoIp.SitecoreProvider.GetInformationByIp(String ip)‌
  • Ensure that the module has been properly installed and configured:

    • Check that you purchased the related service in the App Center ("Sign up and Invoicing: IP Geolocation Service", page 18);
    • Check that all configuration files in the /App_Config/Include/CES folder are enabled;
    • Open the http://hostname/sitecore/admin/showconfig.aspx page and verify that the following configuration is present:

      For Sitecore 6.4-7.2:

      <lookupmanager defaultprovider="default" patch:source="Sitecore.Analytics.config">
        <providers>
      <clear/>
         <add name="default" type="Sitecore.CES.GeoIp.SitecoreProvider, Sitecore.CES.GeoIp">
          <param ref="GeoIpConnector" patch:source="Sitecore.CES.GeoIp.config" />
          <param ref="EndpointSource" patch:source="Sitecore.CES.GeoIp.config" />
      </add>   
        </providers>
      </lookupmanager>

      For Sitecore 7.5-8.0:

      <lookupmanager defaultprovider="default" patch:source="Sitecore.Analytics.config">
        <providers>
      <clear/>
         <add name="default" type="Sitecore.CES.GeoIp.SitecoreProvider, Sitecore.CES.GeoIp">
          <param ref="GeoIpConnector" patch:source="Sitecore.CES.GeoIp.config" />
      </add>   
        </providers>
      </lookupmanager>
  • Check that the firewall rules are configured correctly. For the Geo Ip service, HTTPS protocol is used for the following URLs:

    • geoIp-ces.cloud.sitecore.net
    • discovery-ces.cloud.sitecore.net

    Note: if it is not possible to configure rules based on URL, you must provide access for the following list of IPs:
    Azure Datacenter IP Address Ranges

  • Send a direct request to the service using your environment and license to check service availability:

    • Save the TestIp.aspx file (for Sitecore 6.4.1 use TestIp.aspx) into the /sitecore folder;
    • Open the http://hostname/sitecore/TestIp.aspx page;
    • Enter any known IP address (e.g. 193.200.33.51) into the text box and select "GetInformationByIp".

    If the information about the IP address is displayed on the page, the service is accessible.

    Important: Do not use the code of this page to get information about IP addresses. This code always requests information directly from the service, which may lead to excessive charges for the service usage.

  • When IP information is requested, the following steps are performed:

    • Lookup of IP information in the memory cache;
    • Lookup of IP information in the database;
    • Request to the Geolocation service. 

    Therefore, always check whether the correct IP information is stored in the Analytics database:

    • Sitecore 7.5 - Sitecore 8.x: the "GeoIps" collection, Collection database (MongoDB)
    • Sitecore 6.4.1 - Sitecore 7.2: the "GeoIps" table, Analytics database (SQL)

Applies to:

App Center 1+

July 24, 2015
December 23, 2015

Keywords: 

  • App Center,
  • DMS,
  • xDB