wiktorn / Overpass-API

Overpass API docker image
MIT License
134 stars 48 forks source link

Following the build instructions for the clone results in a 403 error on access #27

Closed rastilin closed 4 years ago

rastilin commented 4 years ago

After following the middle instruction to clone a new world using the VM everything appears to work, but on accessing the port we get a 403 error from the Nginx running inside the docker instance. It looks like the files have downloaded correctly and docker does seem to have permissions to access the folder that it has downloaded the database files to.

If this happened to someone else, am I missing something obvious?

wiktorn commented 4 years ago

Because clone mode requires huge download it's not that well tested. Can you tell me exact URL that you're trying to access?

Can you also submit ~100 last lines from docker log of your container?

rastilin commented 4 years ago

No problem. I've copied the last 100 lines here.

There are still some updates remaining INFO: Using replication server at https://planet.openstreetmap.org/replication/minute/ DEBUG: Using given sequence ID 3745187 DEBUG: Starting download at ID 3745188 (max 100 MB) DEBUG: Downloaded change 3745188. (102260 kB available in download buffer) /app/bin/update_database --version=2019-11-04T21:06:01Z --compression-method=gz --map-compression-method=gz --flush-size=16 --meta Reading XML file ... finished reading nodes. Flushing to database ...... done. Reading XML file ... finished reading ways. Flushing to database .....After 9h28m54s: in "make-area", part 0, on line 257. Stack: 0 of 0 1778511 of 0 After 9h29m9s: in "make-area", part 0, on line 257. Stack: 0 of 0 1780902 of 0 .After 9h29m24s: in "recurse", part 0, on line 255. Stack: 0 of 0 1782852 of 0 0 of 0 done. Reading XML file ... finished reading relations. Flushing to database ....... done. Update complete. There are still some updates remaining INFO: Using replication server at https://planet.openstreetmap.org/replication/minute/ DEBUG: Using given sequence ID 3745188 DEBUG: Starting download at ID 3745189 (max 100 MB) DEBUG: Downloaded change 3745189. (102059 kB available in download buffer) /app/bin/update_database --version=2019-11-04T21:07:01Z --compression-method=gz --map-compression-method=gz --flush-size=16 --meta Reading XML file ... finished reading nodes. Flushing to database ...... done. Reading XML file ... finished reading ways. Flushing to database ....After 9h29m39s: in "recurse", part 0, on line 255. Stack: 0 of 0 1784502 of 0 0 of 0 .After 9h29m54s: in "make-area", part 0, on line 257. Stack: 0 of 0 1786733 of 0 After 9h30m9s: in "recurse", part 0, on line 255. Stack: 0 of 0 1789346 of 0 0 of 0 . done. Reading XML file ... finished reading relations. Flushing to database ....... done. Update complete. There are still some updates remaining INFO: Using replication server at https://planet.openstreetmap.org/replication/minute/ DEBUG: Using given sequence ID 3745189 DEBUG: Starting download at ID 3745190 (max 100 MB) DEBUG: Downloaded change 3745190. (102028 kB available in download buffer) /app/bin/update_database --version=2019-11-04T21:08:02Z --compression-method=gz --map-compression-method=gz --flush-size=16 --meta Reading XML file ... finished reading nodes. Flushing to database .....Cannot get script name, are DOCUMENT_ROOT and SCRIPT_NAME (or SCRIPT_FILENAME) set and is the script executable? 49.197.14.42 - - [04/Nov/2019:21:08:27 +0000] "GET /api/interpreter/xapi%22%20.'?data=[out:json];(way(-27.554260,151.850400,-27.554200,151.850490););out%20tags; HTTP/1.1" 403 46 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:70.0) Gecko/20100101 Firefox/70.0" After 9h30m24s: in "make-area", part 0, on line 257. Stack: 0 of 0 1792651 of 0 2019/11/04 21:08:28 [error] 33#33: *36 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 49.197.14.42, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "178.128.109.11:12346" 49.197.14.42 - - [04/Nov/2019:21:08:28 +0000] "GET /favicon.ico HTTP/1.1" 404 143 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:70.0) Gecko/20100101 Firefox/70.0" . done. Reading XML file ... finished reading ways. Flushing to database .....After 9h30m39s: in "make-area", part 0, on line 257. Stack: 0 of 0 1795152 of 0 After 9h30m54s: in "make-area", part 0, on line 257. Stack: 0 of 0 1798102 of 0 . done. Reading XML file ... finished reading relations. Flushing to database ....... done. Update complete. There are still some updates remaining INFO: Using replication server at https://planet.openstreetmap.org/replication/minute/ DEBUG: Using given sequence ID 3745190 DEBUG: Starting download at ID 3745191 (max 100 MB) DEBUG: Downloaded change 3745191. (102290 kB available in download buffer) /app/bin/update_database --version=2019-11-04T21:09:00Z --compression-method=gz --map-compression-method=gz --flush-size=16 --meta Reading XML file ... finished reading nodes. Flushing to database ...... done. Reading XML file ... finished reading ways. After 9h31m9s: in "make-area", part 0, on line 257. Stack: 0 of 0 1800177 of 0 Flushing to database .....After 9h31m24s: in "make-area", part 0, on line 257. Stack: 0 of 0 1803349 of 0 . done. Reading XML file ... finished reading relations. Flushing to database .....After 9h31m39s: in "recurse", part 0, on line 255. Stack: 0 of 0 1806187 of 0 0 of 0 .. done. Update complete. There are still some updates remaining INFO: Using replication server at https://planet.openstreetmap.org/replication/minute/ DEBUG: Using given sequence ID 3745191 DEBUG: Starting download at ID 3745192 (max 100 MB) Empty version, skipping file <?xml version='1.0' encoding='UTF-8'?>

Update finished with status code: 3 After 9h31m54s: in "make-area", part 0, on line 257. Stack: 0 of 0 1808510 of 0 After 9h32m9s: in "recurse", part 0, on line 255. Stack: 0 of 0 1810679 of 0 0 of 0 After 9h32m24s: in "make-area", part 0, on line 257. Stack: 0 of 0 1813183 of 0 After 9h32m39s: in "make-area", part 0, on line 257. Stack: 0 of 0 1815807 of 0 INFO: Using replication server at https://planet.openstreetmap.org/replication/minute/ DEBUG: Using given sequence ID 3745191 DEBUG: Starting download at ID 3745192 (max 100 MB) DEBUG: Downloaded change 3745192. (102219 kB available in download buffer) /app/bin/update_database --version=2019-11-04T21:10:01Z --compression-method=gz --map-compression-method=gz --flush-size=16 --meta Reading XML file ... finished reading nodes. Flushing to database ...... done. Reading XML file ... finished reading ways. Flushing to database .....Cannot get script name, are DOCUMENT_ROOT and SCRIPT_NAME (or SCRIPT_FILENAME) set and is the script executable? 49.197.14.42 - - [04/Nov/2019:21:11:24 +0000] "GET /api/interpreter/xapi%22%20.'?data=[out:json];(way(-27.554260,151.850400,-27.554200,151.850490););out%20tags; HTTP/1.1" 403 46 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:70.0) Gecko/20100101 Firefox/70.0" . done. Reading XML file ... finished reading relations. Flushing to database ....... done. Update complete. There are still some updates remaining INFO: Using replication server at https://planet.openstreetmap.org/replication/minute/ DEBUG: Using given sequence ID 3745192 DEBUG: Starting download at ID 3745193 (max 100 MB) DEBUG: Downloaded change 3745193. (102008 kB available in download buffer) /app/bin/update_database --version=2019-11-04T21:10:59Z --compression-method=gz --map-compression-method=gz --flush-size=16 --meta Reading XML file ... finished reading nodes. Flushing to database .....After 9h33m45s: in "make-area", part 0, on line 257. Stack: 0 of 0 1817017 of 0 . done. Reading XML file ... finished reading ways. Flushing to database .....After 9h34m0s: in "recurse", part 0, on line 255. Stack: 0 of 0 1819194 of 0 0 of 0 After 9h34m15s: in "make-area", part 0, on line 257. Stack: 0 of 0 1820653 of 0 . done. Reading XML file ... finished reading relations. Flushing to database .....After 9h34m30s: in "make-area", part 0, on line 257. Stack: 0 of 0 1822078 of 0 .. done. Update complete. There are still some updates remaining INFO: Using replication server at https://planet.openstreetmap.org/replication/minute/ DEBUG: Using given sequence ID 3745193 DEBUG: Starting download at ID 3745194 (max 100 MB) DEBUG: Downloaded change 3745194. (101917 kB available in download buffer) /app/bin/update_database --version=2019-11-04T21:12:02Z --compression-method=gz --map-compression-method=gz --flush-size=16 --meta

The URL is...

http://178.128.109.11:12346/api/interpreter/xapi%22%20.'?data=[out:json];(way(-27.554260,151.850400,-27.554200,151.850490););out%20tags;

It looks like a query is being run inside the container, but if the 403 is unexpected I assume it's not just a matter of waiting things out for it to process.

wiktorn commented 4 years ago

Looks like there is problem with your url, something like that should work (I removed /xapi%22%20.'): http://178.128.109.11:12346/api/interpreter?data=[out:json];(way(-27.554260,151.850400,-27.554200,151.850490););out%20tags;

rastilin commented 4 years ago

True, you're right and now it works perfectly. That was the format we used on our old instance so we must have incorrectly configured the nginx on our previous instance. Thanks for your help. Should I close this issue?