permission denied to create extension "pg_trg
(lemur) lemur@ubuntu-xenial:/www/lemur/lemur$ lemur init [2019-10-08 06:16:57,456] WARNING in managers: Plugin 'DigiCertCISIssuerPlugin' may not work correctly. Required variable 'DIGICERT_CIS_API_KEY' is not set in Lemur's conf. Plugin 'DigiCertCISIssuerPlugin' may not work correctly. Required variable 'DIGICERT_CIS_API_KEY' is not set in Lemur's conf. [2019-10-08 06:16:57,457] WARNING in managers: Plugin 'DigiCertCISSourcePlugin' may not work correctly. Required variable 'DIGICERT_CIS_API_KEY' is not set in Lemur's conf. Plugin 'DigiCertCISSourcePlugin' may not work correctly. Required variable 'DIGICERT_CIS_API_KEY' is not set in Lemur's conf. [2019-10-08 06:16:57,457] WARNING in managers: Plugin 'DigiCertIssuerPlugin' may not work correctly. Required variable 'DIGICERT_API_KEY' is not set in Lemur's conf. Plugin 'DigiCertIssuerPlugin' may not work correctly. Required variable 'DIGICERT_API_KEY' is not set in Lemur's conf. Traceback (most recent call last): File "/www/lemur/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1249, in _execute_context cursor, statement, parameters, context File "/www/lemur/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 552, in do_execute cursor.execute(statement, parameters) psycopg2.errors.InsufficientPrivilege: permission denied to create extension "pg_trgm" HINT: Must be superuser to create this extension.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/www/lemur/bin/lemur", line 11, in
[SQL: CREATE EXTENSION IF NOT EXISTS pg_trgm] (Background on this error at: http://sqlalche.me/e/f405) (lemur) lemur@ubuntu-xenial:/www/lemur/lemur$
FIX: Adding Superuser role to lemur user and run init again. postgres=# \du List of roles Role name | Attributes | Member of -----------+------------------------------------------------------------+----------- lemur | | {} postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
postgres=# alter role lemur createrole SuperUser; ALTER ROLE postgres=# \du List of roles Role name | Attributes | Member of -----------+------------------------------------------------------------+----------- lemur | Superuser, Create role | {} postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
postgres=#