How to solve rasa.utils.endpoints.ClientResponseError?

I am getting

rasa.utils.endpoints.ClientResponseError: Requested URL /webhook not found

endpoints.yml:

action_endpoint: url: “http://localhost:5005/webhook

script.js from frontend file:

const rasa_server_url = “http://localhost:5005/webhooks/rest/webhook”;

What’s the issue?

@mangesh Which front end?

@nik202 front-end is in django I am not sure if it has some name, this is initial lines of script.js

@mangesh Django running on which port or host? Do you have index.html?

Yes, I have index.html. and I’m running sudo docker-compose up for running rasa and just clicking on index.html to open it. I didn’t initiate django server

@mangesh Do you have Image of Django in docker compose and port expose? Did you seen that rasa, Rasa SDK and Django server is running? Please even share index.html.Further, do you have manage.py?

@mangesh It not using Docker-compose, but still you can find some missing links from this video https://youtu.be/XMAw_bKTLbA in this video, chatroom is used, I don’t know what you are using.

This is docker-compose.yml, I don’t think it has a django-image.

should I do something related to django?

actually, i did not start this project, so the sender sent me frontend-files separately which had html, css and javascript only and i’m running index.html from there.

This is my index.html (css and js are in different folders):

<!-- {% load static %} -->
Chatbot
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
<meta content="utf-8" http-equiv="encoding" />


<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>

<!--Import Google Icon Font-->
<link
  href="https://fonts.googleapis.com/icon?family=Material+Icons"
  rel="stylesheet"
/>
<link
  href="https://fonts.googleapis.com/css?family=Raleway:500&display=swap"
  rel="stylesheet"
/>

<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
  href="https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap"
  rel="stylesheet"
/>

<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
  href="https://fonts.googleapis.com/css2?family=Lato&display=swap"
  rel="stylesheet"
/>

<!--Import Font Awesome Icon Font-->
<link
  rel="stylesheet"
  href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
  integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0="
  crossorigin="anonymous"
/>

<!--Import materialize.css-->
<link
  rel="stylesheet"
  type="text/css"
  href="css/materialize.min.css"
/>

<!--Main css-->
<link rel="stylesheet" type="text/css" href='css/style.css'/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
  <!--chatbot widget -->
  <div class="widget">
    <div class="chat_header">
      <!--Add the name of the bot here -->
      <span class="chat_header_title">Bot</span>
      <span class="dropdown-trigger" href="#" data-target="dropdown1">
        <i class="material-icons"> more_vert </i>
      </span>

      <!-- Dropdown menu-->
      <ul id="dropdown1" class="dropdown-content">
        <li><a href="#" id="clear">Clear</a></li>
        <li><a href="#" id="restart">Restart</a></li>
        <li><a href="#" id="close">Close</a></li>
      </ul>
    </div>

    <div class="chatstop" id="chatstop">
      <div class=".col-xs-6 .col-md-10 powered_by">
        <span>
          <a href="http://guidona.com/">
            <b>Powered By Guidona</b>
          <img class="company_logo" src="img/Company_Logo_96x96.jpeg" />
          </a>
        </span>
      </div>
    </div>

    <!--Chatbot contents goes here -->
    <div class="chats" id="chats">
      <div class="clearfix"></div>
    </div>

    <!--keypad for user to type the message -->
    <div class="keypad">
      <textarea
        id="userInput"
        placeholder="Type a message..."
        class="usrInput"
      ></textarea>
      <div id="sendButton">
        <i class="fa fa-paper-plane" aria-hidden="true"></i>
      </div>
    </div>
  </div>

  <!--bot profile-->
  <div class="profile_div" id="profile_div">
    <img class="imgProfile" src="img/icon_WomenLawyer.png"/>
  </div>

  <!-- Bot pop-up intro -->
</div>

<!--JavaScript at end of body for optimized loading-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="js/materialize.min.js"></script>
<!--Main Script -->
<script type="text/javascript" src="js/script.js"></script>

<!--Chart.js Script -->
<script type="text/javascript" src="js/chart.min.js"></script>

@mangesh change

action_endpoint: url: “http://localhost:5005/webhook”

action_endpoint: url: “http://rasa-actions:5005/webhook”

Try

actually, i used that video once to seperately start django servers and run chatbot but still it was getting into same errors

@mangesh you are using Jitasesh G repo?

okay, i’ll try this

I am not sure what is that so maybe no :confused:

@mangesh are you sure, you mention the command in right format in docker-compose? I would encourage, first see some docker-compose files of rasa and try run basic chatbot using shell. I can see error in command syntax.

@mangesh In your docker compose, why you used same image name? guiding-bot:latest it will be the container name and how you will differentiate later? check docker ps

@mangesh How you will manage the action.py requirements if you are using some external packages or library? for that you also need requirement.txt, see that also. Sample Example:

    version: "3.0"  
    services:  
      rasa:  
        image: rasa/rasa:2.6.3-full  
        ports:   
          - 5005:5005  
        volumes:   
          - ./:/app  
        command:  
          - run  
          - -m  
          - models   
          - --enable-api  
          - --cors   
          - "*"  
          - --debug   
      action_server:  
        image: rasa/rasa_core_sdk:latest  
        ports:  
          - 5055:5055  
        volumes:  
          - ./actions:/app/actions  
       command:  
         - rasa  
         - run  
         - actions

is there some specific template for docker-compose.yml for rasa? Is there some immediate corrections you can suggest that I should be making or the whole file is wrongly created?

@mangesh I already send you the file, and I would encourage to use Rasa-Webchat (Botfront) else later chatbot will give you a nightmare when you deploy on Website.

@mangesh Fix the docker-compose file, see some generic rasa files, it will help you. I know you working on Ubuntu.Right. I guess this much help is fine? Good Luck!

Thank you so much for your guidance @nik202 . I think I have the approach now. Earlier, I was Confused.

@mangesh Good Luck.

Tip: Try see docker image of Wordpress and Integration Rasa Webchat on Wordpress on youtube :wink: You gonna rock.

1 Like

hey guys,

I have the same issue but I have deployed Rasa on a server. @nik202 Should I talk to the server admin about this?

@EvanMath can you elaborate more?