wiktorn / Overpass-API

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

Permission denied #16

Closed Hackyy closed 5 years ago

Hackyy commented 5 years ago

Hi, First of all thank you for the container! I have a problem with the container and can't find the cause. I start the container with the following command: docker run -e OVERPASS_META=yes -e OVERPASS_MODE=init -e OVERPASS_PLANET_URL=http://download.geofabrik.de/europe/germany/baden-wuerttemberg/stuttgart-regbez-latest.osm.bz2 -e OVERPASS_DIFF_URL=http://download.openstreetmap.fr/replication/europe/germany/minute/ -e OVERPASS_RULES_LOAD=10 -v overpass:/db/ -p 12345:80 -i -t --name overpass_bw wiktorn/overpass-api

The data is downloaded and then the container is finished. After the restart I get a permission error in the log:

It took 0 to run the loop. Desired load is: 10%. Sleeping: 3 /app/bin/rules_loop.sh: line 42: ///db/db/rules_loop.log: Permission denied /app/bin/rules_loop.sh: line 43: ///db/db/rules/areas.osm3s: No such file or directory /app/bin/rules_loop.sh: line 44: ///db/db/rules_loop.log: Permission denied It took 0 to run the loop. Desired load is: 10%. Sleeping: 3 /app/bin/rules_loop.sh: line 42: ///db/db/rules_loop.log: Permission denied /app/bin/rules_loop.sh: line 43: ///db/db/rules/areas.osm3s: No such file or directory /app/bin/rules_loop.sh: line 44: ///db/db/rules_loop.log: Permission denied It took 0 to run the loop. Desired load is: 10%. Sleeping: 3 /app/bin/rules_loop.sh: line 42: ///db/db/rules_loop.log: Permission denied /app/bin/rules_loop.sh: line 43: ///db/db/rules/areas.osm3s: No such file or directory /app/bin/rules_loop.sh: line 44: ///db/db/rules_loop.log: Permission denied It took 0 to run the loop. Desired load is: 10%. Sleeping: 3

Response: The data included in this document is from www.openstreetmap.org. The data is made available under ODbL. Error: runtime error: The dispatcher (i.e. the database management system) is turned off.

Is there any indication of what exactly the problem is?

wiktorn commented 5 years ago

Interesting, when I'm testing, it fails with:

DEBUG: Starting download at ID 3526444 (max 100 MB)
Traceback (most recent call last):
  File "/app/venv/bin/pyosmium-get-changes", line 243, in <module>
    exit(main(sys.argv[1:]))
  File "/app/venv/bin/pyosmium-get-changes", line 227, in main
    simplify=options.simplify)
  File "/app/venv/lib/python3.5/site-packages/osmium/replication/server.py", line 125, in apply_diffs
    diffs = self.collect_diffs(start_id, max_size)
  File "/app/venv/lib/python3.5/site-packages/osmium/replication/server.py", line 93, in collect_diffs
    left_size -= rd.add_buffer(diffdata, self.diff_type)
RuntimeError: Unknown element in <way>: bbox

As you're using http://download.openstreetmap.fr/replication/europe/germany/minute/ which is incompatible with latest pyosmium changes. As the problem was fixed in libosmium, once it is released, and pyosmium gets released, this should be resolved.

Try using: http://download.geofabrik.de/europe/germany/baden-wuerttemberg/tuebingen-regbez-updates/ as your DIFF_URL

Coming back to the problem that you have: what kind of volume are you using in your mount?

Hackyy commented 5 years ago

I used the following mount before: -v /big/docker/overpass_db/:/db but I used the default volume that will be created from docker.

But it looks like my docker installation is to blame for this problem. I use Docker for Windows. Everything works on my Centos machine. There I also checked the URL customization. Work like a charm!

alvasilvao commented 10 months ago

Hi! I am also getting some similar erros while using this prompt. I need full planet. Any ideas on how to make it work?

docker run \ -e OVERPASS_META=yes \ -e OVERPASS_MODE=clone \ -e OVERPASS_DIFF_URL=https://planet.openstreetmap.org/replication/minute/ \ -v /home/climbs/Documents/overpassturbo/overpass_fullplanet/:/db \ -i -t \ --name overpass_world \ wiktorn/overpass-api

Message (shortened):

Starting supervisord process 2023-12-23 03:59:00,179 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message. 2023-12-23 03:59:00,180 INFO supervisord started with pid 1 2023-12-23 03:59:01,183 INFO spawned: 'overpass_dispatch' with pid 8 2023-12-23 03:59:01,184 INFO spawned: 'nginx' with pid 9 2023-12-23 03:59:01,185 INFO spawned: 'fcgiwrap' with pid 10 2023-12-23 03:59:01,187 INFO spawned: 'update_overpass' with pid 11 2023-12-23 03:59:01,188 INFO spawned: 'dispatcher_areas' with pid 14 2023-12-23 03:59:01,189 INFO spawned: 'areas_rules' with pid 17 tee: /db/changes.log: Permission denied /app/bin / cp: cannot create regular file '/db/replicate_id.backup': Permission denied 2023-12-23 03:59:02,196 INFO success: overpass_dispatch entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2023-12-23 03:59:02,196 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2023-12-23 03:59:02,196 INFO success: fcgiwrap entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2023-12-23 03:59:02,196 INFO success: update_overpass entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2023-12-23 03:59:02,196 INFO success: dispatcher_areas entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2023-12-23 03:59:02,196 INFO success: areas_rules entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) <?xml version="1.0" encoding="UTF-8"?>

The data included in this document is from www.openstreetmap.org. The data is made available under ODbL. After 0h0m15s: in "make-area", part 0, on line 29. Stack: 0 of 0 38 of 0 127.0.0.1 - - [23/Dec/2023:03:59:30 +0000] "GET /api/interpreter?data=[out:json];node(1);out; HTTP/1.1" 200 641 "-" "curl/7.74.0" After 0h0m30s: in "make-area", part 0, on line 29. Stack: 0 of 0 2172 of 0 After 0h0m45s: in "recurse", part 0, on line 27. Stack: 0 of 0 11632 of 0 0 of 0 127.0.0.1 - - [23/Dec/2023:04:00:00 +0000] "GET /api/interpreter?data=[out:json];node(1);out; HTTP/1.1" 200 641 "-" "curl/7.74.0" After 0h1m0s: in "recurse", part 0, on line 26. Stack: 0 of 0 25424 of 0 0 of 0 tee: /db/changes.log: Permission denied cp: cannot create regular file '/db/replicate_id.backup': Permission denied After 0h1m15s: in "make-area", part 0, on line 29. Stack: 0 of 0 32934 of 0 127.0.0.1 - - [23/Dec/2023:04:00:30 +0000] "GET /api/interpreter?data=[out:json];node(1);out; HTTP/1.1" 200 658 "-" "curl/7.74.0" After 0h1m30s: in "recurse", part 0, on line 26. Stack: 0 of 0 46048 of 0 0 of 0 After 0h1m45s: in "recurse", part 0, on line 26. Stack: 0 of 0 56668 of 0 0 of 0 After 0h2m0s: in "make-area", part 0, on line 29. Stack: 0 of 0 65426 of 0 127.0.0.1 - - [23/Dec/2023:04:01:01 +0000] "GET /api/interpreter?data=[out:json];node(1);out; HTTP/1.1" 200 658 "-" "curl/7.74.0" tee: /db/changes.log: Permission denied