rabbit_1 | 2019-08-23 09:31:07.827 [info] <0.8.0> Server startup complete; 3 plugins started.
rabbit_1 | * rabbitmq_management
rabbit_1 | * rabbitmq_web_dispatch
rabbit_1 | * rabbitmq_management_agent
rasa-x_1 | WARNING:rasax.community.services.model_service:Could not run model discovery.
rasa-x_1 | Starting Rasa X server... ๐
rasa-x_1 | Caught an exception while consuming events. Will retry in 5s
rasa-x_1 | Traceback (most recent call last):
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/rasax/community/services/event_service.py", line 989, in continuously_consume
rasa-x_1 | queue=config.rabbitmq_queue,
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/rasax/community/services/event_service.py", line 912, in __init__
rasa-x_1 | connection = pika.BlockingConnection(parameters)
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/pika/adapters/blocking_connection.py", line 360, in __init__
rasa-x_1 | self._impl = self._create_connection(parameters, _impl_class)
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/pika/adapters/blocking_connection.py", line 451, in _create_connection
rasa-x_1 | raise self._reap_last_connection_workflow_error(error)
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/pika/adapters/utils/selector_ioloop_adapter.py", line 564, in _resolve
rasa-x_1 | self._flags)
rasa-x_1 | File "/usr/local/lib/python3.6/socket.py", line 745, in getaddrinfo
rasa-x_1 | for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
rasa-x_1 | socket.gaierror: [Errno -5] No address associated with hostname
โ Things to Note:
-
I am working on a CentOS machine and since there is no automated script for it, I am trying to manually install Rasa-X and deploy it through docker.
-
I have another project that is my action server and I have modified the docker-compose.yml file as shown below to work with that project and also I need it to use the hostโs PostgreSQL database for which I am adding network_mode as host.
-
Since I am using host mode, the worker and production images are both trying to run on 5005 which is not possible so I am running worker on 5006.
Challenges:
- No address associated with hostname thrown from the rasa-x container, probably some issue interfacing with the rabbitmq container.
- Could not run model discovery which is shown as a warning but the it takes 2-3 mins before that warning is shown so I am assuming it is trying to run for that time blocking the start of the Rasa X server.
version: "3.4"
x-database-credentials: &database-credentials
DB_HOST: "${DB_HOST}"
DB_PORT: "5432"
DB_USER: "${DB_USER}"
DB_PASSWORD: "${DB_PASSWORD}"
DB_LOGIN_DB: "${DB_LOGIN_DB}"
x-rabbitmq-credentials: &rabbitmq-credentials
RABBITMQ_HOST: "rabbit"
RABBITMQ_USERNAME: "user"
RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD}
x-rasax-credentials: &rasax-credentials
LOCAL_MODE: "false"
RASA_X_HOST: "http://rasa-x:5002"
RASA_X_TOKEN: ${RASA_X_TOKEN}
JWT_SECRET: ${JWT_SECRET}
RASA_USER_APP: "http://app:5055"
RASA_WORKER_HOST: "http://rasa-worker:5006"
RASA_TOKEN: ${RASA_TOKEN}
RASA_WORKER_TOKEN: ${RASA_TOKEN}
x-rasa-credentials: &rasa-credentials
<<: *rabbitmq-credentials
<<: *rasax-credentials
<<: *database-credentials
RASA_TOKEN: ${RASA_TOKEN}
RASA_MODEL_PULL_INTERVAL: 10
x-rasa-services: &default-rasa-service
restart: always
image: "rasa/rasa:${RASA_VERSION}-full"
network_mode: host
volumes:
- ./credentials.yml:/app/credentials.yml
- ./endpoints.yml:/app/endpoints.yml
depends_on:
- rasa-x
- rabbit
services:
rasa-x:
restart: always
image: "rasa/rasa-x:${RASA_X_VERSION}"
network_mode: host
expose:
- "5002"
volumes:
- ./models:/app/models
- ./environments.yml:/app/environments.yml
- ./logs:/logs
- ./auth:/app/auth
environment:
<<: *database-credentials
<<: *rasa-credentials
SELF_PORT: "5002"
DB_DATABASE: "${DB_DATABASE}"
RASA_MODEL_DIR: "/app/models"
RABBITMQ_QUEUE: "${RABBITMQ_QUEUE}"
PASSWORD_SALT: ${PASSWORD_SALT}
RASA_X_USER_ANALYTICS: "0"
SANIC_RESPONSE_TIMEOUT: "3600"
rasa-production:
<<: *default-rasa-service
environment:
<<: *rasa-credentials
DB_DATABASE: "${DB_DATABASE}"
RABBITMQ_QUEUE: "${RABBITMQ_QUEUE}"
RASA_MODEL_SERVER: "http://rasa-x:5002/api/projects/default/models/tags/production"
command: >
x
--no-prompt
--production
--port 5005
--jwt-method HS256
--jwt-secret ${JWT_SECRET}
--auth-token '${RASA_TOKEN}'
--cors "*"
rasa-worker:
<<: *default-rasa-service
environment:
<<: *rasa-credentials
DB_DATABASE: "${DB_DATABASE}"
RABBITMQ_QUEUE: "rasa_worker_events"
RASA_MODEL_SERVER: "http://rasa-x:5002/api/projects/default/models/tags/production"
command: >
x
--no-prompt
--production
--port 5006
--jwt-method HS256
--jwt-secret ${JWT_SECRET}
--auth-token '${RASA_TOKEN}'
--cors "*"
app:
restart: always
image: "rasa_app:latest"
expose:
- "5055"
volumes:
- ${RASA_ACTIONS_SERVER}:/app
depends_on:
- rasa-production
rabbit:
restart: always
image: "bitnami/rabbitmq:3.7.17"
network_mode: host
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:latest"
expose:
- "8000"
command: ["duckling-example-exe", "--no-access-log", "--no-error-log"]
nginx:
restart: always
image: "rasa/nginx:${RASA_X_VERSION}"
ports:
- "89:8080"
# - "443:8443"
volumes:
- ./certs:/opt/bitnami/certs
- ./terms:/opt/bitnami/nginx/conf/bitnami/terms
depends_on:
- rasa-x
- rasa-production
- app
logger:
restart: always
image: "rasa/logger:${RASA_X_VERSION}"
command: ["/bin/sh", "-c", "docker-compose logs --no-color -f > /logs/compose_`date '+%Y-%m-%d_%H:%M:%S'`.log"]
volumes:
- ./logs:/logs
- ./.env/:${RASA_X_PATH}/.env
- ./docker-compose.yml:${RASA_X_PATH}/docker-compose.yml
- /var/run/docker.sock:/var/run/docker.sock
working_dir: ${RASA_X_PATH}
depends_on:
- rasa-x
- rasa-production
- app
- nginx
- duckling
- rabbit
In case you want detailed logs, attaching that as well.
compose_2019-08-23_09:30:57.log (25.1 KB)
Thanks in advance, any sort of insights will be appreciated.