wiktorn / Overpass-API

Overpass API docker image
MIT License
140 stars 49 forks source link

runtime error: open64: 2 No such file or directory /db/db/node_changelog.bin #23

Closed merajnouredini closed 5 years ago

merajnouredini commented 5 years ago

I tried to run OverpassApi locally with the following command:

docker run \
    -e OVERPASS_META=yes \
    -e OVERPASS_MODE=init \
    -e OVERPASS_PLANET_URL=http://download.geofabrik.de/<foo>.pbf \
    -e OVERPASS_RULES_LOAD=10 \
    -e OVERPASS_COMPRESSION=gz \
    -e OVERPASS_UPDATE_SLEEP=3600 \
    -e OVERPASS_PLANET_PREPROCESS='mv /db/planet.osm.bz2 /db/planet.osm.pbf && osmium cat -o /db/planet.osm.bz2 /db/planet.osm.pbf && rm /db/planet.osm.pbf' \
    -v /big/docker/overpass_db/:/db \
    -p 12347:80 \
    -i -t \
    --name overpass_monaco wiktorn/overpass-api

as you see I did'nt find OVERPASS_DIFF_URL for the foo so I removed the OVERPASS_DIFF_URL and OVERPASS_COOKIE_JAR_CONTENTS env from docker run command, I just wanted to test overpass and I dont want diff updates right now, so it should not be important, but after downloading data and completion of initialization, I started the container and tried a sample query but every time I get this result:

<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="Overpass API 0.7.55.7 8b86ff77">
<note>The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.</note>
<meta osm_base="2019-09-30T14:43:02Z"/>

<remark> runtime error: Tried to use museum file but no museum files available on this instance. </remark>
<remark> runtime error: open64: 2 No such file or directory /db/db/node_changelog.bin File_Blocks::File_Blocks::1 </remark>

</osm>

now my question is, was the removal of env variable caused this error? if so is there any way to run overpass without diff updates? Thanks.

wiktorn commented 5 years ago

I’ve never tested without diff files. Let me check, if such situation is properly handled.

wiktorn commented 5 years ago

I've tested this and indeed there is some problems. But still I could not get the error you're experiencing. Can you provide your query? Are you trying to query attic data?

merajnouredini commented 5 years ago

I just copied a test query from somewhere, I dont know what it does really:

http://localhost:12347/api/interpreter?data=[out:xml][adiff:"2005-04-17T14:45:47Z,","2005-04-17T15:51:14Z"];(node(bbox)(changed);way(bbox)(changed);relation(bbox)(changed););out meta geom(bbox);&bbox=-1.0052705,51.0025063,-0.9943439,51.0047760

Thanks again for following up this issue.

wiktorn commented 5 years ago

This indeed needs access to attic data. You can read more about it here. Mainly what you need:

  1. Initiate Overpass API with "initial planet.osm" file from 2012. It might be any initial planet.osm file but it needs to earlier than the latest history query you'd like to submit
  2. Update it with diffs to current state
  3. Init&run your instance with OVERPASS_META=attic

Alternatively you can just clone production Overpass-API. If you do not need access to history data, you can try any other Overpass API query, like this one (taken from Overpass wiki page:

(
   node(51.249,7.148,51.251,7.152);
   <;
);
out meta;

Which encoded as link looks like that:

http://localhost:12347/api/interpreter?data=[out:xml];(node(51.249,7.148,51.251,7.152);<;);out meta;
merajnouredini commented 5 years ago

Oh, I see. I tested the last query and it worked! so I think you can close this issue. Thank you so much!