Flood: geoip county error 404

Created on 2 Jan 2019  路  5Comments  路  Source: Flood-UI/flood

Type: Bug Report

  • [x] Try to follow the update procedure described in the README and try again before opening this issue.
  • [x] Please check the F.A.Q..
  • [x] Please check the Troubleshooting wiki section.

Your Environment


Version used:
Version (stable release): v1.0.0
Commit ID (development release): a7a849e

  • Environment name and version:

    • Node.js version: v8.14.0

    • npm version: 6.4.1

    • Web browser name and version

  • Operating System and version: arch x64

Summary


when I run npm install, error 404 "not fount" https://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip

Possible Solution



Update package [email protected] or change url from download

Context

> [email protected] postinstall /app/flood/node_modules/geoip-country-only
> npm run-script updatedb


> [email protected] updatedb /app/flood/node_modules/geoip-country-only
> node scripts/updatedb.js

Fetching  https://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip
Retrieving GeoIPCountryCSV.zip .../app/flood/node_modules/geoip-country-only/scripts/updatedb.js:111
                        console.log('ERROR'.red + ': HTTP Request Failed [%d %s]', status, https.STATUS_CODES[status]);
                                                                                                             ^

TypeError: Cannot read property '404' of undefined
    at ClientRequest.onResponse (/app/flood/node_modules/geoip-country-only/scripts/updatedb.js:111:89)
    at Object.onceWrapper (events.js:315:30)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:558:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
    at TLSSocket.socketOnData (_http_client.js:454:20)
    at emitOne (events.js:116:13)
    at TLSSocket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
duplicate more info needed

Most helpful comment

Found the cause. This package is ancient (last updated 2 years ago) and gets its data from GeoLite. GeoLite2 has been around for a while and GeoLite was deprecated sometime last year.

On 2nd January 2019 they removed the legacy GeoLite dataset from the website, so requests to it will now 404 - as per the error we're getting.

See: https://github.com/bluesmoon/node-geoip/issues/85#issuecomment-373958249

@noraj no more information is needed :smile:


Solution would be to ditch geoip-country-only and use geoip-lite (which the former was a stripped down fork of) which is actively maintained and recently added support for GeoLite2 (https://github.com/bluesmoon/node-geoip/pull/138).

It's ~10 KB versus the current ~6 KB dependency so not that much of a size increase.

All 5 comments

duplicate of #750

@noeuse Please fill this, this is important:

* Version used:
  + Version (stable release) `git --no-pager tag`
  + Commit ID (development release) `git --no-pager log -1`

instead of development release

@noraj

Version used:
Version (stable release): v1.0.0
Commit ID (development release): a7a849e

Found the cause. This package is ancient (last updated 2 years ago) and gets its data from GeoLite. GeoLite2 has been around for a while and GeoLite was deprecated sometime last year.

On 2nd January 2019 they removed the legacy GeoLite dataset from the website, so requests to it will now 404 - as per the error we're getting.

See: https://github.com/bluesmoon/node-geoip/issues/85#issuecomment-373958249

@noraj no more information is needed :smile:


Solution would be to ditch geoip-country-only and use geoip-lite (which the former was a stripped down fork of) which is actively maintained and recently added support for GeoLite2 (https://github.com/bluesmoon/node-geoip/pull/138).

It's ~10 KB versus the current ~6 KB dependency so not that much of a size increase.

This is now fixed and can be closed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

geopsllc picture geopsllc  路  5Comments

jakoblover picture jakoblover  路  6Comments

jvacek picture jvacek  路  3Comments

angristan picture angristan  路  4Comments

valdearg picture valdearg  路  3Comments