Hi, I setup nominatim with planet data from planet.openstreetmap.org, now want to update daily/hourly data.

Got following error, when use planet.openstreetmap.org/replication for update.

Warning: file_get_contents(https://planet.openstreetmap.org/replication/hour/state.txt): failed to open stream: HTTP request failed! HTTP/1.1 421 Misdirected Request

How to fix this?

Or must be use any mirror from https://wiki.openstreetmap.org/wiki/Planet.osm#Planet.osm_mirrors instead of planet.openstreetmap.org ?

asked 27 Aug '18, 12:36

Rajavelu_M's gravatar image

Rajavelu_M
253444858
accept rate: 33%

edited 27 Aug '18, 12:45

Can you download the state file manually, e.g. with wget -O - https://planet.openstreetmap.org/replication/hour/state.txt?

(27 Aug '18, 19:26) lonvia

@lonvia: Yes. i can download via wget. But in php got above error. Also tried in separate php file as follows(but met same err).

stream_context_set_default(['http'=>['proxy'=>'proxy:3128', 'header'=>'Proxy-Authorization: Basic '.base64_encode('user:password')]]); echo file_get_contents("https://planet.openstreetmap.org/replication/hour/state.txt");

I can get state.txt from https://ftp5.gwdg.de/pub/misc/openstreetmap/planet.openstreetmap.org/replication/day/state.txt . Can I use the same for update?

(28 Aug '18, 08:11) Rajavelu_M

Just to be 100% sure - your PHP is definitely downloading via https not http ?

(28 Aug '18, 10:12) SomeoneElse ♦

@SomeoneElse Yes, My PHP downloading via https. Also got 400 response code for https://free.nchc.org.tw

my php file:

stream_context_set_default(['http'=>['proxy'=>'proxy:3128', 'header'=>'Proxy-Authorization: Basic '.base64_encode('user:pwdl')]]); echo file_get_contents("https://download.geofabrik.de/europe/andorra-updates/state.txt"); echo file_get_contents("https://planet.openstreetmap.org/replication/day/state.txt"); echo file_get_contents("https://free.nchc.org.tw/osm.planet/replication/day/state.txt"); echo file_get_contents("https://ftp5.gwdg.de/pub/misc/openstreetmap/planet.openstreetmap.org/replication/day/state.txt");

Response:

original OSM minutely replication sequence number 3121624

timestamp=2018-08-27T20\:14\:02Z sequenceNumber=1987

Warning: file_get_contents(https://planet.openstreetmap.org/replication/day/state.txt): failed to open stream: HTTP request failed! HTTP/1.1 421 Misdirected Request

Warning: file_get_contents(https://free.nchc.org.tw/osm.planet/replication/day/state.txt): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request

Tue Aug 28 00:06:42 UTC 2018

sequenceNumber=2176 timestamp=2018-08-28T00\:00\:00Z

(28 Aug '18, 11:17) Rajavelu_M

This looks like an issue with your proxy, likely a misconfiguration of HTTPS forwarding or SSL. I recommend that you get in touch with your system administrator to find out more.

(28 Aug '18, 22:14) lonvia

I can get state.txt from https://ftp5.gwdg.de/pub/misc/openstreetmap/planet.openstreetmap.org/replication/day/state.txt . Can I use the same as CONST_Replication_Url for update ?

(30 Aug '18, 07:29) Rajavelu_M
showing 5 of 6 show 1 more comments
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×549
×163
×5

question asked: 27 Aug '18, 12:36

question was seen: 494 times

last updated: 30 Aug '18, 07:31

powered by OSQA