Maxmind geoipupdate在docker运行时获得http 403



我使用maxmind GeoLite2二进制数据库的地理位置服务,我想更新这个定期。

通过brew安装的geoipupdate程序可以很好地进行更新。然而,Maxmind提供了一个docker镜像来定期更新db。当我尝试在下面运行docker命令时,

docker run --env-file IdeaProjects/ip-geolocation-service/src/main/resources/application.properties  -v /Users/me/GeoIp maxmindinc/geoipupdate

使用环境文件引用application.properties,

GEOIPUPDATE_ACCOUNT_ID=12345
GEOIPUPDATE_LICENSE_KEY=aaaaaaaaaa
GEOIPUPDATE_EDITION_IDS=GeoIP2-Country

I得到以下错误:

# STATE: Creating configuration file at /etc/GeoIP.conf
# STATE: Running geoipupdate
error retrieving updates: error while getting database for GeoIP2-Country: unexpected HTTP status code: received HTTP status code: 403: Invalid product ID or subscription expired for GeoIP2-Country

因为我的凭据是手动触发工作,我想知道为什么它没有工作在docker运行?有什么发现问题的方法吗或者有人遇到过吗?

你写你想使用免费的GeoLite2数据库,但你使用的ID看起来像商业/付费的一个。试试下面的命令:

GEOIPUPDATE_EDITION_IDS=GeoLite2-Country

来源:https://github.com/maxmind/geoipupdate/blob/main/doc/docker.md

最新更新