dataplay3
dataplay3 copied to clipboard
i used the dockerfile to build images, then an error appeared when running a container.
sh
entrypoint.sh
==> /home/logs/gunicorn-access.log <==
==> /home/logs/gunicorn.log <== [2019-04-29 07:37:42 +0000] [7] [INFO] Starting gunicorn 19.9.0 [2019-04-29 07:37:42 +0000] [7] [INFO] Listening at: http://0.0.0.0:8000 (7) [2019-04-29 07:37:42 +0000] [7] [INFO] Using worker: sanic.worker.GunicornWorker [2019-04-29 07:37:42 +0000] [15] [INFO] Booting worker with pid: 15 [2019-04-29 07:37:43 +0000] [17] [INFO] Booting worker with pid: 17 [2019-04-29 07:37:43 +0000] [19] [INFO] Booting worker with pid: 19 [2019-04-29 07:37:43 +0000] [21] [INFO] Booting worker with pid: 21 [2019-04-29 07:37:43 +0000] [22] [INFO] Booting worker with pid: 22 /usr/local/lib/python3.6/dist-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release. from numpy.core.umath_tests import inner1d /usr/local/lib/python3.6/dist-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release. from numpy.core.umath_tests import inner1d /usr/local/lib/python3.6/dist-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release. from numpy.core.umath_tests import inner1d /usr/local/lib/python3.6/dist-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release. from numpy.core.umath_tests import inner1d /usr/local/lib/python3.6/dist-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release. from numpy.core.umath_tests import inner1d INFO:sanic.root:using static path /home/dataplay/filesvc/../static INFO:sanic.root:using static path /home/dataplay/filesvc/../static INFO:sanic.root:using static path /home/dataplay/filesvc/../static INFO:sanic.root:using static path /home/dataplay/filesvc/../static INFO:sanic.root:using static path /home/dataplay/filesvc/../static Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/gunicorn/arbiter.py", line 210, in run self.sleep() File "/usr/local/lib/python3.6/dist-packages/gunicorn/arbiter.py", line 360, in sleep ready = select.select([self.PIPE[0]], [], [], 1.0) File "/usr/local/lib/python3.6/dist-packages/gunicorn/arbiter.py", line 245, in handle_chld self.reap_workers() File "/usr/local/lib/python3.6/dist-packages/gunicorn/arbiter.py", line 525, in reap_workers raise HaltServer(reason, self.WORKER_BOOT_ERROR) gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/gunicorn", line 10, in
[2019-04-29 07:37:53 +0000] [19] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/usr/local/lib/python3.6/dist-packages/sanic/worker.py", line 51, in init_process
super().init_process()
File "/usr/local/lib/python3.6/dist-packages/gunicorn/workers/base.py", line 129, in init_process
self.load_wsgi()
File "/usr/local/lib/python3.6/dist-packages/gunicorn/workers/base.py", line 138, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python3.6/dist-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/local/lib/python3.6/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load
return self.load_wsgiapp()
File "/usr/local/lib/python3.6/dist-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python3.6/dist-packages/gunicorn/util.py", line 350, in import_app
import(module)
File "/home/dataplay/server.py", line 39, in
Yes, it seems something wrong with route, did you have that issue when you run locally out of docker? I mean run doit server
the current dockerfile need improving to make it self contained, will fix it.
thanks for your time, I have successful to start the server in the container by 'doit server'. but an other problem arises. the Listening address is 127.0.0.1:8000, I cannot access outside.
/code/dataplay3/server # doit server & /code/dataplay3/server # . server [2019-04-30 11:03:31 +0000] [1595] [INFO] Starting gunicorn 19.9.0 [2019-04-30 11:03:31 +0000] [1595] [INFO] Listening at: http://127.0.0.1:8000 (1595) [2019-04-30 11:03:31 +0000] [1595] [INFO] Using worker: sanic.worker.GunicornWorker [2019-04-30 11:03:31 +0000] [1609] [INFO] Booting worker with pid: 1609 [2019-04-30 11:03:31 +0000] [1610] [INFO] Booting worker with pid: 1610 [2019-04-30 11:03:32 +0000] [1611] [INFO] Booting worker with pid: 1611 [2019-04-30 11:03:32 +0000] [1612] [INFO] Booting worker with pid: 1612 [2019-04-30 11:03:32 +0000] [1613] [INFO] Booting worker with pid: 1613 INFO:sanic.root:using static path /code/dataplay3/server/dataplay/filesvc/../static INFO:sanic.root:using static path /code/dataplay3/server/dataplay/filesvc/../static INFO:sanic.root:using static path /code/dataplay3/server/dataplay/filesvc/../static INFO:sanic.root:using static path /code/dataplay3/server/dataplay/filesvc/../static INFO:sanic.root:using static path /code/dataplay3/server/dataplay/filesvc/../static
/code/dataplay3/server # curl 127.0.0.1:8000 [2019-04-30 11:03:59 +0000] - (sanic.access)[INFO][127.0.0.1:58220]: GET http://127.0.0.1:8000/ 302 0 INFO:sanic.access: /code/dataplay3/server # ps PID USER TIME COMMAND 1 root 0:00 /bin/sh 1594 root 0:00 {doit} /usr/local/bin/python /usr/local/bin/doit server 1595 root 0:00 {gunicorn} /usr/local/bin/python /usr/local/bin/gunicorn dataplay.server:app 鈥攂ind=0.0.0.0:8000 --worker-class=sanic.worker.GunicornWorker --workers=5 1609 root 0:01 {gunicorn} /usr/local/bin/python /usr/local/bin/gunicorn dataplay.server:app 鈥攂ind=0.0.0.0:8000 --worker-class=sanic.worker.GunicornWorker --workers=5 1610 root 0:01 {gunicorn} /usr/local/bin/python /usr/local/bin/gunicorn dataplay.server:app 鈥攂ind=0.0.0.0:8000 --worker-class=sanic.worker.GunicornWorker --workers=5 1611 root 0:01 {gunicorn} /usr/local/bin/python /usr/local/bin/gunicorn dataplay.server:app 鈥攂ind=0.0.0.0:8000 --worker-class=sanic.worker.GunicornWorker --workers=5 1612 root 0:01 {gunicorn} /usr/local/bin/python /usr/local/bin/gunicorn dataplay.server:app 鈥攂ind=0.0.0.0:8000 --worker-class=sanic.worker.GunicornWorker --workers=5 1613 root 0:01 {gunicorn} /usr/local/bin/python /usr/local/bin/gunicorn dataplay.server:app 鈥攂ind=0.0.0.0:8000 --worker-class=sanic.worker.GunicornWorker --workers=5 1614 root 0:00 /usr/local/bin/python -c from multiprocessing.semaphore_tracker import main;main(17) 1615 root 0:00 /usr/local/bin/python -c from multiprocessing.semaphore_tracker import main;main(17) 1616 root 0:00 /usr/local/bin/python -c from multiprocessing.semaphore_tracker import main;main(17) 1617 root 0:00 /usr/local/bin/python -c from multiprocessing.semaphore_tracker import main;main(17) 1618 root 0:00 /usr/local/bin/python -c from multiprocessing.semaphore_tracker import main;main(17) 1620 root 0:00 ps
did you try to run make docker
and then make run
from dataplay dir? that will build a docker locally and run it for you.
I have made some change to the dockerfile, check if that fix your problem