Command "rasa x" error : 2019-08-22 16:26:41 ERROR rasax.community.api.blueprints.stack - Failed to send message to Rasa Chat webhook. Error: Cannot connect to host localhost:5005 ssl:None [Connection refused]

I install rasa x and train my models nlu and core. I run “rasa x” command but have the following issue : “2019-08-22 16:26:41 ERROR rasax.community.api.blueprints.stack - Failed to send message to Rasa Chat webhook. Error: Cannot connect to host localhost:5005 ssl:None [Connection refused]”.

The web page is open on http://localhost:5002/talk but I can’t discuss with the bot.

Any advice ? :slight_smile:

Can you please run rasa x --debug and post the logs here?

Hello @Tobias_Wochinger, thanks for your answer. I fixed the issue, I made a mistake in my credentials.md file :slight_smile:

Cool that you found it :rocket: :female_detective: :male_detective:

what did you do in your credentials file, because I’m having a similar issue

1 Like

I am also facing same issue

Below are the logs, when i ping anything on the interactive chat time. Any help would be great

2020-03-12 21:57:27 DEBUG    rasax.community.database.utils  - Turned SQLite foreign key enforcement on.
2020-03-12 21:57:27 DEBUG    rasax.community.database.utils  - Turned on SQLite WAL mode.
2020-03-12 21:57:27 DEBUG    sanic.root  - CORS: Request to '/api/conversations/ef139174211d45a98026dfbd565dc250' matches CORS resource '/*'. Using options: {'origins': ['.*'], 'methods': 'DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT', 'allow_headers': ['.*'], 'expose_headers': 'X-Total-Count', 'supports_credentials': False, 'max_age': 1800, 'send_wildcard': False, 'automatic_options': True, 'vary_header': True, 'resources': '/*', 'intercept_exceptions': True, 'always_send': True}

Mhm, that actually seems fine. What’s the content of your endpoints.yml and of credentials.yml?

Hi everyone,

I face the same issue, but I have some more info. The goal I want to achieve is a running rasa instance accessible by a url in which is made use of an action server for rasa forms and api calls.

First I run the action server on port 5055 (default)

Then I run the Rasa X server on port 5002 (default)

Port 5002 is forwarded to access and I can login fine.

Now I try to chat with the bot but now I get this error:

2020-04-05 14:40:45 ERROR rasax.community.api.blueprints.stack - Failed to send message to Rasa Chat webhook. Error: Cannot connect to host localhost:5005 ssl:default [Connection refused]

It looks like Rasa X cannot connect to Rasa server itself (port 5005?) Then I tried some combinations:

  • If I try running Rasa X without starting the action server it works (until we come to the part where the action server is needed)
  • If I run the action server but instead of rasa x I run rasa shell, it works again.

Running the complete setup on a local machine is no problem, but we are doing something wrong in the settings of this server. We would be pleased if someone can explain how to set up this in general and in particular the handling of ssl, because we suppose this can be the issue.

Thanks in advance

1 Like

I am facing an issue . I have installed rasa x using the integrated control … I have followed the procedure given in docs. I have synced my git to the rasa x . It shows a green handle meaning sync successful. All the stories , responses, have been updated in rasax uI. when i chat with the bot it doesnt give a reponse. I checked console it is giving 2.76631f6e.chunk.js:2 POST http://206.189.143.250/api/conversations/0a8f146e2a8f44fa8015dc9ed8b278bd/messages?environment=production 404 (Not Found) . the link address gives this json error : {“reasons”:[“Authorization header not present.”],“exception”:“Unauthorized”}. I am stuck for 2 days please help!! deployed rasa x using docker method. Here are the snippets using the following command sudo docker-compose logs. @Tobias_Wochinger

I am sorry this post is too long . i dont know what to do.

@pranavamakarand This is indeed a very strange error since it suggests that Rasa X is running in its local mode but within the docker setup :thinking: How did you deploy Rasa X?

I deployed using docker compose up -d. Is it possible that there are some python libraries missing in the docker image. i got aiohttp error , I added custom images to the docker image but it was of no use. I dont know I have given up .

I have exactly the same problem. Could you solve it in the meantime ?

My Rasa Instance + Custom Action Server runs on an AWS EC2 instance. If I upload the training data manually, everything works. Unfortunately training via the RASA-X interface does not work.

Got the following output: rasa-x_1 | ERROR:rasax.community.api.blueprints.models:400, message=‘Bad Request’, url=URL(‘http://rasa-worker:5005/model/train?token=5itSJABquZq5zjA’) rasa-x_1 | Encountered an exception while training. Please check the logs of the rasa worker container for more information.

I am having same issue. Failed to send message to Rasa Chat webhook. Error: 401, message=‘Unauthorized’, url=URL(‘http://rasa-production:5005/webhooks/rasa/webhook’)

Need help. Thanks in Advance.

i’m facing same issue.! i’m running rasa x on wsl (ubuntu) not using any docker. Please help me out if you have already resolved the issue

Hi Tobias, probably you could help us in getting out from this ocean of errors .! would you be kind enough to take sometime and answer (thinkinnet) user because lot of people are facing same issue ssl [connection refused] error

@suryakiran can you share the screenshot of error?

Thanks a lot for prompt response.! Here is the screenshot.! when i run in debug mode i find out that initial error causing due (sqlite3.OperationalError: locking protocol) i don’t really know why because when i just do rasa shell and check all my intents and actions everything seems fine. i’m not using any database or haven’t done any db configuration. Since this is the initial error it seems service(rasa server) not able to start on port 5005.! on my rasa x console entire project loaded but not models and no chatbot window.! (adding more to it ) when i try to load one of the model from portal .

@suryakiran you using rasa X or Rasa open source? huh and how can it be similar error its related to sql. create a separate topic for your error please.

initially i created my mini project on rasa .! and then installed rasa x on same env .!