1

I am new to the GeoIP solution. Some things have changed regarding legacy GeoIP dbs which has made it seem a little more complicated.

I am on AWS Linux

I have installed GeoIP:

rpm -qa |grep GeoIP

GeoIP-devel-1.4.8-1.5.amzn1.x86_64

GeoIP-1.4.8-1.5.amzn1.x86_64

apache/httpd is:

rpm -qa |grep httpd

httpd24-2.4.41-1.88.amzn1.x86_64

httpd24-tools-2.4.41-1.88.amzn1.x86_64

I have set up an account on the maxmind website, and populated /etc/GeoIP.conf like this:

SNIP

AccountID redacted

LicenseKey redacted

EditionIDs GeoLite2-ASN GeoLite2-City GeoLite2-Country

END SNIP

The errors i see in /var/log/httpd/error_log are like this:

Error Opening file /usr/share/GeoIP/GeoIP.mmdb

Error Opening file /usr/share/GeoIP/GeoIP.mmdb

Error Opening file /usr/share/GeoIP/GeoIP.mmdb

Error Traversing Database for ipnum = 886277125 - Perhaps database is corrupt?

Error Traversing Database for ipnum = 886277125 - Perhaps database is corrupt?

Error Traversing Database for ipnum = 168300841 - Perhaps database is corrupt?

Error Traversing Database for ipnum = 168300643 - Perhaps database is corrupt?

Error Traversing Database for ipnum = 168300841 - Perhaps database is corrupt?

Error Traversing Database for ipnum = 0 - Perhaps database is corrupt?


So I checked if I am able to extract information from the db:

mmdblookup --file /usr/share/GeoIP/GeoLite2-Country.mmdb --ip xxx.xxx.xxx.x country names en

"Ireland"

So, now we know that the GeoIP db contains data; we know it is correctly identifying the country of origin of the IP address for our test server. The problem at this point is that apache is not able to load the GeoIP db still.

It's not clear to me what the next steps might be to troubleshoot.

Also, I am not sure how much this matters but this is being installed on a Jira/Confluence server, so the apache/httpd service listens on 443 and then passes the traffic to the java instance. I don't think it matters really because the traffic hits apache first. It seems like apache can't access the geoip database for some reason. I have tried changing ownership of database to apache:apache from root and this did not work either.

What are next steps?

    [Wed Jan 22 21:14:25.057803 2020] [so:warn] [pid 13168] AH01574: module ssl_module is already loaded, skipping
    VirtualHost configuration:
    *:443                  redacted
 (/etc/httpd/conf.d/ssl.conf:77)
    *:80                   redacted
 (/etc/httpd/conf/httpd.conf:359)
    ServerRoot: "/etc/httpd"
    Main DocumentRoot: "/var/www/html"
    Main ErrorLog: "/etc/httpd/logs/error_log"
    Mutex default: dir="/var/run/httpd/" mechanism=default
    Mutex mpm-accept: using_defaults
    Mutex cache-socache: using_defaults
    Mutex authdigest-opaque: using_defaults
    Mutex watchdog-callback: using_defaults
    Mutex proxy-balancer-shm: using_defaults
    Mutex rewrite-map: using_defaults
    Mutex ssl-stapling-refresh: using_defaults
    Mutex authdigest-client: using_defaults
    Mutex lua-ivm-shm: using_defaults
    Mutex ssl-stapling: using_defaults
    Mutex proxy: using_defaults
    Mutex authn-socache: using_defaults
    Mutex ssl-cache: using_defaults
    PidFile: "/var/run/httpd/httpd.pid"
    Define: DUMP_VHOSTS
    Define: DUMP_RUN_CFG
    User: name="apache" id=48
    Group: name="apache" id=48
user203106
  • 51
  • 1
  • 4
  • You checked the file `/usr/share/GeoIP/GeoLite2-Country.mmdb`, but Apache complains about `/usr/share/GeoIP/GeoIP.mmdb`. Does the file exist? – Piotr P. Karwasz Jan 22 '20 at 21:32
  • Thank you for catching that. I do not get that error, however I still get these errors: [Thu Jan 23 17:48:06.300090 2020] [core:notice] [pid 18268] AH00094: Command line: '/usr/sbin/httpd' Error Traversing Database for ipnum = 0 - Perhaps database is corrupt? I have downloaded a new db; the file is identical to the old one. I will try it anyway but I don't think it will make a difference, – user203106 Jan 23 '20 at 17:52
  • If you add the configuration of **mod_maxminddb**, that might give some insights. – Piotr P. Karwasz Jan 23 '20 at 18:29
  • Hi @PiotrP.Karwasz I have this:[root@jiratest conf.d]# rpm -qa|grep geo mod24_geoip-1.2.7-1.6.amzn1.x86_64 GeoIPEnable On GeoIPDBFile /usr/share/GeoIP/GeoLite2-Country.mmdb SetEnvIf GEOIP_COUNTRY_CODE IE BlockCountry – user203106 Jan 23 '20 at 20:15

0 Answers0