Regional Data Tracking in Docker (OJS 3.3.0-19)

Describe the issue or problem
City/Region data are not being shown in usage reports

Steps I took leading up to the issue

Firstly, the MaxMind database is no longer available at the given URL, but I found it elsewhere. And because I am using docker4ojs, I have had to adapt the instructions at https://docs.pkp.sfu.ca/admin-guide/3.3/en/statistics#configure-regional-data-tracking, and am bind-mounting the GeoLiteCity.dat file in the volumes section of the compose file with - ./GeoLiteCity.dat:/var/www/html/plugins/generic/usageStats/GeoLiteCity.dat.

# In the same folder as `docker-compose.yml`
wget https://dl.miyuru.lk/geoip/maxmind/city/maxmind.dat.gz
gunzip maxmind.dat.gz
mv maxmind.dat GeoLiteCity.dat
chown systemd-network:systemd-journal GeoLiteCity.dat

This seems to be successful because when I list the plugins/generic/usageStats/ within the container I see GeoLiteCity.dat together with other files such as GeoLocationTool.inc.php and OJSUsageStatsReportPlugin.inc.php:

-rw-r--r--    0 apache   apache    26947787 Aug  6 20:46 GeoLiteCity.dat
-rw-r--r--    1 apache   apache        4301 Aug 25 11:29 GeoLocationTool.inc.php

I have enabled the City and Region checkboxes in the Usage Statistics plugin settings, restarted the Docker network, and waited several days to allow the scheduled tasks to collect and process the data. Reports are generated showing visits to the site, exactly as before I mounted the GeoLiteCity.dat, with no city or region data included.

Are there perhaps additional steps required, such as resetting the usage stats module so that it detects the IP database?

What application are you using?
OJS 3.3.0-19 in docker-ojs

UPDATE: It turns out that the version of the MaxMind database that I found was incorrect and incompatible. I’ve resolved the issue by downloading a different version of the database directly into the project root, without any need to unzip an archive:

# In the same folder as `docker-compose.yml`
wget https://github.com/mbcc2006/GeoLiteCity-data/raw/refs/heads/master/GeoLiteCity.dat

This is what it looks like - a little smaller than the previous database, and probably less recent in origin:

-rw-r--r-- 1 systemd-network systemd-journal 20539238 Nov  6 21:27 GeoLiteCity.dat
-rw-r--r-- 1           10010 psacln             34513 Apr 11  2024 LICENSE
-rw-r--r-- 1           10010 psacln             22468 Apr 11  2024 README.md
-rw-r--r-- 1           10010 psacln              1638 Oct 13 13:04 docker-compose.yml
drwxr-xr-x 9 systemd-network systemd-journal     4096 Apr 11  2024 volumes

City/Region data are now being shown in usage reports. :partying_face:

2 Likes