Rasa X docker container restarting loop

i’m not quite sure what’s the issue here , i followed the steps in docker compose manual install , but for some reason rasa x container continues to restart infinitely … running rasa 1.9.5 and rasa x 0.27.3 , python 3.7.6. Log in Docker Desktop :

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py”, line 437, in init

self.__connect(first_connect_check=True)

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py”, line 657, in __connect

pool.logger.debug(“Error on connect(): %s”, e)

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py”, line 69, in exit

exc_value, with_traceback=exc_tb,

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/util/compat.py”, line 178, in raise_

raise exception

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py”, line 652, in __connect

connection = pool._invoke_creator(self)

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py”, line 114, in connect

return dialect.connect(*cargs, **cparams)

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py”, line 488, in connect

return self.dbapi.connect(*cargs, **cparams)

File “/usr/local/lib/python3.6/site-packages/psycopg2/init.py”, line 126, in connect

conn = _connect(dsn, connection_factory=connection_factory, **kwasync)

psycopg2.OperationalError: FATAL: password authentication failed for user “admin”

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File “/usr/local/lib/python3.6/runpy.py”, line 193, in _run_module_as_main

main”, mod_spec)

File “/usr/local/lib/python3.6/runpy.py”, line 85, in _run_code

exec(code, run_globals)

File “/usr/local/lib/python3.6/site-packages/rasax/community/server.py”, line 104, in

main()

File “/usr/local/lib/python3.6/site-packages/rasax/community/server.py”, line 30, in main

sql_migrations.run_migrations(session)

File “/usr/local/lib/python3.6/site-packages/rasax/community/sql_migrations.py”, line 25, in run_migrations

_run_schema_migrations(session)

File “/usr/local/lib/python3.6/site-packages/rasax/community/sql_migrations.py”, line 41, in _run_schema_migrations

_run_alembic_migration(alembic_config)

File “/usr/local/lib/python3.6/site-packages/rasax/community/sql_migrations.py”, line 65, in _run_alembic_migration

command.upgrade(alembic_config, target_revision)

File “/usr/local/lib/python3.6/site-packages/alembic/command.py”, line 298, in upgrade

script.run_env()

File “/usr/local/lib/python3.6/site-packages/alembic/script/base.py”, line 489, in run_env

util.load_python_file(self.dir, “env.py”)

File “/usr/local/lib/python3.6/site-packages/alembic/util/pyfiles.py”, line 98, in load_python_file

module = load_module_py(module_id, path)

File “/usr/local/lib/python3.6/site-packages/alembic/util/compat.py”, line 184, in load_module_py

spec.loader.exec_module(module)

File “”, line 678, in exec_module

File “”, line 219, in _call_with_frames_removed

File “/usr/local/lib/python3.6/site-packages/rasax/community/database/schema_migrations/alembic/env.py”, line 87, in

run_migrations_online()

File “/usr/local/lib/python3.6/site-packages/rasax/community/database/schema_migrations/alembic/env.py”, line 65, in run_migrations_online

with connectable.connect() as connection:

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py”, line 2218, in connect

return self._connection_cls(self, **kwargs)

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py”, line 103, in init

else engine.raw_connection()

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py”, line 2318, in raw_connection

self.pool.unique_connection, _connection

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py”, line 2289, in _wrap_pool_connect

e, dialect, self

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py”, line 1555, in _handle_dbapi_exception_noconnection

sqlalchemy_exception, with_traceback=exc_info[2], from_=e

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py”, line 2285, in _wrap_pool_connect

return fn()

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py”, line 303, in unique_connection

return _ConnectionFairy._checkout(self)

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py”, line 773, in _checkout

fairy = _ConnectionRecord.checkout(pool)

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py”, line 492, in checkout

rec = pool._do_get()

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/impl.py”, line 139, in _do_get

self._dec_overflow()

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/impl.py”, line 136, in _do_get

return self._create_connection()

File “/usr/local/lib/python3.6/site-packages/sqlalchemy/pool/base.py”, line 308, in _create_connection

sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: password authentication failed for user “admin”

(Background on this error at: http://sqlalche.me/e/e3q8)

Hi @pandaxar, what OS are you on?

win 10 64x

Hi.

Have a look at the pinned topic in this forum; I’ve written a faster install script that should get you up and running quickly.

I did @ActuallyAcey , you did great Job , but unfortunatelly it doesn’t answer my issue , it has to do with rasa -x container , something is shutting down rasa x container as restart param is set to true , that’s why it keeps on restarting , but i have no idea what that error above indicates ?

@pandaxar is it possible you don’t have the correct password set for your SQL database? It seems like authentication is failing

@akelad what’s wrong here ? Logs.txt (7.6 KB) Just additional info about my issue , it runs great on my second pc (both are win 10), i did same setup encouraged by @ActuallyAcey , it did run on one , but on the other one it didn’t … The only diff between the two is that the one facing this issue is connected to a VPN , the other one is not … i’m losing my mind right now

@akelad i really have no words … i still can’t bring myself to comprehend this , the vpn was the problem … it somehow blocked the container from running , now it’s alright … but what’s the issue , i really have no clue

Hello @akelad, I’m having the exact same issue on Debian 10. Even stranger, I have already set up 2 rasa x instances on my server which are working fine, but the issue appears when I try to set up the third one. db logs for the first instance :

postgresql 12:22:45.56 INFO  ==> ** Starting PostgreSQL setup **
postgresql 12:22:45.76 INFO  ==> Validating settings in POSTGRESQL_* env vars..
postgresql 12:22:45.78 INFO  ==> Loading custom pre-init scripts...
postgresql 12:22:45.85 INFO  ==> Initializing PostgreSQL database...
postgresql 12:22:45.86 INFO  ==> Cleaning stale /bitnami/postgresql/data/postmaster.pid file
postgresql 12:22:45.94 INFO  ==> postgresql.conf file not detected. Generating it...
postgresql 12:22:46.00 INFO  ==> pg_hba.conf file not detected. Generating it...
postgresql 12:22:46.01 INFO  ==> Generating local authentication configuration
postgresql 12:22:46.03 INFO  ==> Deploying PostgreSQL with persisted data...
postgresql 12:22:46.05 INFO  ==> Configuring replication parameters
postgresql 12:22:46.14 INFO  ==> Configuring fsync
postgresql 12:22:46.16 INFO  ==> Loading custom scripts...
postgresql 12:22:46.17 INFO  ==> Enabling remote connections
postgresql 12:22:46.20 INFO  ==> Stopping PostgreSQL...

db logs for the second instance :

postgresql 13:50:38.26 INFO  ==> ** Starting PostgreSQL setup **
postgresql 13:50:38.51 INFO  ==> Validating settings in POSTGRESQL_* env vars..
postgresql 13:50:38.54 INFO  ==> Loading custom pre-init scripts...
postgresql 13:50:38.56 INFO  ==> Initializing PostgreSQL database...
postgresql 13:50:38.66 INFO  ==> postgresql.conf file not detected. Generating it...
postgresql 13:50:38.70 INFO  ==> pg_hba.conf file not detected. Generating it...
postgresql 13:50:38.71 INFO  ==> Generating local authentication configuration
postgresql 13:50:42.94 INFO  ==> Starting PostgreSQL in background...
postgresql 13:50:43.79 INFO  ==> Creating user admin
postgresql 13:50:43.84 INFO  ==> Granting access to "admin" to the database "rasa"
postgresql 13:50:43.90 INFO  ==> Configuring replication parameters
postgresql 13:50:43.95 INFO  ==> Configuring fsync
postgresql 13:50:43.97 INFO  ==> Loading custom scripts...
postgresql 13:50:43.99 INFO  ==> Enabling remote connections
postgresql 13:50:44.01 INFO  ==> Stopping PostgreSQL...
postgresql 13:50:45.04 INFO  ==> ** PostgreSQL setup finished! **

Notice the creation of the “admin” user

db logs for the third instance :

postgresql 09:40:06.24 INFO  ==> ** Starting PostgreSQL setup **
postgresql 09:40:06.44 INFO  ==> Validating settings in POSTGRESQL_* env vars..
postgresql 09:40:06.47 INFO  ==> Loading custom pre-init scripts...
postgresql 09:40:06.48 INFO  ==> Initializing PostgreSQL database...
postgresql 09:40:06.54 INFO  ==> postgresql.conf file not detected. Generating it...
postgresql 09:40:06.56 INFO  ==> pg_hba.conf file not detected. Generating it...
postgresql 09:40:06.57 INFO  ==> Generating local authentication configuration
postgresql 09:40:06.59 INFO  ==> Deploying PostgreSQL with persisted data...
postgresql 09:40:06.60 INFO  ==> Configuring replication parameters
postgresql 09:40:06.65 INFO  ==> Configuring fsync
postgresql 09:40:06.67 INFO  ==> Loading custom scripts...
postgresql 09:40:06.68 INFO  ==> Enabling remote connections
postgresql 09:40:06.71 INFO  ==> Stopping PostgreSQL...
postgresql 09:40:06.73 INFO  ==> ** PostgreSQL setup finished! **

postgresql 09:40:06.91 INFO  ==> ** Starting PostgreSQL **
2020-07-22 09:40:06.982 GMT [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2020-07-22 09:40:06.982 GMT [1] LOG:  listening on IPv6 address "::", port 5432
2020-07-22 09:40:07.039 GMT [1] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2020-07-22 09:40:07.071 GMT [164] LOG:  database system was shut down at 2020-07-22 09:19:19 GMT
2020-07-22 09:40:07.091 GMT [1] LOG:  database system is ready to accept connections
2020-07-22 09:40:11.901 GMT [171] FATAL:  password authentication failed for user "admin"
2020-07-22 09:40:11.901 GMT [171] DETAIL:  Password does not match for user "admin".
	Connection matched pg_hba.conf line 1: "host     all             all             0.0.0.0/0               md5"

So, no creation of an admin user at first, then creation for the second one, then no creation for the third and a failure to connect

The order may be explained by the fact that the first one uses uncommon ports (8080 and 8443) for nginx, while the second one uses standard ports. I should also mention that the first one was working before setting up the second one, so without creation of the admin user.

@pofenstein are you setting up three Rasa Xs on one VM? I don’t think that’s a good idea. With the error you’re seeing there it seems like you have a mismatch in the passwords you’ve defined in your environment variables