Can't run MAAS init using a remote postgresql db. Returns "event not found"

I installed MAAS 3.4 on Ubuntu 22.04 and have a remote Postgresql 14 server. When I try to run maas init I get this error:

sudo maas init region+rack --database-uri "postgres://maas:password@192.168.x.x/maas_db"
bash: !@192.168.x.x/maas_db: event not found

I installed the Postgresql 14 client on the MAAS machine and it successfully connects to the remote Postgresql DB.

psql -h 192.168.x.x -p 5432 -U maas maas_db

The maas_db is empty. I presumed that maas init would create the schema in the remote database. I’ve Googled “maas init remote postgresql db event not found” but found nothing useful.

Do I need to install a MAAS component on the remote Postgresql server?

Hi @SteveMitchell

My guess is that your password contains chars that are not valid for a postgres connection string. Which means that you need to encode them.

Try a different password or encode it with for example

1 Like

Hi @SteveMitchell

It seems like your password contains ! and bash is trying to expand.
Can you please try single quotes for DSN instead of double quotes?
E.g. sudo maas init region+rack --database-uri 'postgres://maas:password@192.168.x.x/maas_db'

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.