Giter Site home page Giter Site logo

Geoip not returning city data about geoip HOT 13 CLOSED

kuno avatar kuno commented on July 16, 2024
Geoip not returning city data

from geoip.

Comments (13)

kuno avatar kuno commented on July 16, 2024

thank your report.

Will take a look ASAP.

from geoip.

kuno avatar kuno commented on July 16, 2024

I saw you are on node 0.6.x.

If possible, please update to node 0.8.x, the support for node 0.6.x is now been obsoleted

from geoip.

jhiraygit avatar jhiraygit commented on July 16, 2024

Thank you Kunno, let me upgrade node to 0.8.x

from geoip.

jhiraygit avatar jhiraygit commented on July 16, 2024

Hi Kunno, now I have node v0.8.6, however I see same issue. Thank you.

from geoip.

kuno avatar kuno commented on July 16, 2024

Do you use the latest city data from maxmind?
Are you sure there are actual ip address in req.header('X-Forwarded-For')?

Because the city.lookupSync method is works me without any problem if I provided the valid ipv4 address to it.

from geoip.

jhiraygit avatar jhiraygit commented on July 16, 2024

Hi Kuno, I have latest city data file from maxmind. req.header('X-Forwarded-For') also gives me correct IP address. I also noticed some of IPs are getting city code and some are not.

What I found is with certain IP addresses city.lookupSync does not return city data.

Thank you.

from geoip.

kuno avatar kuno commented on July 16, 2024

@jhiraygit

Can you give me some example ip address that didn't return data?

from geoip.

jhiraygit avatar jhiraygit commented on July 16, 2024

try this one : 50.152.210.240

from geoip.

kuno avatar kuno commented on July 16, 2024

it return some data on my machine

> city.lookupSync('50.152.210.240');
{ country_code: 'US',
  country_code3: 'USA',
  country_name: 'United States',
  latitude: 38,
  longitude: -97,
  continent_code: 'NA' }
>

from geoip.

jhiraygit avatar jhiraygit commented on July 16, 2024

right, I get same data but it does not have city data

from geoip.

kuno avatar kuno commented on July 16, 2024

@jhiraygit

this is a normal situation, it turns out that for some ip addresses the maxmind's city database is not accurate enough to have the actual info about city.

this is normal for free version db, not sure the situation in commercial version.

from geoip.

jhiraygit avatar jhiraygit commented on July 16, 2024

Thank you Kuno. Strange thing is it was showing city fine for some time and suddenly stopped.

from geoip.

kuno avatar kuno commented on July 16, 2024

Done.

from geoip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.