How can we change the port number in latest version?

Hi,

In rasa old version we had an availability of changing port number but now rasa nlu and rasa core were merged , now how can we change port number in latest version of rasa and in which files we need to make changes?

thanks in advance!

1 Like

Hi @Mounika1,

I’d recommend you to read:

if you start the bot via cmd, then it would be

rasa run [-h] [-v] [-vv] [--quiet] [-m MODEL] [--log-file LOG_FILE] [--endpoints ENDPOINTS] [-p PORT]

depending on which port you want to configure. Otherwise you either have the possibility to modify config.yml for possible Extractor ports or endpoints/credentials.

If you need help, feel free to ask.

Regards

1 Like

what files we need to mention in the above command along with port number or how can I modify config.yml for possible extractor ports.

Hi @Mounika1

a default could be: rasa run -vv -m models/ --endpoints endpoints.yml -p 5005

If you e.g. use duckling as an extractor, your config.yml should contain:

  - dimensions:
    - time
    - duration
  locale: de_DE
  name: DucklingHTTPExtractor
  timezone: Europe/Berlin
  url: http://localhost:8001

In which you could just modify the port to your wishes.

Did that help?

yeah, I tried this and the port number is changing by running above command but still showing the previous bot instead of new one. How can I fix this?

What do you mean by “previous bot”?

If you are talking about a specific model, you can use the path to this model as the command line argument for “-m”…

Do you try to run several bots alongside?

yeah I am running 3 bots using different port numbers

Okay, then I need to know more about your setup:

  • Does every bot have its own directory in terms of the rasa file/directory structure?
  • Are you using separate action and/or nlg server?
  • Are you using any credentials/endpoints that might lead to duplicate ports?

yeah, every bot has its own directory in terms of the rasa file/directory structure I am using the same action server for 2 bots in credentials I am not using anything that leads to duplicate ports but in endpoints I am mentioning same action server for 2 bots

Okay, so based on what I read you have to do:

Open Terminal 1:

rasa run -m <directory_of_bot_1>/<path_to_model>/<modelname> --endpoints <directory_of_bot_1>/endpoints.yml --credentials <directory_of_bot_1>/credentials.yml -p 5005

Open Terminal 2:

rasa run -m <directory_of_bot_1>/<path_to_model>/<modelname> --endpoints <directory_of_bot_1>/endpoints.yml --credentials <directory_of_bot_1>/credentials.yml -p 5006

However, if you want to interact with the HTTP API of each bot, you have to specify:

rest:

in the credentials and then you would be able to request:

http://localhost:5005/webhooks/rest/webhook
http://localhost:5006/webhooks/rest/webhook

Did that help you?

I would by the way recommend you to use docker-compose for this type of scenario.

Regards

I tried that but still I am facing the same issue. Do I need to change actions server port too??

hey @Mounika1, you can change the port using the below command

rasa run -m models --enable-api --cors “*” --debug -p 5004

while running bot by using the above command it is not displaying any bot there, it is just displaying an empty page.

how to change the port of action server, if we are using the rasa/rasa-sdk Docker image? Docker Hub

solved: How to start multiple bot in one docker-compose

@JulianGerhard COuld you please help me with this?? Performance issue with action end point