dataplay3 icon indicating copy to clipboard operation
dataplay3 copied to clipboard

i used the dockerfile to build images, then an error appeared when running a container.

Open ConlinH opened this issue 5 years ago • 5 comments

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 sys.exit(run()) File "/usr/local/lib/python3.6/dist-packages/gunicorn/app/wsgiapp.py", line 61, in run WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() File "/usr/local/lib/python3.6/dist-packages/gunicorn/app/base.py", line 223, in run super(Application, self).run() File "/usr/local/lib/python3.6/dist-packages/gunicorn/app/base.py", line 72, in run Arbiter(self).run() File "/usr/local/lib/python3.6/dist-packages/gunicorn/arbiter.py", line 232, in run self.halt(reason=inst.reason, exit_status=inst.exit_status) File "/usr/local/lib/python3.6/dist-packages/gunicorn/arbiter.py", line 345, in halt self.stop() File "/usr/local/lib/python3.6/dist-packages/gunicorn/arbiter.py", line 393, in stop time.sleep(0.1) 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>

[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 app.blueprint(file_svc) File "/usr/local/lib/python3.6/dist-packages/sanic/app.py", line 555, in blueprint blueprint.register(self, options) File "/usr/local/lib/python3.6/dist-packages/sanic/blueprints.py", line 141, in register uri, future.file_or_directory, *future.args, **future.kwargs File "/usr/local/lib/python3.6/dist-packages/sanic/app.py", line 533, in static content_type, File "/usr/local/lib/python3.6/dist-packages/sanic/static.py", line 146, in register )(_handler) File "/usr/local/lib/python3.6/dist-packages/sanic/app.py", line 192, in response name=name, File "/usr/local/lib/python3.6/dist-packages/sanic/router.py", line 147, in add self._add(uri, methods, handler, host, name) File "/usr/local/lib/python3.6/dist-packages/sanic/router.py", line 303, in _add route = merge_route(route, methods, handler) File "/usr/local/lib/python3.6/dist-packages/sanic/router.py", line 255, in merge_route uri, ",".join(list(duplicated)) sanic.router.RouteExists: Route already registered: /ui<file_uri:/?.+> [GET,HEAD]

ConlinH avatar Apr 29 '19 07:04 ConlinH

Yes, it seems something wrong with route, did you have that issue when you run locally out of docker? I mean run doit server

gangtao avatar Apr 29 '19 22:04 gangtao

the current dockerfile need improving to make it self contained, will fix it.

gangtao avatar Apr 30 '19 07:04 gangtao

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

ConlinH avatar Apr 30 '19 11:04 ConlinH

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.

gangtao avatar Apr 30 '19 19:04 gangtao

I have made some change to the dockerfile, check if that fix your problem

gangtao avatar May 01 '19 01:05 gangtao