Unable to create admin user

Hi Folks,

I’m running into an issue trying to install maas 3.2 (using snap) on an Ubuntu 20.04 LTS host.

I have it currently configured to use Vultr’s PostgreSQL database and was able to successfully run: sudo maas init region+rack --database-uri <db_uri>

But I run into a strange error when trying to create an admin user:

$ sudo maas createadmin
usage: maas [-h] COMMAND ...

optional arguments:
  -h, --help      show this help message and exit

drill down:
  COMMAND
    login         Log in to a remote API, and remember its description and credentials.
    logout        Log out of a remote API, purging any stored credentials.
    list          List remote APIs that have been logged-in to.
    refresh       Refresh the API descriptions of all profiles.
    init          Initialise MAAS in the specified run mode.
    config        View or change controller configuration.
    status        Status of controller services.
    migrate       Perform migrations on connected database.
    apikey        Used to manage a user's API keys. Shows existing keys unless --generate or --delete is passed.
    configauth    Configure external authentication.
    config-tls    Configure MAAS Region TLS.
    createadmin   Create a MAAS administrator account.
    changepassword
                  Change a MAAS user's password.

https://maas.io/

FATAL:  remaining connection slots are reserved for non-replication superuser connections

It looks like a PostgreSQL error, but I’m able to access the database just fine and there are 22 available backend server connections (maas is the only app connecting to this database).

Hi @vyas-n

Can you please check the value of max_connections in postgresql.conf?
I’m also wondering how many connections you do already have, you can discover it with SELECT * FROM pg_stat_activity;

Hi Troy,

Sorry for the large delay, it turns out that I had a problem with the database itself. After reprovisioning the database, uninstalling maas, and reinstalling maas it was able to be setup successfully.

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