Hello everyone,
I’ve been trying to run the Docker image specified here → GitHub - wiktorn/Overpass-API: Overpass API docker image on my Macbook with Docker Desktop.
Apple M1 PRO chip, Macos 15 Sequoia
I wanted to do a small change though: Instead of either init the database or cloning an existing database, since I already have a cloned db locally, I wanted to simply point the overpass API to the existing DB on my local machine.
Initially I had to change requirements.txt to point to osmium~=4.0.0 since it can’t find version 3.7.0
Then I removed the following lines from docker-entrypoint.sh so it no longer clones the DB from the internet,but instead I pass the path to the DB via -v in the docker run command:
mkdir -p /db/db &&
/app/bin/download_clone.sh --db-dir=/db/db --source=“${OVERPASS_CLONE_SOURCE}” --meta=“${OVERPASS_META}” &&
This builds ok.
Now I’m trying to run it with the following command:
docker run -i -t -e OVERPASS_STOP_AFTER_INIT=“false” -p 12345:80 -v /path-to-db-folder:/db/db wiktorn-overpass
And the output seems to be all okay, apart from the supervisor complaining that it’s running with no user (even though it’s set to run with the overpass user that the docker build creates.
chown: changing ownership of '/db/db/osm3s_osm_base': No such file or directory
AFTER CHOWN /DB
Overpass container ready to receive requests
Starting supervisord process
2024-10-16 09:58:49,754 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.
2024-10-16 09:58:49,754 INFO supervisord started with pid 1
2024-10-16 09:58:50,761 INFO spawned: 'overpass_dispatch' with pid 15
2024-10-16 09:58:50,764 INFO spawned: 'nginx' with pid 16
2024-10-16 09:58:50,766 INFO spawned: 'fcgiwrap' with pid 17
2024-10-16 09:58:50,768 INFO spawned: 'update_overpass' with pid 18
2024-10-16 09:58:50,771 INFO spawned: 'dispatcher_areas' with pid 19
2024-10-16 09:58:50,772 INFO spawned: 'areas_rules' with pid 21
BLABLABLA Just before starting the dispatcher
/app/bin/dispatcher_start.sh: line 28: warning: command substitution: ignored null byte in input
Result from find: /db/db/osm3s_osm_base
/app/bin /
runtime error: The dispatcher (i.e. the database management system) is turned off.
It took 0 to run the loop. Desired load is: 1%. Sleeping: 3
2024-10-16 09:58:51,891 INFO success: overpass_dispatch entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-10-16 09:58:51,891 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-10-16 09:58:51,891 INFO success: fcgiwrap entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-10-16 09:58:51,891 INFO success: update_overpass entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-10-16 09:58:51,891 INFO success: dispatcher_areas entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-10-16 09:58:51,891 INFO success: areas_rules entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="Overpass API 0.7.62.2 58ef4056">
<note>The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.</note>
<meta osm_base=""/>
After 0h0m15s: in "query", part 1, on line 13. Stack: 0 of 0 0 of 0
127.0.0.1 - - [16/Oct/2024:09:59:19 +0000] "GET /api/interpreter?data=[out:json];node(5699836);out; HTTP/1.1" 200 634 "-" "curl/7.88.1"
After 0h0m32s: in "recurse", part 0, on line 27. Stack: 0 of 0 3 of 0 0 of 0
After 0h0m47s: in "recurse", part 0, on line 27. Stack: 0 of 0 14 of 0 0 of 0
127.0.0.1 - - [16/Oct/2024:09:59:49 +0000] "GET /api/interpreter?data=[out:json];node(8859932);out; HTTP/1.1" 200 634 "-" "curl/7.88.1"
What’s odd is that I can see what seems to be the health endpoint getting called and it’s returning 200 every time, so one would think that internally it’s working.
But when I try to hit the endpoint from outside, using the following URL:
curl ‘http://localhost:12345/api/interpreter?data=node(3470507586)%3Bout%3B’
Then I get the following error:
Error: runtime error: open64: 13 Permission denied /db/db//osm3s_osm_base Unix_Socket::7
And when I run docker exec -it /bin/bash to go into the container and run commands inside, and then run that same curl (adjusting the port to 80) then I get the exact same error.
I’ve noticed that it created the socket /db/db/osm3s_osm_base and that it has the following permissions:
srwxr-xr-x
So I’m guessing this is related to it not running as user overpass as it should, but instead as root ?
From the initialization logs:
" 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."
supervisord is set to use overpass user in supervisord.conf though .
Has anybody run into a similar issue ?