mediagis / nominatim-docker

100% working container for Nominatim
Creative Commons Zero v1.0 Universal
1.08k stars 442 forks source link

Cannot cURL nominatim addresses (403 forbidden) #420

Closed SenorKarlos closed 11 months ago

SenorKarlos commented 1 year ago

Per my comment in #419 I am getting 403'd with post code and wikimedia downloads enabled. I disabled those and it appears able to download from geofabrik. The other related issues seem to be focused around a blocked user agent and irresponsible folks running this, so I am curious how I continue? Am I forced to download, mount and use those files instead? If so how does that affect automatic updates?

SenorKarlos commented 1 year ago

I was just re-reading the 4.2 readme to see if you folks added a custom user-agent variable, would that not solve this?

Also curious, there is a variable for update mode, I've set constant in my compose, but the readme mentions having to run a command on the container to actually have updates enabled and running? (assuming I get it goin lol, re-fired my old 3.6 2021 instance up which won't update either, stuck with default setting despite config.php being set to my area)

leonardehrenfried commented 1 year ago

You're right: an inconsiderate user has ruined the image for everyone else.

We still dealing with this and are thinking about a way forward.

I recently added the env variable USER_AGENT. It's undocumented because we're not sure it's the right way forward.

Nevertheless, you could try setting it and see what happens. Please report back with your findings.

SenorKarlos commented 1 year ago

So far so good, and I think it would be an excellent solution. Make it a 'mandatory' config step and leave the default as the blocked agent. I'll also be easy to identify if the script is the problem, I'm not doing anything whacky or custom to it.

WILYR commented 1 year ago

Ye, i get this error too and fix it by setting docker env like this:

#for nominatim 4.2 
-e USER_AGENT=mediagis/nominatim-docker:4.2 
#or for nominatim 4.1
-e USER_AGENT=mediagis/nominatim-docker:4.1
leonardehrenfried commented 1 year ago

You need to set your own user agent identifing you.

WILYR commented 1 year ago

You need to set your own user agent identifing you.

Thanks, I tried firefox/chrome user agent and it really works

mtmail commented 1 year ago

@WILYR Something that identifies YOU. Your name, your company name. Anything generic will we blocked eventually.