coco-annotator icon indicating copy to clipboard operation
coco-annotator copied to clipboard

windows 10 - annotator workers failed to resolve broker hostname

Open ieriii opened this issue 3 years ago • 5 comments

I'm trying to use the coco-annotator on my windows 10 laptop. When I run docker-compose up, the container fails to run properly. The error:

consumer: Cannot connect to amqp://user:**@messageq:5672//: failed to resolve broker name hostname.

Anyone has any suggestions on how to fix this? I also tried to run the container from WSL2 but no luck.

ieriii avatar Aug 04 '21 07:08 ieriii

The problem is caused by the new version of RabbitMQ won't running while using deprecated RABBITMQ_DEFAULT_PASS and RABBITMQ_DEFAULT_USER environment variables (Refer: https://hub.docker.com/_/rabbitmq Environment Variables section). You can try to downgrade the version of RabbitMQ by changing the image version to 3.8 in docker-compose.yml file.

  messageq:
    image: rabbitmq:3
    container_name: annotator_message_q
    environment:
      - RABBITMQ_DEFAULT_USER=user
      - RABBITMQ_DEFAULT_PASS=password
    networks:
      - cocoannotator

to

  messageq:
    image: rabbitmq:3.8
    container_name: annotator_message_q
    environment:
      - RABBITMQ_DEFAULT_USER=user
      - RABBITMQ_DEFAULT_PASS=password
    networks:
      - cocoannotator

Hope it helps

rochimfn avatar Aug 05 '21 05:08 rochimfn

Changing the image version to 3.8 does the trick. Thank you for your help.

ieriii avatar Aug 05 '21 10:08 ieriii

changing to 3.8 I am getting

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 <module>
annotator_webclient |     app = create_app()
annotator_webclient |   File "/workspace/webserver/__init__.py", line 40, in create_app
annotator_webclient |     run_watcher()
annotator_webclient |   File "/workspace/webserver/watcher.py", line 62, in run_watcher
annotator_webclient |     observer.start()
annotator_webclient |   File "/usr/local/lib/python3.6/site-packages/watchdog/observers/api.py", line 255, in start
annotator_webclient |     emitter.start()
annotator_webclient |   File "/usr/local/lib/python3.6/site-packages/watchdog/utils/__init__.py", line 111, in start
annotator_webclient |     self.on_thread_start()
annotator_webclient |   File "/usr/local/lib/python3.6/site-packages/watchdog/observers/inotify.py", line 121, in on_thread_start
annotator_webclient |     self._inotify = InotifyBuffer(path, self.watch.is_recursive)
annotator_webclient |   File "/usr/local/lib/python3.6/site-packages/watchdog/observers/inotify_buffer.py", line 35, in __init__
annotator_webclient |     self._inotify = Inotify(path, recursive)
annotator_webclient |   File "/usr/local/lib/python3.6/site-packages/watchdog/observers/inotify_c.py", line 176, in __init__
annotator_webclient |     Inotify._raise_error()
annotator_webclient |   File "/usr/local/lib/python3.6/site-packages/watchdog/observers/inotify_c.py", line 406, in _raise_error
annotator_webclient |     raise OSError(os.strerror(err))
annotator_webclient | OSError: Function not implemented

naarkhoo avatar Aug 17 '21 20:08 naarkhoo

changing the version displays the same error

hamzaR12 avatar Aug 18 '21 20:08 hamzaR12

changing the version does solve the problem, thx~

cold-blue avatar Aug 21 '23 06:08 cold-blue