Closed danielandross closed 5 years ago
Please post the full program output, if there's any more available.
Are you using the existing Dockerfile
from the repo, or did you have to customize it to work with hypriot? I assume it ultimate tries to run the gunicorn
command from here:
https://github.com/mozilla-services/syncserver/blob/master/docker-entrypoint.sh#L7
Which seems OK to me at first glance. I wonder if there's some difference between /bin/sh
in your build vs the default one, which might be causing this script to work incorrectly.
Thank you for support. I tried it with the Docker file from this repository. I also changed the Image to arm32v6/python:2.7-alpine. But both attempts will have the exact same result.
The build seems ok. But when running (I use docker compose) this happens:
Creating syncserver_server_1 ... done
Attaching to syncserver_server_1
server_1 | usage: gunicorn [OPTIONS] [APP_MODULE]
server_1 | gunicorn: error: unrecognized arguments: syncserver.wsgi_app
syncserver_server_1 exited with code 2
cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
HYPRIOT_OS="HypriotOS/armhf"
HYPRIOT_OS_VERSION="v2.0.1"
HYPRIOT_DEVICE="Raspberry Pi"
HYPRIOT_IMAGE_VERSION="v1.9.0"
This is the ouput of a simple run: [2019-03-09 17:07:38 +0000] [7] [INFO] Starting gunicorn 19.6.0 [2019-03-09 17:07:38 +0000] [7] [INFO] Listening at: http://0.0.0.0:5000 (7) [2019-03-09 17:07:38 +0000] [7] [INFO] Using worker: sync [2019-03-09 17:07:38 +0000] [12] [INFO] Booting worker with pid: 12 [2019-03-09 17:07:39 +0000] [12] [ERROR] Exception in worker process Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 557, in spawn_worker worker.init_process() File "/usr/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 126, in init_process self.load_wsgi() File "/usr/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 136, in load_wsgi self.wsgi = self.app.wsgi() File "/usr/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/usr/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load return self.load_wsgiapp() File "/usr/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp return util.import_app(self.app_uri) File "/usr/local/lib/python2.7/site-packages/gunicorn/util.py", line 357, in import_app import(module) ImportError: No module named wsgi [2019-03-09 17:07:39 +0000] [12] [INFO] Worker exiting (pid: 12) [2019-03-09 17:07:39 +0000] [7] [INFO] Shutting down: Master [2019-03-09 17:07:39 +0000] [7] [INFO] Reason: Worker failed to boot.
Now it works if I use the base images as specified in the Dockerfile. Problem seemed to be docker-compose. My bad, sorry
I want to run syncserver on hypriot (docker appliance for rpi) on my rpi 3b+. Build is successful. When I try to run I always get this: gunicorn: error: unrecognized arguments: syncserver.wsgi_app