I cant login to rasa x

I have deployed my rasa x to docker I have used this command to set the password of rasa x python rasa_x_commands.py create --update me admin but it stills says wrong credentials

This is my docker_compose.yml file:

[version: “3.4”]

x-database-credentials: &database-credentials DB_HOST: “db” DB_PORT: “5432” DB_USER: “${DB_USER:-admin}” DB_PASSWORD: “${DB_PASSWORD}” DB_LOGIN_DB: “${DB_LOGIN_DB:-rasa}”

x-rabbitmq-credentials: &rabbitmq-credentials RABBITMQ_HOST: “rabbit” RABBITMQ_USERNAME: “user” RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD}

x-redis-credentials: &redis-credentials REDIS_HOST: “redis” REDIS_PORT: “6379” REDIS_PASSWORD: ${REDIS_PASSWORD} REDIS_DB: “1”

x-duckling-credentials: &duckling-credentials RASA_DUCKLING_HTTP_URL: “http://duckling:8000

x-rasax-credentials: &rasax-credentials RASA_X_HOST: “http://rasa-x:5002” RASA_X_USERNAME: ${RASA_X_USERNAME:-admin} RASA_X_PASSWORD: ${RASA_X_PASSWORD:-} RASA_X_TOKEN: ${RASA_X_TOKEN} JWT_SECRET: ${JWT_SECRET} RASA_USER_APP: “http://app:5055” RASA_PRODUCTION_HOST: “http://rasa-production:5005” RASA_WORKER_HOST: “http://rasa-worker:5005” RASA_TOKEN: ${RASA_TOKEN}

x-rasa-credentials: &rasa-credentials <<: *rabbitmq-credentials <<: *rasax-credentials <<: *database-credentials <<: *redis-credentials <<: *duckling-credentials RASA_TOKEN: ${RASA_TOKEN} RASA_MODEL_PULL_INTERVAL: 10 RABBITMQ_QUEUE: “rasa_production_events”

x-rasa-services: &default-rasa-service restart: always image: “rasa/rasa:${RASA_VERSION}-full” expose: - “5005” command: > x –no-prompt –production –config-endpoint http://rasa-x:5002/api/config?token=${RASA_X_TOKEN} –port 5005 –jwt-method HS256 –jwt-secret ${JWT_SECRET} –auth-token ‘${RASA_TOKEN}’ –cors “*” depends_on: - rasa-x - rabbit - redis

services: rasa-x: restart: always image: “rasa/rasa-x:${RASA_X_VERSION}” expose: - “5002” volumes: - ./models:/app/models - ./environments.yml:/app/environments.yml - ./credentials.yml:/app/credentials.yml - ./endpoints.yml:/app/endpoints.yml - ./logs:/logs - ./auth:/app/auth environment: <<: *database-credentials <<: *rasa-credentials SELF_PORT: “5002” DB_DATABASE: “${DB_DATABASE:-rasa}” RASA_MODEL_DIR: “/app/models” PASSWORD_SALT: ${PASSWORD_SALT} RABBITMQ_QUEUE: “rasa_production_events” RASA_X_USER_ANALYTICS: “0” SANIC_RESPONSE_TIMEOUT: “3600” depends_on: - db

rasa-production: <<: *default-rasa-service environment: <<: *rasa-credentials RASA_ENVIRONMENT: “production” DB_DATABASE: “tracker” RASA_MODEL_SERVER: “http://rasa-x:5002/api/projects/default/models/tags/production

rasa-worker: <<: *default-rasa-service environment: <<: *rasa-credentials RASA_ENVIRONMENT: “worker” DB_DATABASE: “worker_tracker” RASA_MODEL_SERVER: “http://rasa-x:5002/api/projects/default/models/tags/production

app: restart: always image: “rasa/rasa-x-demo:${RASA_X_DEMO_VERSION}” expose: - “5055” depends_on: - rasa-production

db: restart: always image: “mysql” command: --default-authentication-plugin=mysql_native_password environment: MYSQL_USER: root MYSQL_ROOT_PASSWORD: abc.123 MYSQL_DATABASE: rasa volumes: - ./db:/var/lib/mysql ports: - ‘3309:3306’ rabbit: restart: always image: “bitnami/rabbitmq:3.8.3” environment: RABBITMQ_HOST: “rabbit” RABBITMQ_USERNAME: “user” RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD} RABBITMQ_DISK_FREE_LIMIT: “{mem_relative, 0.1}” expose: - “5672”

duckling: restart: always image: “rasa/duckling:0.1.6.3” expose: - “8000” command: [“duckling-example-exe”, “–no-access-log”, “–no-error-log”]

nginx: restart: always image: “rasa/nginx:${RASA_X_VERSION}” ports: - “80:8080” - “443:8443” volumes: - ./certs:/opt/bitnami/certs - ./terms:/opt/bitnami/nginx/conf/bitnami/terms depends_on: - rasa-x - rasa-production - app

redis: restart: always image: “bitnami/redis:5.0.8” environment: REDIS_PASSWORD: ${REDIS_PASSWORD} expose: - “6379”]

Hi,

It’s kinda hard to read your text without any formatting. You can also upload the file directly via the forum interface.

It seems to me that you inverted admin and me in the command and don’t forget to put a password.

The command is as follows:

sudo python rasa_x_commands.py create --update admin me <YOUR_PASSWORD>

@JosephCHS I have wrote this command and set the password but it still says:

@jehanzaib12 after the python command I’ve got the following message:

INFO:__main__:Created user.

And I reach the Rasa X GUI through the default port 80 not 5002 like you. I don’t know how you set up Rasa X, but I’ve been through the manual install with docker compose.

Can you share me your docker compose file?

I used the one that you can get here:

wget -qO docker-compose.yml https://storage.googleapis.com/rasa-x-releases/0.31.0/docker-compose.ce.yml
 version: "3.4"

x-database-credentials: &database-credentials
  DB_HOST: "db"
  DB_PORT: "5432"
  DB_USER: "${DB_USER:-admin}"
  DB_PASSWORD: "${DB_PASSWORD}"
  DB_LOGIN_DB: "${DB_LOGIN_DB:-rasa}"

x-rabbitmq-credentials: &rabbitmq-credentials
  RABBITMQ_HOST: "rabbit"
  RABBITMQ_USERNAME: "user"
  RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD}

x-redis-credentials: &redis-credentials
  REDIS_HOST: "redis"
  REDIS_PORT: "6379"
  REDIS_PASSWORD: ${REDIS_PASSWORD}
  REDIS_DB: "1"

x-duckling-credentials: &duckling-credentials
  RASA_DUCKLING_HTTP_URL: "http://duckling:8000"

x-rasax-credentials: &rasax-credentials
  RASA_X_HOST: "http://rasa-x:5002"
  RASA_X_USERNAME: ${RASA_X_USERNAME:-admin}
  RASA_X_PASSWORD: ${RASA_X_PASSWORD:-}
  RASA_X_TOKEN: ${RASA_X_TOKEN}
  JWT_SECRET: ${JWT_SECRET}
  RASA_USER_APP: "http://app:5055"
  RASA_PRODUCTION_HOST: "http://rasa-production:5005"
  RASA_WORKER_HOST: "http://rasa-worker:5005"
  RASA_TOKEN: ${RASA_TOKEN}

x-rasa-credentials: &rasa-credentials
  <<: *rabbitmq-credentials
  <<: *rasax-credentials
  <<: *database-credentials
  <<: *redis-credentials
  <<: *duckling-credentials
  RASA_TOKEN: ${RASA_TOKEN}
  RASA_MODEL_PULL_INTERVAL: 10
  RABBITMQ_QUEUE: "rasa_production_events"

x-rasa-services: &default-rasa-service
  restart: always
  image: "rasa/rasa:${RASA_VERSION}-full"
  expose:
    - "5005"
  command: >
    x
    --no-prompt
    --production
    --config-endpoint http://rasa-x:5002/api/config?token=${RASA_X_TOKEN}
    --port 5005
    --jwt-method HS256
    --jwt-secret ${JWT_SECRET}
    --auth-token '${RASA_TOKEN}'
    --cors "*"
  depends_on:
    - rasa-x
    - rabbit
    - redis

services:
  rasa-x:
    restart: always
    image: "rasa/rasa-x:0.25.2"
    expose:
      - "5002"
    ports:
      - "5002:5002"
    volumes:
      - ./models:/app/models
      - ./environments.yml:/app/environments.yml
      - ./credentials.yml:/app/credentials.yml
      - ./endpoints.yml:/app/endpoints.yml
      - ./logs:/logs
      - ./auth:/app/auth
    environment:
      <<: *database-credentials
      <<: *rasa-credentials
      SELF_PORT: "5002"
      DB_DATABASE: "${DB_DATABASE:-rasa}"
      RASA_MODEL_DIR: "/app/models"
      PASSWORD_SALT: ${PASSWORD_SALT}
      RABBITMQ_QUEUE: "rasa_production_events"
      RASA_X_USER_ANALYTICS: "0"
      SANIC_RESPONSE_TIMEOUT: "3600"
    depends_on:
      - db

  rasa-production:
    <<: *default-rasa-service
    environment:
      <<: *rasa-credentials
      RASA_ENVIRONMENT: "production"
      DB_DATABASE: "tracker"
      RASA_MODEL_SERVER: "http://rasa-x:5002/api/projects/default/models/tags/production"

  rasa-worker:
    <<: *default-rasa-service
    environment:
      <<: *rasa-credentials
      RASA_ENVIRONMENT: "worker"
      DB_DATABASE: "worker_tracker"
      RASA_MODEL_SERVER: "http://rasa-x:5002/api/projects/default/models/tags/production"

  app:
    restart: always
    image: "rasa/rasa-x-demo:${RASA_X_DEMO_VERSION}"
    expose:
      - "5055"
    depends_on:
      - rasa-production

  db:
    restart: always
    image: mysql:5.7
    expose:
      - 3306
    environment:
      MYSQL_USER: root
      MYSQL_ROOT_PASSWORD: abc.123
      MYSQL_DATABASE: rasa
      MYSQL_PASSWORD: abc.123
    volumes:
      - ./db:/var/lib/mysql

  rabbit:
    restart: always
    image: "bitnami/rabbitmq:3.8.3"
    environment:
      RABBITMQ_HOST: "rabbit"
      RABBITMQ_USERNAME: "user"
      RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD}
      RABBITMQ_DISK_FREE_LIMIT: "{mem_relative, 0.1}"
    expose:
      - "5672"

  duckling:
    restart: always
    image: "rasa/duckling:0.1.6.3"
    expose:
      - "8000"
    command: ["duckling-example-exe", "--no-access-log", "--no-error-log"]

  nginx:
    restart: always
    image: "rasa/nginx:${RASA_X_VERSION}"
    ports:
      - "80:8080"
      - "443:8443"
    volumes:
      - ./certs:/opt/bitnami/certs
      - ./terms:/opt/bitnami/nginx/conf/bitnami/terms
    depends_on:
      - rasa-x
      - rasa-production
      - app

  redis:
    restart: always
    image: "bitnami/redis:5.0.8"
    environment:
      REDIS_PASSWORD: ${REDIS_PASSWORD}
    expose:
      - "6379"

@JosephCHS This is my docker file, can you check what is the error?

I saw some differences with mine:

  • your db is mysql and you don’t use environment variable
  • your rasa-x version is hard coded
  • and in the rasa x service you do:
ports :
  - "5002:5002"

It reminds me the way you reach rasa-x by specifying port 5002.
In your rasa-x service, you can try to remove this:

ports :
  - "5002:5002"

And be carefull with the compatibility matrix. RASA_VERSION may not be compatible with your rasa-x 0.25.2.

Where should i change my rasa_version in docker compose?

The docker-composer should not be modified, because it can be updated by Rasa and your modifications will be lost.
You should use the environment variables in .env to modify/update the version of rasa, rasa-x, …
And overwrite your docker-compose.yml with docker-compose.override.yml.

@JosephCHS Thankyou for your help. I have login in successfully. As I am accessing the Rasa x, now the model is not training in rasa x platform as I click on train model. Can you help me in this matter?

You can use docker-compose up without the flag -d. The logs will give you some clues to fix your problem.

it says this:

rasa-x_1           | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: Connection refused
rasa-x_1           |    Is the server running on host "db" (172.24.0.4) and accepting
rasa-x_1           |    TCP/IP connections on port 5432?
rasa-x_1           |
rasa-x_1           | (Background on this error at: http://sqlalche.me/e/13/e3q8)

any help would be very much appreciated @JosephCHS sir?

I’m not very familiar with your problem but when I was reading your old docker-compose I saw:

x-database-credentials: &database-credentials
  DB_HOST: "db"
  DB_PORT: "5432"
  DB_USER: "${DB_USER:-admin}"
  DB_PASSWORD: "${DB_PASSWORD}"
  DB_LOGIN_DB: "${DB_LOGIN_DB:-rasa}"

And

  db:
    restart: always
    image: mysql:5.7
    expose:
      - 3306
    environment:
      MYSQL_USER: root
      MYSQL_ROOT_PASSWORD: abc.123
      MYSQL_DATABASE: rasa
      MYSQL_PASSWORD: abc.123
    volumes:
      - ./db:/var/lib/mysql

If rasa needs to connect to the db mysql, I’ll make sure the credentials information matches.