jsbroks / coco-annotator

:pencil2: Web-based image segmentation tool for object detection, localization, and keypoints
MIT License
2.11k stars 460 forks source link

Problem activating coco-annotator using docker-compose #425

Open angeload opened 4 years ago

angeload commented 4 years ago

Hi,

Receiving an error message when starting a coco-annotator. It seems a problem with launching the worker.

annotator_webclient | [2020-10-06 17:38:18 +0000] [6] [INFO] Starting gunicorn 19.9.0
annotator_webclient | [2020-10-06 17:38:18 +0000] [6] [DEBUG] Arbiter booted
annotator_webclient | [2020-10-06 17:38:18 +0000] [6] [INFO] Listening at: http://0.0.0.0:5000 (6)
annotator_webclient | [2020-10-06 17:38:18 +0000] [6] [INFO] Using worker: eventlet
annotator_webclient | [2020-10-06 17:38:18 +0000] [10] [INFO] Booting worker with pid: 10
annotator_webclient | [2020-10-06 17:38:18 +0000] [6] [DEBUG] 1 workers
annotator_webclient | [2020-10-06 17:38:18 +0000] [10] [WARNING] MaskRCNN model is disabled.
annotator_webclient | [2020-10-06 17:38:18 +0000] [10] [WARNING] DEXTR model is disabled.
annotator_webclient | [2020-10-06 17:38:49 +0000] [10] [ERROR] Exception in worker process
annotator_webclient | Traceback (most recent call last):
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
annotator_webclient | worker.init_process()
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/geventlet.py", line 102, in init_process
annotator_webclient | super(EventletWorker, self).init_process()
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process
annotator_webclient | self.load_wsgi()
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
annotator_webclient | self.wsgi = self.app.wsgi()
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
annotator_webclient | self.callable = self.load()
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
annotator_webclient | return self.load_wsgiapp()
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
annotator_webclient | return util.import_app(self.app_uri)
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
annotator_webclient | import(module)
annotator_webclient | File "/workspace/webserver/init.py", line 63, in 
annotator_webclient | app = create_app()
annotator_webclient | File "/workspace/webserver/init.py", line 57, in create_app
annotator_webclient | ImageModel.objects.update(annotating=[])
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/mongoengine/queryset/manager.py", line 37, in get
annotator_webclient | queryset = queryset_class(owner, owner._get_collection())
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/mongoengine/document.py", line 208, in _get_collection
annotator_webclient | db.client.is_primary:
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/pymongo/mongo_client.py", line 857, in is_primary
annotator_webclient | return self._server_property('is_writable')
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/pymongo/mongo_client.py", line 689, in _server_property
annotator_webclient | writable_server_selector)
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/pymongo/topology.py", line 224, in select_server
annotator_webclient | address))
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/pymongo/topology.py", line 183, in select_servers
annotator_webclient | selector, server_timeout, address)
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/pymongo/topology.py", line 199, in _select_servers_loop
annotator_webclient | self._error_message(selector))
annotator_webclient | pymongo.errors.ServerSelectionTimeoutError: No servers found yet
annotator_webclient | [2020-10-06 17:38:49 +0000] [10] [INFO] Worker exiting (pid: 10)
annotator_webclient | [2020-10-06 17:38:50 +0000] [6] [INFO] Shutting down: Master
annotator_webclient | [2020-10-06 17:38:50 +0000] [6] [INFO] Reason: Worker failed to boot.
annotator_webclient exited with code 3
schneider-mathias commented 4 years ago

Got the same error after restarting an existing stack (using docker-swarm), worker cannot to the database (after enabling the database log, it seems this container runs fine). In issue #199, a similar problem occurred during the fix. Also tried it with a "fresh" stack, the worker problem unfortunately remains.

abisz commented 3 years ago

Any update on this issue? I'm facing the same problem after a fresh install.

ryota2425-murakami commented 2 years ago

What could be the cause of this? I have the same problem.