drolbr / Overpass-API

A database engine to query the OpenStreetMap data.
http://overpass-api.de
GNU Affero General Public License v3.0
692 stars 90 forks source link

Overpass dispatcher area does not "start working" #645

Closed puffetto closed 2 years ago

puffetto commented 2 years ago

Hello,

I have set up and started an overpass server on FreeBSD 12.2 (./configure CXXFLAGS="-O2 -DNATIVE_LARGE_FILES -I/usr/local/include" LDFLAGS="-L/usr/local/lib" --prefix=$EXEC_DIR), then have imported the osm files for Italy+Vatican+SanMarino (osmosis --read-pbf italy.osm.pbf --read-pbf san_marino.osm.pbf --read-pbf vatican_city.osm.pbf --merge --merge --write-xml file="-" | $EXEC_DIR/bin/update_database --db-dir=$DB_DIR/ --meta) and started the main dispatcher (nohup $EXEC_DIR/bin/dispatcher --osm-base --db-dir=$DB_DIR --meta &) and the area dispatcher ($EXEC_DIR/bin/dispatcher --areas --db-dir=./data/).

Everything seems to be running nicely:

blackye@antani:~/overpass exec/bin/dispatcher --areas --status --db-dir=/home/blackye/overpass/data/
Number of not yet opened connections: 0
Number of connected clients: 1
Rate limit: 0
Total available space: 4294967296
Total claimed space: 0
Average claimed space: 536870912
Total available time units: 262144
Total claimed time units: 0
Average claimed time units: 180
Counter of started requests: 4
Counter of finished requests: 4
pending 18669
blackye@antani:~/overpass exec/bin/dispatcher --osm-base --status --db-dir=/home/blackye/overpass/data/
Number of not yet opened connections: 0
Number of connected clients: 1
Rate limit: 0
Total available space: 12884901888
Total claimed space: 0
Average claimed space: 536870912
Total available time units: 262144
Total claimed time units: 0
Average claimed time units: 180
Counter of started requests: 4
Counter of finished requests: 4
pending 23898
blackye@antani:~/overpass 

However I still cannot query with areas stuff:

blackye@antani:~/overpass exec/bin/osm3s_query < ../fica.xml 
encoding remark: Please enter your query and terminate it with CTRL+D.
encoding remark: Your input contains an 'osm-script' tag. Thus, a line with the
datatype declaration is added. This shifts line numbering by -1 line(s).
{
  "version": 0.6,
  "generator": "Overpass API 0.7.57.1 74a55df1",
  "osm3s": {
    "timestamp_osm_base": "",
    "copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL."
  },
  "elements": [

  ]
}
runtime error: open64: 2 No such file or directory /home/blackye/overpass/data/area_tags_local.bin File_Blocks::File_Blocks::1
blackye@antani:~/overpass 

I understand that creating the "areas" stuff can take up to 24 hours but... it seems like the daemon isn't doing anything:

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMMAND
39750 blackye       1  20    0    13M  4292K select   2   0:01   0.02% dispatcher
38220 blackye       1  20    0    18M  8960K select   3   0:01   0.02% dispatcher
93426 blackye       1  20    0    13M  3692K CPU3     3   0:00   0.02% top
39775 blackye       1  20    0    21M    11M select   2   0:00   0.00% sshd

Is there something I can do to tell the kid that it is time to start working or am I missing something?

Thanks,

A.

puffetto commented 2 years ago

Addenda, this is the query, but I think it's an irrelevant detail... fact is that I cannot query "area" stuff:

blackye@antani:~/overpass cat ../fica.xml 
<osm-script output="json">
  <query into="a" type="area">
    <id-query type="area" ref="3600044787" into="a"/>
  </query>
  <union into="_">
    <query into="_" type="way">
      <has-kv k="name" modv="" v=""/>
      <has-kv k="highway" modv="" v=""/>
      <has-kv k="highway" modv="not" regv="path"/>
      <has-kv k="highway" modv="not" regv="steps"/>
      <has-kv k="highway" modv="not" regv="motorway"/>
      <has-kv k="highway" modv="not" regv="motorway_link"/>
      <has-kv k="highway" modv="not" regv="raceway"/>
      <has-kv k="highway" modv="not" regv="bridleway"/>
      <has-kv k="highway" modv="not" regv="proposed"/>
      <has-kv k="highway" modv="not" regv="construction"/>
      <has-kv k="highway" modv="not" regv="elevator"/>
      <has-kv k="highway" modv="not" regv="bus_guideway"/>
      <has-kv k="highway" modv="not" regv="footway"/>
      <has-kv k="highway" modv="not" regv="cycleway"/>
      <has-kv k="foot" modv="not" regv="no"/>
      <has-kv k="access" modv="not" regv="private"/>
      <has-kv k="access" modv="not" regv="no"/>
      <area-query from="a"/>
    </query>
    <query into="_" type="node">
      <recurse type="way-node"/>
      <area-query from="a"/>
    </query>
  </union>
  <print e="" from="_" geometry="skeleton" ids="yes" limit="" mode="body" n="" order="id" s="" w=""/>
</osm-script>
mmd-osm commented 2 years ago

You need to create your areas first as described in the installation instructions. http://overpass-api.de/full_installation.html

Please note that this issue tracker is primarily used for bug reports and enhancement requests. You can find more appropriate locations for community support in the osm wiki: https://wiki.openstreetmap.org/wiki/Overpass_API#Community:_where_can_I_get_help.3F

puffetto commented 2 years ago

Thanks and apologizes for the noise: solved. I had missed one step, I had to run the "$EXEC_DIR/bin/rules_loop.sh" thing, I thought it would have been the area dispatcher creating the areas.