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.
- 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.
- 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/.
- 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.
- 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?
- 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?