Rasa Experimental Deployment Enviroment Not Working

Hi everyone. I installed Rasa x full from belowing link via docker compose. [Docker Compose Installation](https://Rasa x docker compose)

I want to create second worker which is experimental in this link https://rasa.com/docs/rasa-x/0.32.x/enterprise/deployment-environments

My docker-compose.yml file is 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"
  RASA_TELEMETRY_ENABLED: ${RASA_TELEMETRY_ENABLED:-true}

x-rasa-services: &default-rasa-service
  restart: always
  image: "rasa/rasa:${RASA_VERSION}-full"
  volumes:
      - ./.config:/.config
  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"
      RUN_DATABASE_MIGRATION_AS_SEPARATE_SERVICE: "true"
    depends_on:
      - db

  db-migration:
    command: ["python", "-m", "rasax.community.services.db_migration_service"]
    restart: always
    image: "rasa/rasa-x:${RASA_X_VERSION}"
    healthcheck:
      test: ["CMD-SHELL", "curl -f http://localhost:8000/health || kill 1"]
      interval: 5s
      timeout: 1s
      retries: 3
      start_period: 2s
    expose:
      - "8000"
    environment:
      <<: *database-credentials
      RUN_DATABASE_MIGRATION_AS_SEPARATE_SERVICE: "true"
   depends_on:
      - db

  rasa-production:
    <<: *default-rasa-service
    environment:
      <<: *rasa-credentials
      RASA_ENVIRONMENT: "production"
      DB_DATABASE: "tracker"
      MPLCONFIGDIR: "/tmp/.matplotlib"
      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"
      MPLCONFIGDIR: "/tmp/.matplotlib"
      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: "bitnami/postgresql:11.9.0"
    expose:
      - "5432"
    environment:
      POSTGRESQL_USERNAME: "${DB_USER:-admin}"
      POSTGRESQL_PASSWORD: "${DB_PASSWORD}"
      POSTGRESQL_DATABASE: "${DB_DATABASE:-rasa}"
    volumes:
      - ./db:/bitnami/postgresql

rabbit:
    restart: always
    image: "bitnami/rabbitmq:3.8.9"
    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.4"
    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:6.0.8"
    environment:
      REDIS_PASSWORD: ${REDIS_PASSWORD}
    expose:
      - "6379"

I create docker-compose.override.yml file. I changed DB_DATABASE: “rasa-experimental” as DB_DATABASE: “rasa_experimental”. Because it throws database create error(because of - character) 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"
  RASA_TELEMETRY_ENABLED: ${RASA_TELEMETRY_ENABLED:-true}

x-rasa-services: &default-rasa-service
  restart: always
  image: "rasa/rasa:${RASA_VERSION:-stable}-full"
  volumes:
      - ./.config:/.config
  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

services:
  rasa-experimental:
    <<: *default-rasa-service
    environment:
      <<: *rasa-credentials
      DB_DATABASE: "rasa_experimental"
      RASA_ENVIRONMENT: "experimental"
      RASA_MODEL_SERVER: "http://rasa-x:5002/projects/default/models/tags/experimental"

My **enviroments.yml** file
rasa:
  production:
    url: ${RASA_PRODUCTION_HOST}
    token: ${RASA_TOKEN}
  worker:
    url: ${RASA_WORKER_HOST}
    token: ${RASA_TOKEN}
  experimental:
    url: http://rasa-experimental:5005
    token: ${RASA_TOKEN}

But i dont see development enviroment area in models screen and experimental option in ‘Talk to your bot’.(In Deployment Environments link it shows)

My experimental container log has error. Maybe cause is this.

2021-01-12 11:18:25 ERROR    rasa.core.agent  - Failed to update model. The previous model will stay loaded instead.
Traceback (most recent call last):
  File "/opt/venv/lib/python3.7/site-packages/rasa/utils/io.py", line 89, in unarchive
    tar = tarfile.open(fileobj=IOReader(byte_array))
  File "/usr/local/lib/python3.7/tarfile.py", line 1580, in open
    raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/venv/lib/python3.7/site-packages/rasa/core/agent.py", line 155, in _update_model_from_server
    model_server, agent.fingerprint, model_directory
  File "/opt/venv/lib/python3.7/site-packages/rasa/core/agent.py", line 227, in _pull_model_and_fingerprint
    rasa.utils.io.unarchive(await resp.read(), model_directory)
  File "/opt/venv/lib/python3.7/site-packages/rasa/utils/io.py", line 94, in unarchive
    zip_ref = zipfile.ZipFile(IOReader(byte_array))
  File "/usr/local/lib/python3.7/zipfile.py", line 1258, in __init__
    self._RealGetContents()
  File "/usr/local/lib/python3.7/zipfile.py", line 1325, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
2021-01-12 11:18:36 ERROR    rasa.core.agent  - Failed to update model. The previous model will stay loaded instead.
Traceback (most recent call last):
  File "/opt/venv/lib/python3.7/site-packages/rasa/utils/io.py", line 89, in unarchive
    tar = tarfile.open(fileobj=IOReader(byte_array))
  File "/usr/local/lib/python3.7/tarfile.py", line 1580, in open
    raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/venv/lib/python3.7/site-packages/rasa/core/agent.py", line 155, in _update_model_from_server
    model_server, agent.fingerprint, model_directory
  File "/opt/venv/lib/python3.7/site-packages/rasa/core/agent.py", line 227, in _pull_model_and_fingerprint
    rasa.utils.io.unarchive(await resp.read(), model_directory)
  File "/opt/venv/lib/python3.7/site-packages/rasa/utils/io.py", line 94, in unarchive
    zip_ref = zipfile.ZipFile(IOReader(byte_array))
  File "/usr/local/lib/python3.7/zipfile.py", line 1258, in __init__
    self._RealGetContents()
  File "/usr/local/lib/python3.7/zipfile.py", line 1325, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

What is the problem for me?

Rasa X doesn’t support this feature. The feature is referred to as Deployment Environment and it is supported in the Rasa Enterprise version.

You can use the Contact Sales form if you’d like someone to get in touch with you about it.

Ok I understood thank you so much