Getting Error while running Rasa X on Docker

Hi, I have deployed Rasa X 0.19.0 CE on ubuntu 18.04 machine using this quick installation. whenever i start its services using docker-compose up -d i am getting following error.

rasa-production_1  | 2019-06-18 13:24:36 WARNING  rasa.core.tracker_store  - (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
rasa-production_1  | 
rasa-production_1  | (Background on this error at: http://sqlalche.me/e/e3q8)
rasa-x_1           | (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
rasa-x_1           | 
rasa-x_1           | (Background on this error at: http://sqlalche.me/e/e3q8)
rasa-worker_1      | 2019-06-18 13:24:36 WARNING  rasa.core.tracker_store  - (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
rasa-worker_1      | 
rasa-worker_1      | (Background on this error at: http://sqlalche.me/e/e3q8)
rasa-production_1  | 2019-06-18 13:24:41 WARNING  rasa.core.tracker_store  - (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
rasa-production_1  | 
rasa-production_1  | (Background on this error at: http://sqlalche.me/e/e3q8)
rasa-x_1           | (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
rasa-x_1           | 
rasa-x_1           | (Background on this error at: http://sqlalche.me/e/e3q8)
rasa-worker_1      | 2019-06-18 13:24:41 WARNING  rasa.core.tracker_store  - (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
rasa-worker_1      | 
rasa-worker_1      | (Background on this error at: http://sqlalche.me/e/e3q8)
rasa-worker_1      | 2019-06-18 13:24:46 WARNING  rasa.core.tracker_store  - (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
rasa-x_1           | (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
rasa-x_1           | 
rasa-x_1           | (Background on this error at: http://sqlalche.me/e/e3q8)
rasa-production_1  | 2019-06-18 13:24:46 WARNING  rasa.core.tracker_store  - (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
rasa-production_1  | 
rasa-production_1  | (Background on this error at: http://sqlalche.me/e/e3q8)
rasa-worker_1      | 
rasa-worker_1      | (Background on this error at: http://sqlalche.me/e/e3q8)

Seems like postgress error to me. How to solve this problem.

1 Like

Hi @feroze.chaudhry, we have since released two patch versions. It would be great if you could try this again using 0.19.2. You can update the version in your .env in the project directory (/etc/rasa).

I have updated the rasa x version but the issue is not resolved. The issue is in postgress image i suppose. Following are the logs after update.

rasa-x_1           |   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py",       line 114, in connect
rasa-x_1           |     return dialect.connect(*cargs, **cparams)
rasa-x_1           |   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 453, in connect
rasa-x_1           |     return self.dbapi.connect(*cargs, **cparams)  
rasa-x_1           |   File "/usr/local/lib/python3.6/site-packages/psycopg2/__init__.py", line 126, in connect
rasa-x_1           |     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
rasa-x_1           | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
rasa-x_1           |
rasa-x_1           | (Background on this error at: http://sqlalche.me/e/e3q8)
rasa-production_1  | 2019-06-19 07:29:25 WARNING  rasa.core.tracker_store  - (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
rasa-production_1  |
rasa-production_1  | (Background on this error at: http://sqlalche.me/e/e3q8)
rasa-worker_1      | 2019-06-19 07:29:25 WARNING  rasa.core.tracker_store  - (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
rasa-worker_1      |
rasa-worker_1      | (Background on this error at: http://sqlalche.me/e/e3q8)
rabbit_1           | 2019-06-19 07:29:25.082 [info] <0.782.0> accepting AMQP connection <0.782.0> (172.26.0.5:34920 -> 172.26.0.3:5672)
rabbit_1           | 2019-06-19 07:29:25.087 [info] <0.782.0> connection <0.782.0> (172.26.0.5:34920 -> 172.26.0.3:5672): user 'user' authenticated and granted access to vhost '/'
rabbit_1           | 2019-06-19 07:29:25.144 [warning] <0.782.0> closing AMQP connection <0.782.0> (172.26.0.5:34920 -> 172.26.0.3:5672, vhost: '/', user: 'user'):
rabbit_1           | client unexpectedly closed TCP connection
rasa_rasa-x_1 exited with code 1
db_1               |
db_1               | Welcome to the Bitnami postgresql container
db_1               | Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-postgresql
db_1               | Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-postgresql/issues
db_1               | Send us your feedback at containers@bitnami.com
db_1               |
db_1               | INFO  ==> ** Starting PostgreSQL setup **
db_1               | INFO  ==> Validating settings in POSTGRESQL_* env vars..
db_1               | INFO  ==> Initializing PostgreSQL database...
db_1               | INFO  ==> postgresql.conf file not detected. Generating it...
db_1               | INFO  ==> pg_hba.conf file not detected. Generating it...
db_1               | INFO  ==> Deploying PostgreSQL with persisted data...
db_1               | INFO  ==> Configuring replication parameters
db_1               | INFO  ==> Loading custom scripts...
db_1               | INFO  ==> Enabling remote connections
db_1               | INFO  ==> Stopping PostgreSQL...
db_1               | INFO  ==> ** PostgreSQL setup finished! **
db_1               |
db_1               | INFO  ==> ** Starting PostgreSQL **
db_1               | 2019-06-19 07:29:27.404 GMT [1] FATAL:  data directory "/bitnami/postgresql/data" has invalid permissions
db_1               | 2019-06-19 07:29:27.404 GMT [1] DETAIL:  Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
rasa_db_1 exited with code 1
rasa-worker_1      | 2019-06-19 07:29:30 WARNING  rasa.core.tracker_store  - (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
rasa-worker_1      |
rasa-worker_1      | (Background on this error at: http://sqlalche.me/e/e3q8)
rasa-production_1  | 2019-06-19 07:29:30 WARNING  rasa.core.tracker_store  - (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
rasa-production_1  |
rasa-production_1  | (Background on this error at: http://sqlalche.me/e/e3q8)

I am still waiting for the reply. Can you please look into it.

Have you got this working at all? I had trouble early on with docker and installed via pip instead, be sure to follow these steps,

curl -sSL -o install.sh https://storage.googleapis.com/rasa-x-releases/stable/install.sh

sudo bash ./install.sh

cd /etc/rasa

sudo docker-compose up -d

cd /etc/rasa

sudo python rasa_x_commands.py create --update admin me PASSWORD

create a password and swap with PASSWORD

Head over to domain or your IP and check it out. I was using Digital Ocean for this, just did it about an hour ago and had no problems. I installed with ‘stable’ instead of picking a version too, and it worked.

Fresh install on Ubuntu? update/upgrades?

I have freshly installed the it now the error seems to be gone but i cant be able to access rasa gui on browser. following are the logs

rasa-production_1  | 2019-06-20 12:14:37 DEBUG    rasa.core.agent  - Model server didn't find a model for our request. Probably no one did train a model for the project and tag combination yet.
rasa-production_1  | 2019-06-20 12:14:37 DEBUG    rasa.core.agent  - No new model found at URL http://rasa-x:5002/api/projects/default/models/tags/production
rasa-production_1  | 2019-06-20 12:14:47 DEBUG    rasa.core.agent  - Requesting model from server http://rasa-x:5002/api/projects/default/models/tags/production...
rasa-production_1  | 2019-06-20 12:14:47 DEBUG    rasa.core.agent  - Model server didn't find a model for our request. Probably no one did train a model for the project and tag combination yet.
rasa-production_1  | 2019-06-20 12:14:47 DEBUG    rasa.core.agent  - No new model found at URL http://rasa-x:5002/api/projects/default/models/tags/production

Can you please tell me what is the problem why i cant be able to access gui

1 Like

Its even not accessible from host machine getting connection refused.

curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://localhost:5002/login?username=me&password=12345678
[1] 13341
root@my-machine:/etc/rasa# curl: (7) Failed to connect to localhost port 5002: Connection refused
1 Like

I resolved the issue. Sorry i was trying to access the gui like we access gui when rasa-x is installed through pip http://localhost:5002/login. Actually we have to access the gui through nginx. The issue is resolved now

1 Like

Continuing the discussion from Getting Error while running Rasa X on Docker:

Hi, have you solved: No new model found at URL http://rasa-x:5002/api/projects/default/models/tags/production

I have the same error but I have trained a model in my project directory but have no idea on how to use this model in rasa x.

1 Like

I have the same problem, “Model server didn’t find a model for our request. Probably no one did train a model for the project and tag combination yet.” Can someone help in how to link rasa-x with an exisiting rasa proyect or even the rasa-x-demo one? thanks

2 Likes