wiktorn / Overpass-API

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

502 response error - runtime error #30

Closed mullenkamp closed 9 months ago

mullenkamp commented 4 years ago

Hi again,

Sorry for the constant issues.

I've run it with the following docker command (and subsequently started it):

docker run \ -e OVERPASS_META=yes \ -e OVERPASS_MODE=init \ -e OVERPASS_PLANET_URL=http://download.geofabrik.de/australia-oceania/new-zealand-latest.osm.bz2 \ -e OVERPASS_DIFF_URL=http://download.geofabrik.de/australia-oceania/new-zealand-updates/ \ -e OVERPASS_RULES_LOAD=10 \ -e OVERPASS_UPDATE_SLEEP=3600 \ -v E:\ecan\deployments\overpass\NZ\:/db \ -p 12345:80 \ -i -t \ --name overpass_nz wiktorn/overpass-api

Whenever I send a request to the overpass api I get a 502 response error with the following content:

<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n<head>\n <meta http-equiv="content-type" content="text/html; charset=utf-8" lang="en"/>\n <title>OSM3S Response</title>\n</head>\n<body>\n\n<p>The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.</p>\n<p><strong style="color:#FF0000">Error</strong>: runtime error: The dispatcher (i.e. the database management system) is turned off. </p>\n\n</body>\n</html>

It says the dispatcher is turned off...I am running the container...

Thanks again.

wiktorn commented 4 years ago

Interesting, it looks like something got borked within Overpass. Can you dump:

I understand you're still running on Windows mount?

mullenkamp commented 4 years ago

Here's the docker log...which seems to show the problem:

It took 0 to run the loop. Desired load is: 10%. Sleeping: 3
2020-01-06 20:25:26,205 WARN received SIGTERM indicating exit request
2020-01-06 20:25:26,205 INFO waiting for fcgiwrap, nginx, update_overpass, areas_rules to die
2020-01-06 20:25:26,206 INFO stopped: areas_rules (terminated by SIGTERM)
2020-01-06 20:25:26,206 INFO stopped: update_overpass (terminated by SIGTERM)
2020-01-06 20:25:26,207 INFO stopped: fcgiwrap (terminated by SIGTERM)
2020-01-06 20:25:26,305 INFO stopped: nginx (exit status 0)
Starting supervisord process
2020-01-06 20:30:35,052 CRIT Supervisor running as root (no user in config file)
2020-01-06 20:30:35,054 INFO supervisord started with pid 1
2020-01-06 20:30:36,057 INFO spawned: 'overpass_dispatch' with pid 8
2020-01-06 20:30:36,060 INFO spawned: 'nginx' with pid 9
2020-01-06 20:30:36,063 INFO spawned: 'fcgiwrap' with pid 10
2020-01-06 20:30:36,065 INFO spawned: 'update_overpass' with pid 11
2020-01-06 20:30:36,068 INFO spawned: 'dispatcher_areas' with pid 12
2020-01-06 20:30:36,082 INFO spawned: 'areas_rules' with pid 15
/app/bin /
File_Error Operation not permitted 1 /db/db//osm3s_v0.7.55_areas Unix_Socket::4
2020-01-06 20:30:36,104 INFO exited: dispatcher_areas (exit status 0; not expected)
runtime error: The dispatcher (i.e. the database management system) is turned off.
It took 0 to run the loop. Desired load is: 10%. Sleeping: 3
File_Error Operation not permitted 1 /db/db//osm3s_v0.7.55_osm_base Unix_Socket::4
2020-01-06 20:30:36,122 INFO exited: overpass_dispatch (exit status 0; not expected)
INFO: Using replication server at http://download.geofabrik.de/australia-oceania/new-zealand-updates/
DEBUG: Using given sequence ID 2482
DEBUG: Starting download at ID 2483 (max 100 MB)
2020-01-06 20:30:37,196 INFO spawned: 'overpass_dispatch' with pid 42
2020-01-06 20:30:37,196 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-01-06 20:30:37,196 INFO success: fcgiwrap entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-01-06 20:30:37,196 INFO success: update_overpass entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-01-06 20:30:37,199 INFO spawned: 'dispatcher_areas' with pid 43
2020-01-06 20:30:37,199 INFO success: areas_rules entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
File_Error Operation not permitted 1 /db/db//osm3s_v0.7.55_areas Unix_Socket::4
2020-01-06 20:30:37,225 INFO exited: dispatcher_areas (exit status 0; not expected)
File_Error Operation not permitted 1 /db/db//osm3s_v0.7.55_osm_base Unix_Socket::4
2020-01-06 20:30:37,242 INFO exited: overpass_dispatch (exit status 0; not expected)
Empty version, skipping file
<?xml version='1.0' encoding='UTF-8'?>
<osm version="0.6" generator="libosmium/2.15.2">
</osm>
Update finished with status code: 3
runtime error: The dispatcher (i.e. the database management system) is turned off.
It took 0 to run the loop. Desired load is: 10%. Sleeping: 3
2020-01-06 20:30:40,147 INFO spawned: 'overpass_dispatch' with pid 59
2020-01-06 20:30:40,149 INFO spawned: 'dispatcher_areas' with pid 60
File_Error Operation not permitted 1 /db/db//osm3s_v0.7.55_areas Unix_Socket::4
2020-01-06 20:30:40,160 INFO exited: dispatcher_areas (exit status 0; not expected)
File_Error Operation not permitted 1 /db/db//osm3s_v0.7.55_osm_base Unix_Socket::4
2020-01-06 20:30:40,175 INFO exited: overpass_dispatch (exit status 0; not expected)
runtime error: The dispatcher (i.e. the database management system) is turned off.
It took 0 to run the loop. Desired load is: 10%. Sleeping: 3
2020-01-06 20:30:43,175 INFO spawned: 'dispatcher_areas' with pid 70
File_Error Operation not permitted 1 /db/db//osm3s_v0.7.55_areas Unix_Socket::4
2020-01-06 20:30:43,203 INFO spawned: 'overpass_dispatch' with pid 71
2020-01-06 20:30:43,203 INFO exited: dispatcher_areas (exit status 0; not expected)
2020-01-06 20:30:43,204 INFO gave up: dispatcher_areas entered FATAL state, too many start retries too quickly
File_Error Operation not permitted 1 /db/db//osm3s_v0.7.55_osm_base Unix_Socket::4
2020-01-06 20:30:43,252 INFO exited: overpass_dispatch (exit status 0; not expected)
2020-01-06 20:30:44,253 INFO gave up: overpass_dispatch entered FATAL state, too many start retries too quickly
runtime error: The dispatcher (i.e. the database management system) is turned off.
It took 0 to run the loop. Desired load is: 10%. Sleeping: 3
runtime error: The dispatcher (i.e. the database management system) is turned off.
It took 0 to run the loop. Desired load is: 10%. Sleeping: 3
runtime error: The dispatcher (i.e. the database management system) is turned off.
It took 0 to run the loop. Desired load is: 10%. Sleeping: 3

The transaction.log is:

2020-01-06 20:30:36 [35] Dispatcher version 0.7.55.7 8b86ff77bcd2f1199f5e81ea28aac25fa5f84436 just started.
2020-01-06 20:30:37 [43] Dispatcher version 0.7.55.7 8b86ff77bcd2f1199f5e81ea28aac25fa5f84436 just started.
2020-01-06 20:30:37 [46] Dispatcher version 0.7.55.7 8b86ff77bcd2f1199f5e81ea28aac25fa5f84436 just started.
2020-01-06 20:30:40 [60] Dispatcher version 0.7.55.7 8b86ff77bcd2f1199f5e81ea28aac25fa5f84436 just started.
2020-01-06 20:30:40 [63] Dispatcher version 0.7.55.7 8b86ff77bcd2f1199f5e81ea28aac25fa5f84436 just started.
2020-01-06 20:30:43 [70] Dispatcher version 0.7.55.7 8b86ff77bcd2f1199f5e81ea28aac25fa5f84436 just started.
2020-01-06 20:30:43 [74] Dispatcher version 0.7.55.7 8b86ff77bcd2f1199f5e81ea28aac25fa5f84436 just started.

Thanks again!

wiktorn commented 4 years ago

Did you try creating unix sockets with netcat on your Windows mount?

Since 1803 unix sockets should be supported, I'm not sure if Docker on Windows supports them.

mullenkamp commented 4 years ago

Sorry, but I've just avoided the issue by running it in Linux. I'll close the issue, but thank you very much for the help.

muthenberg commented 2 years ago

It seems I've encountered the same issue on MacOS. But it is flaky. docker-compose down and docker-compose up fixes the issue for me (temporarily). I can work with that for the moment, but if you are interested in fixing the issue I am happy to provide whichever logs you require.

wiktorn commented 2 years ago

What would help here is:

Can you also provide more details how this issue is manifesting? Is it present since start (but not every time) or this is state you end up after some time the container is running?