3

We have enabled the GeoIP service for our production environment but don't get it to work. Let me be more specifc:

  • The GeoIP test page works meaning we are connected and ip address submitted via the testpage are being located correctly.
  • We also see some visits being located. These are all locations that can visit the cms. Meaning the office of our customer. This might imply only CMS traffic is located or the CD traffic which is not routed via the loadbalancer is being located correctly.
  • We have a loadbalanced environment with 2 CD servers.
  • We configured the loadbalancer to add the x-forwarded-for header to all forwarded requests. We also configured the CD's to work with that.

This is the situation. We only see a fraction of the visits being located and only from the customers office. We think we have configured the loadbalancer and CD's correctly but is still doesn't work.

Can anyone point me in the right direction?

UPDATE 21-12: Hi, Thanks alot for replying this elaborate answer.

  1. Using the test GeopIp page from some blogpost, we were able to succesfully retrieve geoip information on the CM server. What you suggest is that the CD should also be allowed to connect to the GeoIp service? Can you confirm this since to my knowledge only the CM server should be allowed to connect to the GeoIp server.
  2. we checked the the x-forwarded-for header and it is configured correctly. Meaning no portnumber is added. We used the XdbHelper testpage from https://sitecoreblog.marklowe.ch/2017/12/santas-little-xdb-helper/.
  3. I can see the GeoIps collection containing some entries. There are far less entries than I would expect and the entries contain N/A for alllocation specific fields.
  4. CM and CD's are connected to the same xDB. Connection strings are the same and we see usage information in the analytics dashboard. I've got a question about that, though. Is the CM the only one connecting to the geoip service? And if so, can the CM decrypt the hashed IP address placed there by CD?
  5. thanks for the reminder ;-).

And one other question. Can I clean up the Locations or GeoIps collection or will this corrupt the integrity of the database?

  • I would expect the CD server needs access to the GeoIP service, why do you think it doesn’t? Sorry for the delay but unless you comment against my answer I can’t tell that you updated the question. – Richard Hauer Dec 28 '17 at 9:16
  • Installation guide mentions only one instance should have the lookup setting enabled, preferrably the CM. That's why my assumption that only the CM would try to lookup all ip's. Moreover I read an article regarding a task retrieving visits with the empty geoip entry and updating the visits with the found location. Perhaps it works differently but my CD's do have internet access so that should not be a problem in any case. – Arno Stolk Dec 29 '17 at 10:11
  • If it’s not a firewall issue then it’s probably configuration. I haven’t access at the moment but I would compare the CM and CD configs and look for material differences. Otherwise you can escalate to support, but that’s pretty much what they are going to say. – Richard Hauer Dec 29 '17 at 21:42
  • Yes, I will be doing that probably alot next week.. anyway, thanks for discussing the matter! As soon as we found the issue, I will post it. – Arno Stolk Dec 31 '17 at 7:09
4

There are a few things to note:

  1. some web servers have outbound firewalls, now it might be that the CD servers cannot access the GeoIP service
  2. make sure the X-Forwarded-For header is not appending the port number to the client IP - ARR and nginx do that under some configurations
  3. IP/geo mapping data is recorded in the xDB MongoDB - check the GeoIps collection to see if data is going in
  4. Both the CD and CM systems access the same xDB, so a mapped geo that's recorded by the CM would be accessible to the CD, even if the CD couldn't execute the geo search itself due to a firewall restriction, for example
  5. while GeoIP can be used for personalisation, it's not great for a 'first page' experience because the remote call is often too slow to make the user experience acceptable (I realise you didn't mention this, it's just a good tip to know)

Let me know if these don't meet your circumstances.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.