Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to external rabbitMQ amqps host #8042

Closed
nakshathru opened this issue Feb 24, 2021 · 9 comments
Closed

Unable to connect to external rabbitMQ amqps host #8042

nakshathru opened this issue Feb 24, 2021 · 9 comments
Assignees
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-x/infrastructure 🚂 All things related to infrastructure or deployments

Comments

@nakshathru
Copy link
Contributor

nakshathru commented Feb 24, 2021

Rasa version : 2.3.1

Rasa X version (if used & relevant): 0.36.0

Python version : 3.8

Operating system (windows, osx, ...): Linux

Issue : I'm trying to deploy Rasa using Rasa-X into EKS cluster. I'm using a Amazon MQ (rabbitMQ) service which provides amqps endpoint. But rasa-production and rasa-worker pods are failing to connect to MQ service. But I can see a single connection in RabbitMQ portal with queue as 'rasa_production_events'. So one of the service is able to connect. Rasa-X working normally, but when I start training model, it's failing due to not getting connected to the queue.

Error (including full traceback) :

2021-02-24 14:26:21 INFO root - Starting Rasa server on http://localhost:5005
2021-02-24 14:26:21 DEBUG rasa.core.utils - Using the default number of Sanic workers (1).
2021-02-24 14:26:21 DEBUG urllib3.connectionpool - Starting new HTTPS connection (1): api.segment.io:443
2021-02-24 14:26:21 DEBUG urllib3.connectionpool - https://api.segment.io:443 "POST /v1/track HTTP/1.1" 200 21
2021-02-24 14:26:21 INFO root - Enabling coroutine debugging. Loop id 83705424.
2021-02-24 14:26:21 DEBUG root - Could not load interpreter from 'None'.
2021-02-24 14:26:21 INFO rasa.core.brokers.pika - Connecting to RabbitMQ ...
2021-02-24 14:26:21 DEBUG rasa.core.brokers.pika - Connecting to 'amqps://123456789.mq.us-east-1.amazonaws.com' failed with error 'ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.'. Trying again.

@nakshathru nakshathru added area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. labels Feb 24, 2021
@sara-tagger
Copy link
Collaborator

Thanks for the issue, @tttthomasssss will get back to you about it soon!

You may find help in the docs and the forum, too 🤗

@kaustuk
Copy link
Contributor

kaustuk commented Feb 25, 2021

Hi @nakshathru I also faced similar issue. I am not sure if this is the right solution or not. But it works for me. Here is the solution. This is what you need to provide in endpoints.yaml file.

    event_broker:
      type: "pika"
      url: "amqps://username:[email protected]:5671"
      username: ""
      password: ""
      port: 5671
      exchange_name: "default_exchange"
      queues:
      - queue_1

So here basically username and password would be taken from url itself. Also note that this works only when you give username and password value as empty(not in url but other one)

Let me know if you face any issue with this approach.

But yeah I also feel that this is not good approach to do, that is to have username and password present in code or deployment file.

@nakshathru
Copy link
Contributor Author

Hi @kaustuk
I almost deleted my amazon MQ instance since it wasn't useful. Thanks for the response and it totally worked.
Yes, it is really weird that, Rasa is not accepting username and password via the values.yml file but Rasa-X is accepting it.
Also this hack exposes credentials in log file if debug mode is on.

@kaustuk
Copy link
Contributor

kaustuk commented Feb 25, 2021

@nakshathru Let's not close this issue. Keep it open so right solution(without hack) is being implemented in rasa open source as well.

@tttthomasssss
Copy link
Contributor

Thanks very much for submitting the issue @nakshathru - and thank you for pointing out a workaround @kaustuk.

I agree, it makes sense to keep this on the books so we can have a closer look at whats going on!

@tttthomasssss tttthomasssss reopened this Feb 25, 2021
@nakshathru
Copy link
Contributor Author

@tttthomasssss I created a PR for fixing this issue. Can you review the changes ?
#8057

@TyDunn TyDunn added the area:rasa-x/infrastructure 🚂 All things related to infrastructure or deployments label Apr 21, 2021
@stale
Copy link

stale bot commented Jul 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 21, 2021
@stale stale bot removed the stale label Aug 16, 2021
@tmbo tmbo assigned alwx and unassigned RASADSA Sep 6, 2021
@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 9, 2022
@rasabot-exalate rasabot-exalate added area:rasa-oss and removed type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-x/infrastructure 🚂 All things related to infrastructure or deployments labels Mar 15, 2022 — with Exalate Issue Sync
@stale stale bot removed the stale label Mar 15, 2022
@m-vdb m-vdb added area:rasa-x/infrastructure 🚂 All things related to infrastructure or deployments and removed area:rasa-x/infrastructure labels Mar 16, 2022
@rasabot rasabot added area:rasa-oss 🎡 Anything related to the open source Rasa framework and removed area:rasa-oss labels Mar 16, 2022
@rasabot-exalate rasabot-exalate added area:rasa-x/infrastructure_:steam_locomotive: area:rasa-x/infrastructure 🚂 All things related to infrastructure or deployments and removed area:rasa-x/infrastructure 🚂 All things related to infrastructure or deployments area:rasa-x/infrastructure_:steam_locomotive: labels Mar 17, 2022 — with Exalate Issue Sync
@m-vdb
Copy link
Collaborator

m-vdb commented May 23, 2022

Closing as it was addressed with #8057

@m-vdb m-vdb closed this as completed May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-x/infrastructure 🚂 All things related to infrastructure or deployments
Projects
None yet
Development

No branches or pull requests

10 participants