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
showing 5 of 6
show 1 more comments
|
Can you download the state file manually, e.g. with
wget -O - https://planet.openstreetmap.org/replication/hour/state.txt
?@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?
Just to be 100% sure - your PHP is definitely downloading via https not http ?
@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
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.
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 ?