Bug 1604029 - geoipupdate fail because GeoIP 1.x free databases are no longer updated
Summary: geoipupdate fail because GeoIP 1.x free databases are no longer updated
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: GeoIP
Version: 7.7
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Michal Ruprich
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-19 20:03 UTC by Rodrigo Gomes
Modified: 2019-01-13 01:01 UTC (History)
3 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2018-11-22 12:31:37 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 1547993 None NEW GeoIP package should not contain both libraries and binaries 2019-05-06 07:18 UTC
Red Hat Bugzilla 1576034 None CLOSED stock configuration causes geoipupdate to fail 2019-05-06 07:18 UTC

Description Rodrigo Gomes 2018-07-19 20:03:47 UTC
Description of problem:
As of April 1, 2018, the legacy GeoLite (free) databases are no longer being updated by MaxMind:

https://blog.maxmind.com/2018/01/02/discontinuation-of-the-geolite-legacy-databases/

The current symptom of this deprecation is the following error message when attempting to run "geoipupdate":

"Received Error -21 (Sanity check database_info string failed) when attempting to update GeoIP Database"

The secondary symptom will be increasing inaccuracy until January 2019, at which point the legacy (1.x) free databases will be taken offline entirely. Version 2 free databases are still available and supported (as are paid 1.x databases, for now). GeoIP2 was released in October of 2013.

Version-Release number of selected component (if applicable):
[~]# yum list installed | grep -i geoip
GeoIP.x86_64                               1.5.0-11.el7                @base    
GeoIP-devel.x86_64                         1.5.0-11.el7                @cloudlinux-x86_64-server-7
GeoIP-update.noarch                        1.5.0-11.el7                @cloudlinux-x86_64-server-7

How reproducible:
Every time

Steps to Reproduce:
1. [~]# geoipupdate -v

Actual results:
Opened License file /etc/GeoIP.conf
Read in license key 000000000000
number of product ids 2 
Connecting to MaxMind GeoIP server
via Host or Proxy Server: updates.maxmind.com:80
sending request GET /app/update_getfilename?product_id=506 HTTP/1.0
Host: updates.maxmind.com
 database product id 506 database file name /usr/share/GeoIP/GeoLiteCountry.dat 
/usr/share/GeoIP/GeoLiteCountry.dat can't be opened, proceeding to download database
MD5 sum of database /usr/share/GeoIP/GeoLiteCountry.dat is 0000000000000000000000000000000 
Connecting to MaxMind GeoIP Update server
sending request GET /app/update_getipaddr HTTP/1.0
Host: updates.maxmind.com
client ip address: 209.133.207.180
md5sum of ip address and license key is 4c3e8e3aa9b22a32962323d4a172bf81 
sending request GET /app/update_secure?db_md5=0000000000000000000000000000000&challenge_md5=4c3e8e3aa9b22a32962323d4a172bf81&user_id=999999&edition_id=506 HTTP/1.0
Host: updates.maxmind.com
Downloading gzipped GeoIP Database...
Done
Updating /usr/share/GeoIP/GeoLiteCountry.dat
Saving gzip file to /usr/share/GeoIP/GeoLiteCountry.dat.gz ... download data to a gz file named /usr/share/GeoIP/GeoLiteCountry.dat.gz 
Done
Uncompressing gzip file ... Done
Performing sanity checks ... Database type is 1
database_info  FAIL null
Received Error -21 (Sanity check database_info string failed) when attempting to update GeoIP Database
Connecting to MaxMind GeoIP server
via Host or Proxy Server: updates.maxmind.com:80
sending request GET /app/update_getfilename?product_id=533 HTTP/1.0
Host: updates.maxmind.com
 database product id 533 database file name /usr/share/GeoIP/GeoLiteCity.dat 
/usr/share/GeoIP/GeoLiteCity.dat can't be opened, proceeding to download database
MD5 sum of database /usr/share/GeoIP/GeoLiteCity.dat is 0000000000000000000000000000000 
md5sum of ip address and license key is 4c3e8e3aa9b22a32962323d4a172bf81 
sending request GET /app/update_secure?db_md5=0000000000000000000000000000000&challenge_md5=4c3e8e3aa9b22a32962323d4a172bf81&user_id=999999&edition_id=533 HTTP/1.0
Host: updates.maxmind.com
Downloading gzipped GeoIP Database...
Done
Updating /usr/share/GeoIP/GeoLiteCity.dat
Saving gzip file to /usr/share/GeoIP/GeoLiteCity.dat.gz ... download data to a gz file named /usr/share/GeoIP/GeoLiteCity.dat.gz 
Done
Uncompressing gzip file ... Done
Performing sanity checks ... Database type is 1
database_info  FAIL null
Received Error -21 (Sanity check database_info string failed) when attempting to update GeoIP Database

Expected results:
Success

Additional info:

Comment 2 Michal Ruprich 2018-07-31 09:51:49 UTC
Hi Rodrigo, 

yes we know about this issue. Right now this error -21 is actually a problem of MaxMind returning a message with a little bit different text. For the free user ID, it used to return 'Invalid UserID', now it returns 'Invalid user ID'. When this happens, geoipupdate doesn't recognize the return message and believes that the tar.gz file containing the database was downloaded. But that doesn't happen of course.

geoipupdate should work the same for paid legacy databases but that is not the right solution. I would like to add libmaxminddb and geoipupdate in the future release so that users are able to use GeoLite2 databases.

Comment 3 Rodrigo Gomes 2018-07-31 18:09:26 UTC
Hello Michal,

This will be amazing, thank you!

Comment 4 Red Hat Bugzilla Rules Engine 2018-11-22 12:31:37 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.

Comment 5 Stefan Neufeind 2019-01-13 01:01:18 UTC
Can we then please have a fix for the returned error (Invalid user ID)? And maybe have /etc/cron.weekly/geoipupdate from GeoIP-update no longer active by default, so that maybe for existing installations with that package it won't try to update anymore or something?


Note You need to log in before you can comment on or make changes to this bug.