Skip to content
This repository has been archived by the owner. It is now read-only.

Reverse address lookup no response #5355

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 10 comments
Closed

Reverse address lookup no response #5355

openstreetmap-trac opened this issue Jul 23, 2021 · 10 comments

Comments

@openstreetmap-trac
Copy link

@openstreetmap-trac openstreetmap-trac commented Jul 23, 2021

Reporter: WayneDRussell
[Submitted to the original trac issue database at 8.54am, Tuesday, 22nd September 2015]

There is no response from server at 192.186.221.150 when http://nominatim.openstreetmap.org/reverse?format=json&lat=53.0093139&lon=-2.1549828&zoom=18&addressdetails=0 is requested

@openstreetmap-trac
Copy link
Author

@openstreetmap-trac openstreetmap-trac commented Jul 23, 2021

Author: TomH
[Added to the original trac issue at 11.40am, Wednesday, 23rd September 2015]

That probably means you have ignored all the error codes telling you that you are abusing it for long enough that an IP block has been added against your IP address.

@openstreetmap-trac
Copy link
Author

@openstreetmap-trac openstreetmap-trac commented Jul 23, 2021

Author: mtmail
[Added to the original trac issue at 12.19pm, Wednesday, 23rd September 2015]

Hi,

The blocking of IP addresses is automated. It will be released within 24h. See http://wiki.openstreetmap.org/wiki/Nominatim_usage_policy

@openstreetmap-trac
Copy link
Author

@openstreetmap-trac openstreetmap-trac commented Jul 23, 2021

Author: TomH
[Added to the original trac issue at 12.23pm, Wednesday, 23rd September 2015]

But once you are unblocked pay attention to the "429 Too Many Requests" responses and slow down when you get them!

@openstreetmap-trac
Copy link
Author

@openstreetmap-trac openstreetmap-trac commented Jul 23, 2021

Author: WayneDRussell
[Added to the original trac issue at 2.33pm, Wednesday, 23rd September 2015]

Hi,
Thanks for the information.

What is the best way to test for this error?

Wayne

@openstreetmap-trac
Copy link
Author

@openstreetmap-trac openstreetmap-trac commented Jul 23, 2021

Author: TomH
[Added to the original trac issue at 2.34pm, Wednesday, 23rd September 2015]

Well it's the HTTP status returned by the request, so just check that in the normal way in your client.

@openstreetmap-trac
Copy link
Author

@openstreetmap-trac openstreetmap-trac commented Jul 23, 2021

Author: WayneDRussell
[Added to the original trac issue at 3.12pm, Wednesday, 23rd September 2015]

Hi,
I am currently using:
$json = file_get_contents($url);

I will change this to:
$json = file_get_contents($url);
if ($json=='429 Too Many Requests'){
return $json;
}

Will this change enable me to return the error for reporting purposes?

What other errors need to be considered in the request?

Wayne

@openstreetmap-trac
Copy link
Author

@openstreetmap-trac openstreetmap-trac commented Jul 23, 2021

Author: TomH
[Added to the original trac issue at 3.18pm, Wednesday, 23rd September 2015]

No, but as I don't know what "file_get_contents" does I can't help any further. You need to ask a programmer.

The "429" is metadata, not contents though, so you will need to look at the response object before extracting the content from it.

@openstreetmap-trac
Copy link
Author

@openstreetmap-trac openstreetmap-trac commented Jul 23, 2021

Author: WayneDRussell
[Added to the original trac issue at 12.20pm, Thursday, 24th September 2015]

Hi,

I can now detect when I receive 'HTTP/1.1 429 Too Many Requests'

When will I be able to send new requests and not receive the error?

Wayne

@openstreetmap-trac
Copy link
Author

@openstreetmap-trac openstreetmap-trac commented Jul 23, 2021

Author: TomH
[Added to the original trac issue at 12.22pm, Thursday, 24th September 2015]

Probably when you obey http://wiki.openstreetmap.org/wiki/Nominatim_usage_policy... To start with are you sending a proper user agent with your requests?

@openstreetmap-trac
Copy link
Author

@openstreetmap-trac openstreetmap-trac commented Jul 23, 2021

Author: WayneDRussell
[Added to the original trac issue at 2.21pm, Thursday, 24th September 2015]

Hi,

This is now working correctly.

Thank you for your assistance.

Wayne

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant