title: Rasa x server keep restarting in Centos 8.2
body: <p>I want to deploy rasa-x on my linux machine. I have used docker-compose to deploy:
  Here is my docker-compose file:</p>
  <pre><code>version: &quot;3.4&quot;
  
  x-database-credentials: &amp;database-credentials
    DB_HOST: &quot;db&quot;
    DB_PORT: &quot;5432&quot;
    DB_USER: &quot;${DB_USER:-admin}&quot;
    DB_PASSWORD: &quot;${DB_PASSWORD}&quot;
    DB_LOGIN_DB: &quot;${DB_LOGIN_DB:-rasa}&quot;
  
  x-rabbitmq-credentials: &amp;rabbitmq-credentials
    RABBITMQ_HOST: &quot;rabbit&quot;
    RABBITMQ_USERNAME: &quot;user&quot;
    RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD}
  
  x-redis-credentials: &amp;redis-credentials
    REDIS_HOST: &quot;redis&quot;
    REDIS_PORT: &quot;6379&quot;
    REDIS_PASSWORD: ${REDIS_PASSWORD}
    REDIS_DB: &quot;1&quot;
  
  x-duckling-credentials: &amp;duckling-credentials
    RASA_DUCKLING_HTTP_URL: &quot;http://duckling:8000&quot;
  
  x-rasax-credentials: &amp;rasax-credentials
    RASA_X_HOST: &quot;http://rasa-x:5006&quot;
    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: &quot;http://app:5056&quot;
    RASA_PRODUCTION_HOST: &quot;http://rasa-production:5006&quot;
    RASA_WORKER_HOST: &quot;http://rasa-worker:5006&quot;
    RASA_TOKEN: ${RASA_TOKEN}
  
  x-rasa-credentials: &amp;rasa-credentials
    &lt;&lt;: *rabbitmq-credentials
    &lt;&lt;: *rasax-credentials
    &lt;&lt;: *database-credentials
    &lt;&lt;: *redis-credentials
    &lt;&lt;: *duckling-credentials
    RASA_TOKEN: ${RASA_TOKEN}
    RASA_MODEL_PULL_INTERVAL: 10
    RABBITMQ_QUEUE: &quot;rasa_production_events&quot;
  
  x-rasa-services: &amp;default-rasa-service
    restart: always
    image: &quot;rasa/rasa:${RASA_VERSION}-full&quot;
    expose:
      - &quot;5006&quot;
    command: &gt;
      x
      --no-prompt
      --production
      --config-endpoint http://rasa-x:5006/api/config?token=${RASA_X_TOKEN}
      --port 5006
      --jwt-method HS256
      --jwt-secret ${JWT_SECRET}
      --auth-token '${RASA_TOKEN}'
      --cors &quot;*&quot;
    depends_on:
      - rasa-x
      - rabbit
      - redis
  
  services:
    rasa-x:
      restart: on-failure
      image: &quot;rasa/rasa-x:${RASA_X_VERSION}&quot;
      ports:
        - &quot;5006:5006&quot;
      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:
        &lt;&lt;: *database-credentials
        &lt;&lt;: *rasa-credentials
        SELF_PORT: &quot;5006&quot;
        DB_DATABASE: &quot;${DB_DATABASE:-rasa}&quot;
        RASA_MODEL_DIR: &quot;/app/models&quot;
        PASSWORD_SALT: ${PASSWORD_SALT}
        RABBITMQ_QUEUE: &quot;rasa_production_events&quot;
        RASA_X_USER_ANALYTICS: &quot;0&quot;
        SANIC_RESPONSE_TIMEOUT: &quot;3600&quot;
      depends_on:
        - db
  
    rasa-production:
      &lt;&lt;: *default-rasa-service
      environment:
        &lt;&lt;: *rasa-credentials
        RASA_ENVIRONMENT: &quot;production&quot;
        DB_DATABASE: &quot;tracker&quot;
        RASA_MODEL_SERVER: &quot;http://rasa-x:5006/api/projects/default/models/tags/production&quot;
  
    rasa-worker:
      &lt;&lt;: *default-rasa-service
      environment:
        &lt;&lt;: *rasa-credentials
        RASA_ENVIRONMENT: &quot;worker&quot;
        DB_DATABASE: &quot;worker_tracker&quot;
        RASA_MODEL_SERVER: &quot;http://rasa-x:5006/api/projects/default/models/tags/production&quot;
  
    app:
      restart: always
      image: &quot;rasa/rasa-x-demo:${RASA_X_DEMO_VERSION}&quot;
      expose:
        - &quot;5056&quot;
      depends_on:
        - rasa-production
  
    db:
      restart: on-failure
      image: &quot;bitnami/postgresql:11.7.0&quot;
      user: '1005'
      expose:
        - &quot;5432&quot;   
      environment:
        POSTGRESQL_USERNAME: &quot;${DB_USER:-admin}&quot;
        POSTGRESQL_PASSWORD: &quot;${DB_PASSWORD}&quot;
        POSTGRESQL_DATABASE: &quot;${DB_DATABASE:-rasa}&quot;
      volumes:
        - ./db:/bitnami/postgresql
  
    rabbit:
      restart: always
      image: &quot;bitnami/rabbitmq:3.8.3&quot;
      environment:
        RABBITMQ_HOST: &quot;rabbit&quot;
        RABBITMQ_USERNAME: &quot;user&quot;
        RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD}
        RABBITMQ_DISK_FREE_LIMIT: &quot;{mem_relative, 0.1}&quot;
      expose:
        - &quot;5672&quot;
  
    duckling:
      restart: always
      image: &quot;rasa/duckling:0.1.6.3&quot;
      expose:
        - &quot;8000&quot;
      command: [&quot;duckling-example-exe&quot;, &quot;--no-access-log&quot;, &quot;--no-error-log&quot;]
  
    nginx:
      restart: always
      image: &quot;rasa/nginx:${RASA_X_VERSION}&quot;
      ports:
        - &quot;8080:8080&quot;
        - &quot;443:8443&quot;
      volumes:
        - ./certs:/opt/bitnami/certs
        - ./terms:/opt/bitnami/nginx/conf/bitnami/terms
      depends_on:
        - rasa-x
        - rasa-production
        - app
  
    redis:
      restart: always
      image: &quot;bitnami/redis:5.0.8&quot;
      environment:
        REDIS_PASSWORD: ${REDIS_PASSWORD}
      expose:
        - &quot;6379&quot;
  </code></pre>
  <p>This is the logs of db:</p>
  <pre><code>             | postgresql 12:36:50.30 Welcome to the Bitnami postgresql container
  db_1               | postgresql 12:36:50.30 Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-postgresql
  db_1               | postgresql 12:36:50.31 Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-postgresql/issues
  db_1               | postgresql 12:36:50.31 
  db_1               | postgresql 12:36:50.85 INFO  ==&gt; ** Starting PostgreSQL setup **
  db_1               | postgresql 12:36:51.75 INFO  ==&gt; Validating settings in POSTGRESQL_* env vars..
  db_1               | postgresql 12:36:51.76 INFO  ==&gt; Loading custom pre-init scripts...
  db_1               | postgresql 12:36:51.99 INFO  ==&gt; Initializing PostgreSQL database...
  db_1               | postgresql 12:36:52.37 INFO  ==&gt; postgresql.conf file not detected. Generating it...
  db_1               | postgresql 12:36:52.55 INFO  ==&gt; pg_hba.conf file not detected. Generating it...
  db_1               | postgresql 12:36:52.60 INFO  ==&gt; Generating local authentication configuration
  db_1               | postgresql 12:37:13.50 INFO  ==&gt; Starting PostgreSQL in background...
  db_1               | postgresql 12:37:17.77 INFO  ==&gt; Creating user admin
  db_1               | postgresql 12:37:17.87 INFO  ==&gt; Granting access to &quot;admin&quot; to the database &quot;rasa&quot;
  db_1               | postgresql 12:37:18.25 INFO  ==&gt; Configuring replication parameters
  db_1               | postgresql 12:37:18.43 INFO  ==&gt; Configuring fsync
  db_1               | postgresql 12:37:18.49 INFO  ==&gt; Loading custom scripts...
  db_1               | postgresql 12:37:18.53 INFO  ==&gt; Enabling remote connections
  db_1               | postgresql 12:37:18.62 INFO  ==&gt; Stopping PostgreSQL...
  db_1               | postgresql 12:37:19.87 INFO  ==&gt; ** PostgreSQL setup finished! **
  db_1               | 
  db_1               | postgresql 12:37:22.12 INFO  ==&gt; ** Starting PostgreSQL **
  db_1               | 2020-09-03 12:37:22.716 GMT [1] LOG:  listening on IPv4 address &quot;0.0.0.0&quot;, port 5432
  db_1               | 2020-09-03 12:37:22.717 GMT [1] LOG:  listening on IPv6 address &quot;::&quot;, port 5432
  db_1               | 2020-09-03 12:37:22.733 GMT [1] LOG:  listening on Unix socket &quot;/tmp/.s.PGSQL.5432&quot;
  db_1               | 2020-09-03 12:37:22.805 GMT [211] LOG:  database system was shut down at 2020-09-03 12:37:18 GMT
  db_1               | 2020-09-03 12:37:22.828 GMT [1] LOG:  database system is ready to accept connections
  </code></pre>
  <ul>
  <li>The db is connected</li>
  </ul>
  <p>This is the logs of rasa-x:</p>
  <pre><code>asa-x_1           | Traceback (most recent call last):
  rasa-x_1           |   File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py&quot;, line 2339, in _wrap_pool_connect
  rasa-x_1           |     return fn()
  rasa-x_1           |   File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy/pool/base.py&quot;, line 304, in unique_connection
  rasa-x_1           |     return _ConnectionFairy._checkout(self)
  rasa-x_1           |   File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy/pool/base.py&quot;, line 778, in _checkout
  rasa-x_1           |     fairy = _ConnectionRecord.checkout(pool)
  rasa-x_1           |   File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy/pool/base.py&quot;, line 495, in checkout
  rasa-x_1           |     rec = pool._do_get()
  rasa-x_1           |   File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy/pool/impl.py&quot;, line 140, in _do_get
  rasa-x_1           |     self._dec_overflow()
  rasa-x_1           |   File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py&quot;, line 69, in __exit__
  rasa-x_1           |     exc_value, with_traceback=exc_tb,
  rasa-x_1           |   File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py&quot;, line 178, in raise_
  rasa-x_1           |     raise exception
  rasa-x_1           |   File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy/pool/impl.py&quot;, line 137, in _do_get
  rasa-x_1           |     return self._create_connection()
  rasa-x_1           |   File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy/pool/base.py&quot;, line 309, in _create_connection
  rasa-x_1           |     return _ConnectionRecord(self)
  rasa-x_1           |   File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy/pool/base.py&quot;, line 440, in __init__
  rasa-x_1           |     self.__connect(first_connect_check=True)
  rasa-x_1           |   File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy/pool/base.py&quot;, line 661, in __connect
  rasa-x_1           |     pool.logger.debug(&quot;Error on connect(): %s&quot;, e)
  rasa-x_1           |   File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py&quot;, line 69, in __exit__
  rasa-x_1           |     exc_value, with_traceback=exc_tb,
  rasa-x_1           |   File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py&quot;, line 178, in raise_
  rasa-x_1           |     raise exception
  rasa-x_1           |   File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy/pool/base.py&quot;, line 656, in __connect
  rasa-x_1           |     connection = pool._invoke_creator(self)
  rasa-x_1           |   File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/strategies.py&quot;, line 114, in connect
  rasa-x_1           |     return dialect.connect(*cargs, **cparams)
  rasa-x_1           |   File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py&quot;, line 493, in connect
  rasa-x_1           |     return self.dbapi.connect(*cargs, **cparams)
  rasa-x_1           |   File &quot;/usr/local/lib/python3.7/site-packages/psycopg2/__init__.py&quot;, line 127, in connect
  rasa-x_1           |     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
  rasa-x_1           | psycopg2.OperationalError: could not connect to server: No route to host
  rasa-x_1           |    Is the server running on host &quot;db&quot; (172.18.0.5) and accepting
  rasa-x_1           |    TCP/IP connections on port 5432?
  rasa-x_1           | 
  </code></pre>
  <p>Any help would be very very appreciated.
  Rasa x server keep restarting, I dont know the exact issues.
  I am using CentOS 8 as If i run this docker-compose on windows it run fine.</p>