Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geocoder Geocoder network error #4446

Closed
metacreo opened this issue Nov 25, 2019 · 7 comments
Closed

Geocoder Geocoder network error #4446

metacreo opened this issue Nov 25, 2019 · 7 comments

Comments

@metacreo
Copy link

metacreo commented Nov 25, 2019

    <entry key='geocoder.enable'>true</entry>
    <entry key='geocoder.type'>nominatim</entry>
    <entry key='geocoder.url'>https://nominatim.openstreetmap.org/reverse</entry>
WARN: Geocoder network error - HTTP 403 Forbidden - ForbiddenException (... < JsonGeocoder:107 < ServerResource:57 < ...)

console:

root@myhostname:/opt/traccar # curl 'https://nominatim.openstreetmap.org/reverse?format=json&lat=54.686922&lon=25.290683&addressdetails=1'

Response OK city, street, etc...

Problem is traccar not sent user-agent in request.

console:

root@myhostname:/opt/traccar # curl -A '' 'https://nominatim.openstreetmap.org/reverse?format=json&lat=54.686922&lon=25.290683&addressdetails=1'

Response: Access blocked

@tananaev
Copy link
Member

Sounds like an issue with Nominatim server, not Traccar.

@metacreo
Copy link
Author

metacreo commented Nov 26, 2019

Почему? Их сервер требует user-agent и это нормально. Они явно на это указывают. Можно ведь в запросе прикрутить например custom user-agent 'traccar'. Я не силён в Java, ,буду очень долго искать где запрос формируется. :)
Если запрос типа curl -A "mozilla" то всё ок.
Если запрос без агента, ответ сервера:

Access blocked

You have been blocked because you have violated the usage policy of OSM's Nominatim geocoding service. Please be aware that OSM's resources are limited and shared between many users. The usage policy is there to ensure that the service remains usable for everybody.

Please review the terms and make sure that your software adheres to the terms. You should in particular verify that you have set a custom HTTP referrer or HTTP user agent that identifies your application, and that you are not overusing the service with massive bulk requests.

If you feel that this block is unjustified or remains after you have adopted your usage, you may contact the Nominatim system administrator at nominatim@openstreetmap.org to have this block lifted.

@IronVV
Copy link

IronVV commented Nov 26, 2019

I confirm this problem. I tried to change geocoder.url:
https://nominatim.openstreetmap.org/reverse
or
https://nominatim.openstreetmap.org/reverse?
or
https://nominatim.openstreetmap.org/reverse.php
or
https://nominatim.openstreetmap.org/reverse.php?

Don't working. The problem appears relatively recently. I did not make any changes before this problem.

@metacreo
Copy link
Author

Ни хотите, как хотите :)
Here is my 10min solution:
https://www.traccar.org/forums/topic/geocoding-reverse-problem/#post-47739

@IronVV
Copy link

IronVV commented Nov 28, 2019

Doesn't work for me, but maybe help for other.

@metacreo
Copy link
Author

To perform this, you need some skills of webserver administration and need understand how all processes work. I can try help you, but I need to known what exactly not work. Please write to traccar forum in topic https://www.traccar.org/forums/topic/geocoding-reverse-problem/ describe more what not work for you.

@minghunt
Copy link

minghunt commented Jul 11, 2023

With Access blocked Error
You can try to change https to http.
Example: http://nominatim.openstreetmap.org/search?format=json&limit=3&q=VietNam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants