Reputation: 113
How to solve the error when i pass area param. Installed osm-3s_v0.7.53 in a server and able to make request. But if i try to make request with area then i ma getting the following error
Error: runtime error: open64: 111 Connection refused /home/osm-3s_v0.7.53/bin/db//osm3s_v0.7.53_areas Unix_Socket::7
example query
[timeout:25];
area[name="france"];
( node[name="starbucks"];
way[name="starbucks"];
rel[name="starbucks"];
);
out center;
but if i try
[timeout:25];
( node[name="starbucks"];
way[name="starbucks"];
rel[name="starbucks"];
);
out center;
it gets a valid xml for default area
Please help..
Upvotes: 1
Views: 856
Reputation: 113
Solved the issue. For the are query to work fine
dispatcher --areas
was not starting and running even after run the command to start this dispatcher. That was due to a socket error. i solved that error by following this link Overpass API dispatcher fails with Address already in use 98
NOTE: Before you do the above step run
osm-3s_v0.7.53/bin/dispatcher --terminate
One think keep in mind if you run the dispatcher with nohup try to add
& tail -f nohup.out
so that it will help to see if there is an error. Mainly the 2 dispatcher --osm-base AND --area should be running always for efficient response from the overpass API installed in your own server.
Upvotes: 1
Reputation: 3668
Your usage of area syntax is not quite correct, as well as the spelling of France and Starbucks does not fit the data in OpenStreetMap. The query should look like this:
[timeout:600];
area[name="France"]["ISO3166-1"="FR"]->.france;
( node(area.france)[name~"Starbucks"];
way(area.france)[name~"Starbucks"];
rel(area.france)[name~"Starbucks"];
);
out center;
Also, you must start another dispatcher
process on your own server for areas, as well as triggering a dedicated process of creating areas. Please read this up in the Overpass API installation documentation, it describes every step you need to follow.
My recommendation is to get familiar with the syntax on one of the public instances first, and only then start chasing issues on your own instance.
Upvotes: 2