ncsa / standalone-smm-analytics

dockerized version of analytics algorithms
Apache License 2.0
0 stars 0 forks source link

Change hard coded rabbitmq connection to use env variables #18

Closed ywkim312 closed 1 year ago

ywkim312 commented 1 year ago

Containers that are using the rebbitmq_handler.py are having the following error in K8s

  File "./rabbitmq_handler.py", line 51, in <module>
    connection = pika.BlockingConnection(pika.ConnectionParameters(port=5672, host="rabbitmq"))
  File "/usr/local/lib/python3.6/dist-packages/pika/adapters/blocking_connection.py", line 360, in __init__
    self._impl = self._create_connection(parameters, _impl_class)
  File "/usr/local/lib/python3.6/dist-packages/pika/adapters/blocking_connection.py", line 451, in _create_connection
    raise self._reap_last_connection_workflow_error(error)
  File "/usr/local/lib/python3.6/dist-packages/pika/adapters/utils/selector_ioloop_adapter.py", line 567, in _resolve
    self._flags)
  File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known`

So far, I found it from class_predict one and autophrase one. However, whatever the container that uses rabbitmq_handler.py will have this error.