Provision Azure Database for Postgresql Flexible Server instance
Create DB webui
REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON DATABASE webui FROM PUBLIC;
CREATE EXTENSION IF NOT EXISTS vector;
Create new DB user
Using administrator, assign user permissions similar to:
GRANT CONNECT, TEMPORARY ON DATABASE webui TO <user>;
GRANT USAGE, CREATE ON SCHEMA public TO <user>;
GRANT ALL ON ALL TABLES IN SCHEMA public TO <user>;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO <user>;
Configure & startup Open WebUI
Init fails
Logs & Screenshots
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.InsufficientPrivilege) Only members of "azure_pg_admin" are allowed to use CREATE EXTENSION
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1983, in _exec_single_context
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1416, in execute
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2260, in _execute_internal
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1638, in _execute_clauseelement
return self._execute_internal(
cursor.execute(statement, parameters)
self.dialect.do_execute(
ret = self._execute_context(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1964, in _exec_single_context
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
return connection._execute_clauseelement(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2352, in _handle_dbapi_exception
result = conn.execute(
(Background on this error at: https://sqlalche.me/e/20/f405)
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 516, in _execute_on_connection
^^^^^^^^^^^^^^^^^^^^^^^
return self._exec_single_context(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1843, in _execute_context
return meth(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 942, in do_execute
self._handle_dbapi_exception(
^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^
[SQL: CREATE EXTENSION IF NOT EXISTS vector;]
Container 'chat' was terminated with exit code '1' and reason 'ProcessExited'
INFO [open_webui.env] 'PDF_EXTRACT_IMAGES' loaded from the latest database entry
The above exception was the direct cause of the following exception:
INFO [open_webui.env] 'ENABLE_API_KEY_ENDPOINT_RESTRICTIONS' loaded from the latest database entry
File "", line 1147, in _find_and_load_unlocked
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1161, in call
INFO [open_webui.env] 'RAG_OPENAI_API_BASE_URL' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1983, in _exec_single_context
INFO [open_webui.env] 'ENABLE_ONEDRIVE_INTEGRATION' loaded from the latest database entry
INFO [open_webui.env] 'OLLAMA_API_CONFIGS' loaded from the latest database entry
INFO [open_webui.env] 'RAG_EMBEDDING_BATCH_SIZE' loaded from the latest database entry
INFO:open_webui.internal.db:There is nothing to migrate
return asyncio.run(self.serve(sockets=sockets))
INFO [open_webui.env] Embedding model set: azure/text-embedding-ada-002
await self._serve(sockets)
INFO [open_webui.env] 'TASK_MODEL_EXTERNAL' loaded from the latest database entry
DEBUG:peewee:('SELECT "t1"."id", "t1"."name", "t1"."migrated_at" FROM "migratehistory" AS "t1" ORDER BY "t1"."id"', [])
File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 77, in _serve
INFO [open_webui.env] 'RAG_TEXT_SPLITTER' loaded from the latest database entry
run(
^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^
INFO [open_webui.env] 'ENABLE_IMAGE_PROMPT_GENERATION' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_GOOGLE_DRIVE_INTEGRATION' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2365, in execute
INFO [open_webui.env] 'CONTENT_EXTRACTION_ENGINE' loaded from the latest database entry
INFO [open_webui.env] 'OLLAMA_BASE_URLS' loaded from the latest database entry
INFO [open_webui.env] 'OPENAI_API_CONFIGS' loaded from the latest database entry
INFO [open_webui.env] 'COMFYUI_WORKFLOW' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_TAGS_GENERATION' loaded from the latest database entry
DEBUG:peewee:('CREATE TABLE IF NOT EXISTS "migratehistory" ("id" SERIAL NOT NULL PRIMARY KEY, "name" VARCHAR(255) NOT NULL, "migrated_at" TIMESTAMP NOT NULL)', [])
ret = self._execute_context(
psycopg2.errors.InsufficientPrivilege: Only members of "azure_pg_admin" are allowed to use CREATE EXTENSION
cursor.execute(statement, parameters)
INFO [open_webui.env] 'CHUNK_OVERLAP' loaded from the latest database entry
ERROR [open_webui.retrieval.vector.dbs.pgvector] Error during initialization: (psycopg2.errors.InsufficientPrivilege) Only members of "azure_pg_admin" are allowed to use CREATE EXTENSION
INFO [open_webui.env] 'TIKA_SERVER_URL' loaded from the latest database entry
File "", line 1204, in _gcd_import
INFO [open_webui.env] 'ENABLE_OLLAMA_API' loaded from the latest database entry
DEBUG:passlib.utils.compat:loaded lazy attr 'BytesIO': <class '_io.BytesIO'>
INFO [open_webui.env] 'DEFAULT_MODELS' loaded from the latest database entry
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
INFO [open_webui.env] 'MODEL_ORDER_LIST' loaded from the latest database entry
INFO [open_webui.env] 'IMAGES_GEMINI_API_BASE_URL' loaded from the latest database entry
INFO [open_webui.env] 'RAG_RELEVANCE_THRESHOLD' loaded from the latest database entry
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INFO [open_webui.env] 'USER_PERMISSIONS' loaded from the latest database entry
INFO [open_webui.env] 'IMAGES_GEMINI_API_KEY' loaded from the latest database entry
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^
INFO [open_webui.env] 'DOCUMENT_INTELLIGENCE_ENDPOINT' loaded from the latest database entry
return self._execute_internal(
File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run
server.run()
(Background on this error at: https://sqlalche.me/e/20/f405)
self.session.execute(text("CREATE EXTENSION IF NOT EXISTS vector;"))
INFO:open_webui.env:Running migrations
Traceback (most recent call last):
^^^^^^^^^^^^^^^^^^^^^^^^^^^
[SQL: CREATE EXTENSION IF NOT EXISTS vector;]
INFO [open_webui.env] 'DEFAULT_PROMPT_SUGGESTIONS' loaded from the latest database entry
INFO [open_webui.env] 'SHOW_ADMIN_DETAILS' loaded from the latest database entry
INFO [open_webui.env] 'IMAGE_GENERATION_ENGINE' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 66, in run
INFO [open_webui.env] 'COMFYUI_WORKFLOW' loaded from the latest database entry
Traceback (most recent call last):
INFO [open_webui.env] 'BYPASS_EMBEDDING_AND_RETRIEVAL' loaded from the latest database entry
INFO [open_webui.env] 'WEBUI_BANNERS' loaded from the latest database entry
INFO [open_webui.env] 'EVALUATION_ARENA_MODELS' loaded from the latest database entry
INFO [open_webui.env] 'RAG_OPENAI_API_KEY' loaded from the latest database entry
DEBUG:passlib.utils.compat:loaded lazy attr 'SafeConfigParser': <class 'configparser.ConfigParser'>
from open_webui.routers.knowledge import get_knowledge, get_knowledge_list
(Background on this error at: https://sqlalche.me/e/20/f405)
INFO [open_webui.env] 'COMFYUI_API_KEY' loaded from the latest database entry
File "", line 690, in _load_unlocked
return runner.run(main)
INFO [open_webui.env] 'IMAGE_PROMPT_GENERATION_PROMPT_TEMPLATE' loaded from the latest database entry
INFO [open_webui.env] 'RAG_FULL_CONTEXT' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1082, in main
Traceback (most recent call last):
INFO [open_webui.env] 'ENABLE_RETRIEVAL_QUERY_GENERATION' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_SIGNUP' loaded from the latest database entry
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.InsufficientPrivilege) Only members of "azure_pg_admin" are allowed to use CREATE EXTENSION
config.load()
INFO [open_webui.env] 'ENABLE_IMAGE_GENERATION' loaded from the latest database entry
File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
return self._proxied.execute(
File "/usr/local/bin/uvicorn", line 10, in
INFO:open_webui.internal.db:Starting migrations
File "/app/backend/open_webui/retrieval/vector/dbs/pgvector.py", line 66, in init
INFO [open_webui.env] 'OPENAI_API_KEYS' loaded from the latest database entry
INFO [open_webui.env] 'AUTOMATIC1111_BASE_URL' loaded from the latest database entry
from open_webui.routers import (
INFO [open_webui.env] 'TAGS_GENERATION_PROMPT_TEMPLATE' loaded from the latest database entry
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/scoping.py", line 779, in execute
INFO [alembic.runtime.migration] Will assume transactional DDL.
self.dialect.do_execute(
INFO [open_webui.env] 'IMAGE_SIZE' loaded from the latest database entry
INFO [open_webui.env] 'WEBHOOK_URL' loaded from the latest database entry
module = importlib.import_module(module_str)
return __callback(*args, **kwargs)
^^^^^
cursor.execute(statement, parameters)
rv = self.invoke(ctx)
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 942, in do_execute
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1843, in _execute_context
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1964, in _exec_single_context
from open_webui.retrieval.vector.connector import VECTOR_DB_CLIENT
INFO [open_webui.env] 'RAG_OLLAMA_BASE_URL' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 942, in do_execute
File "/app/backend/open_webui/routers/files.py", line 29, in
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1443, in invoke
self.loaded_app = import_from_string(self.app)
INFO [open_webui.env] 'IMAGE_STEPS' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 70, in serve
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1964, in _exec_single_context
File "/app/backend/open_webui/retrieval/vector/dbs/pgvector.py", line 66, in init
INFO [open_webui.env] 'RAG_EMBEDDING_MODEL' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2352, in _handle_dbapi_exception
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1638, in _execute_clauseelement
File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
return self._loop.run_until_complete(task)
INFO [open_webui.env] 'DEFAULT_USER_ROLE' loaded from the latest database entry
INFO [open_webui.env] 'OPENAI_API_BASE_URLS' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_SEARCH_QUERY_GENERATION' loaded from the latest database entry
^^^^^^^^^^^^^^^^^^^^^^
INFO [open_webui.env] 'ENABLE_OPENAI_API' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_EVALUATION_ARENA_MODELS' loaded from the latest database entry
return connection._execute_clauseelement(
INFO [open_webui.env] 'COMFYUI_BASE_URL' loaded from the latest database entry
return self.main(*args, **kwargs)
sys.exit(main())
File "/app/backend/open_webui/main.py", line 55, in
return self._proxied.execute(
INFO [open_webui.env] 'API_KEY_ALLOWED_ENDPOINTS' loaded from the latest database entry
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1964, in _exec_single_context
INFO [open_webui.env] 'TITLE_GENERATION_PROMPT_TEMPLATE' loaded from the latest database entry
File "", line 940, in exec_module
INFO [open_webui.env] 'ENABLE_CHANNELS' loaded from the latest database entry
^^^^^^^^^^^^^^^^^^^^^^
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2365, in execute
from open_webui.routers.files import upload_file
INFO [open_webui.env] 'ENABLE_DIRECT_CONNECTIONS' loaded from the latest database entry
self._handle_dbapi_exception(
File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main
return _bootstrap._gcd_import(name[level:], package, level)
INFO [open_webui.env] 'WEBUI_URL' loaded from the latest database entry
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2260, in _execute_internal
INFO [open_webui.env] 'RAG_OLLAMA_API_KEY' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_COMMUNITY_SHARING' loaded from the latest database entry
INFO [open_webui.env] 'IMAGES_OPENAI_API_KEY' loaded from the latest database entry
INFO [open_webui.env] 'IMAGES_OPENAI_API_BASE_URL' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_AUTOCOMPLETE_GENERATION' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_API_KEY' loaded from the latest database entry
INFO:open_webui.internal.wrappers:Connected to PostgreSQL database
INFO [open_webui.env] 'ENABLE_RAG_HYBRID_SEARCH' loaded from the latest database entry
psycopg2.errors.InsufficientPrivilege: Only members of "azure_pg_admin" are allowed to use CREATE EXTENSION
INFO [open_webui.env] 'AUTOMATIC1111_API_AUTH' loaded from the latest database entry
INFO [open_webui.env] 'RAG_EMBEDDING_ENGINE' loaded from the latest database entry
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
return self._exec_single_context(
The above exception was the direct cause of the following exception:
INFO [open_webui.env] 'IMAGE_GENERATION_MODEL' loaded from the latest database entry
VECTOR_DB_CLIENT = PgvectorClient()
INFO [open_webui.env] 'ENABLE_LDAP' loaded from the latest database entry
File "/app/backend/open_webui/routers/images.py", line 16, in
INFO [open_webui.env] 'RAG_FILE_MAX_SIZE' loaded from the latest database entry
File "/app/backend/open_webui/retrieval/vector/connector.py", line 18, in
^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 241, in _call_with_frames_removed
cursor.execute(statement, parameters)
self.session.execute(text("CREATE EXTENSION IF NOT EXISTS vector;"))
File "/app/backend/open_webui/routers/knowledge.py", line 13, in
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 788, in invoke
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1416, in execute
DEBUG:passlib.utils.compat:loaded lazy attr 'NativeStringIO': <class '_io.StringIO'>
INFO [open_webui.env] 'ENABLE_TITLE_GENERATION' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/scoping.py", line 779, in execute
INFO [open_webui.env] 'DOCUMENT_INTELLIGENCE_KEY' loaded from the latest database entry
[SQL: CREATE EXTENSION IF NOT EXISTS vector;]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^
^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INFO [open_webui.env] 'ENABLE_MESSAGE_RATING' loaded from the latest database entry
INFO [open_webui.env] 'AUTOCOMPLETE_GENERATION_INPUT_MAX_LENGTH' loaded from the latest database entry
INFO [open_webui.env] 'TASK_MODEL' loaded from the latest database entry
File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
File "/usr/local/lib/python3.11/site-packages/uvicorn/config.py", line 435, in load
INFO [open_webui.env] 'JWT_EXPIRES_IN' loaded from the latest database entry
^^^^^^^^^^^^^
result = conn.execute(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1176, in _find_and_load
INFO [open_webui.env] 'CHUNK_SIZE' loaded from the latest database entry
INFO [open_webui.env] 'TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 516, in _execute_on_connection
return meth(
INFO [open_webui.env] 'RAG_TEMPLATE' loaded from the latest database entry
return ctx.invoke(self.callback, **ctx.params)
INFO [open_webui.env] 'QUERY_GENERATION_PROMPT_TEMPLATE' loaded from the latest database entry
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 942, in do_execute
File "/usr/local/lib/python3.11/site-packages/uvicorn/importer.py", line 19, in import_from_string
INFO [open_webui.env] 'RAG_TOP_K' loaded from the latest database entry
INFO:open_webui.env:COMFYUI_LOG_LEVEL: DEBUG
INFO:open_webui.env:RAG_LOG_LEVEL: DEBUG
/app
INFO:open_webui.env:OPENAI_LOG_LEVEL: DEBUG
INFO:open_webui.env:AUDIO_LOG_LEVEL: DEBUG
INFO:open_webui.env:CONFIG_LOG_LEVEL: DEBUG
INFO:open_webui.env:MODELS_LOG_LEVEL: DEBUG
INFO:open_webui.env:IMAGES_LOG_LEVEL: DEBUG
/app/backend
INFO:open_webui.env:OAUTH_LOG_LEVEL: DEBUG
INFO:open_webui.env:GLOBAL_LOG_LEVEL: DEBUG
INFO:open_webui.env:SOCKET_LOG_LEVEL: DEBUG
INFO:open_webui.env:WEBHOOK_LOG_LEVEL: DEBUG
INFO:open_webui.env:MAIN_LOG_LEVEL: DEBUG
INFO:open_webui.env:OLLAMA_LOG_LEVEL: DEBUG
/app/backend/open_webui
INFO:open_webui.env:DB_LOG_LEVEL: DEBUG
Probe of StartUp failed with status code:
Created container 'chat'
Started container 'chat'
Additional Information
This issue is preventing us from following least privilege principle.
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_extension WHERE extname = 'vector') THEN
CREATE EXTENSION IF NOT EXISTS vector;
END IF;
END $$;
Originally created by @snw55 on GitHub (Apr 4, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/12451
### Check Existing Issues
- [x] I have searched the existing issues and discussions.
- [x] I am using the latest version of Open WebUI.
### Installation Method
Docker
### Open WebUI Version
v0.6.0
### Ollama Version (if applicable)
_No response_
### Operating System
Debian 12
### Browser (if applicable)
_No response_
### Confirmation
- [x] I have read and followed all instructions in `README.md`.
- [x] I am using the latest version of **both** Open WebUI and Ollama.
- [x] I have included the browser console logs.
- [x] I have included the Docker container logs.
- [x] I have listed steps to reproduce the bug in detail.
### Expected Behavior
Startup succeeds. Using DB credentials that do not have azure_pg_admin permissions.
Assuming that vector extension is already created of course.
### Actual Behavior
Startup fails, because of statement:
`CREATE EXTENSION IF NOT EXISTS vector;`
https://github.com/open-webui/open-webui/blob/main/backend/open_webui/retrieval/vector/dbs/pgvector.py#L66
### Steps to Reproduce
1. Provision Azure Database for Postgresql Flexible Server instance
2. Create DB webui
```
REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON DATABASE webui FROM PUBLIC;
CREATE EXTENSION IF NOT EXISTS vector;
```
3. Create new DB user
4. Using administrator, assign user permissions similar to:
```
GRANT CONNECT, TEMPORARY ON DATABASE webui TO <user>;
GRANT USAGE, CREATE ON SCHEMA public TO <user>;
GRANT ALL ON ALL TABLES IN SCHEMA public TO <user>;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO <user>;
```
5. Configure & startup Open WebUI
6. Init fails
### Logs & Screenshots
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.InsufficientPrivilege) Only members of "azure_pg_admin" are allowed to use CREATE EXTENSION
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1983, in _exec_single_context
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1416, in execute
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2260, in _execute_internal
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1638, in _execute_clauseelement
return self._execute_internal(
cursor.execute(statement, parameters)
self.dialect.do_execute(
ret = self._execute_context(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1964, in _exec_single_context
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
return connection._execute_clauseelement(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2352, in _handle_dbapi_exception
result = conn.execute(
(Background on this error at: https://sqlalche.me/e/20/f405)
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 516, in _execute_on_connection
^^^^^^^^^^^^^^^^^^^^^^^
return self._exec_single_context(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1843, in _execute_context
return meth(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 942, in do_execute
self._handle_dbapi_exception(
^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^
[SQL: CREATE EXTENSION IF NOT EXISTS vector;]
Container 'chat' was terminated with exit code '1' and reason 'ProcessExited'
INFO [open_webui.env] 'PDF_EXTRACT_IMAGES' loaded from the latest database entry
The above exception was the direct cause of the following exception:
INFO [open_webui.env] 'ENABLE_API_KEY_ENDPOINT_RESTRICTIONS' loaded from the latest database entry
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1161, in __call__
INFO [open_webui.env] 'RAG_OPENAI_API_BASE_URL' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1983, in _exec_single_context
INFO [open_webui.env] 'ENABLE_ONEDRIVE_INTEGRATION' loaded from the latest database entry
INFO [open_webui.env] 'OLLAMA_API_CONFIGS' loaded from the latest database entry
INFO [open_webui.env] 'RAG_EMBEDDING_BATCH_SIZE' loaded from the latest database entry
INFO:open_webui.internal.db:There is nothing to migrate
return asyncio.run(self.serve(sockets=sockets))
INFO [open_webui.env] Embedding model set: azure/text-embedding-ada-002
await self._serve(sockets)
INFO [open_webui.env] 'TASK_MODEL_EXTERNAL' loaded from the latest database entry
DEBUG:peewee:('SELECT "t1"."id", "t1"."name", "t1"."migrated_at" FROM "migratehistory" AS "t1" ORDER BY "t1"."id"', [])
File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 77, in _serve
INFO [open_webui.env] 'RAG_TEXT_SPLITTER' loaded from the latest database entry
run(
^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^
INFO [open_webui.env] 'ENABLE_IMAGE_PROMPT_GENERATION' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_GOOGLE_DRIVE_INTEGRATION' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2365, in execute
INFO [open_webui.env] 'CONTENT_EXTRACTION_ENGINE' loaded from the latest database entry
INFO [open_webui.env] 'OLLAMA_BASE_URLS' loaded from the latest database entry
INFO [open_webui.env] 'OPENAI_API_CONFIGS' loaded from the latest database entry
INFO [open_webui.env] 'COMFYUI_WORKFLOW' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_TAGS_GENERATION' loaded from the latest database entry
DEBUG:peewee:('CREATE TABLE IF NOT EXISTS "migratehistory" ("id" SERIAL NOT NULL PRIMARY KEY, "name" VARCHAR(255) NOT NULL, "migrated_at" TIMESTAMP NOT NULL)', [])
ret = self._execute_context(
psycopg2.errors.InsufficientPrivilege: Only members of "azure_pg_admin" are allowed to use CREATE EXTENSION
cursor.execute(statement, parameters)
INFO [open_webui.env] 'CHUNK_OVERLAP' loaded from the latest database entry
ERROR [open_webui.retrieval.vector.dbs.pgvector] Error during initialization: (psycopg2.errors.InsufficientPrivilege) Only members of "azure_pg_admin" are allowed to use CREATE EXTENSION
INFO [open_webui.env] 'TIKA_SERVER_URL' loaded from the latest database entry
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
INFO [open_webui.env] 'ENABLE_OLLAMA_API' loaded from the latest database entry
DEBUG:passlib.utils.compat:loaded lazy attr 'BytesIO': <class '_io.BytesIO'>
INFO [open_webui.env] 'DEFAULT_MODELS' loaded from the latest database entry
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
INFO [open_webui.env] 'MODEL_ORDER_LIST' loaded from the latest database entry
INFO [open_webui.env] 'IMAGES_GEMINI_API_BASE_URL' loaded from the latest database entry
INFO [open_webui.env] 'RAG_RELEVANCE_THRESHOLD' loaded from the latest database entry
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INFO [open_webui.env] 'USER_PERMISSIONS' loaded from the latest database entry
INFO [open_webui.env] 'IMAGES_GEMINI_API_KEY' loaded from the latest database entry
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^
INFO [open_webui.env] 'DOCUMENT_INTELLIGENCE_ENDPOINT' loaded from the latest database entry
return self._execute_internal(
File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run
server.run()
(Background on this error at: https://sqlalche.me/e/20/f405)
self.session.execute(text("CREATE EXTENSION IF NOT EXISTS vector;"))
INFO:open_webui.env:Running migrations
Traceback (most recent call last):
^^^^^^^^^^^^^^^^^^^^^^^^^^^
[SQL: CREATE EXTENSION IF NOT EXISTS vector;]
INFO [open_webui.env] 'DEFAULT_PROMPT_SUGGESTIONS' loaded from the latest database entry
INFO [open_webui.env] 'SHOW_ADMIN_DETAILS' loaded from the latest database entry
INFO [open_webui.env] 'IMAGE_GENERATION_ENGINE' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 66, in run
INFO [open_webui.env] 'COMFYUI_WORKFLOW' loaded from the latest database entry
Traceback (most recent call last):
INFO [open_webui.env] 'BYPASS_EMBEDDING_AND_RETRIEVAL' loaded from the latest database entry
INFO [open_webui.env] 'WEBUI_BANNERS' loaded from the latest database entry
INFO [open_webui.env] 'EVALUATION_ARENA_MODELS' loaded from the latest database entry
INFO [open_webui.env] 'RAG_OPENAI_API_KEY' loaded from the latest database entry
DEBUG:passlib.utils.compat:loaded lazy attr 'SafeConfigParser': <class 'configparser.ConfigParser'>
from open_webui.routers.knowledge import get_knowledge, get_knowledge_list
(Background on this error at: https://sqlalche.me/e/20/f405)
INFO [open_webui.env] 'COMFYUI_API_KEY' loaded from the latest database entry
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
return runner.run(main)
INFO [open_webui.env] 'IMAGE_PROMPT_GENERATION_PROMPT_TEMPLATE' loaded from the latest database entry
INFO [open_webui.env] 'RAG_FULL_CONTEXT' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1082, in main
Traceback (most recent call last):
INFO [open_webui.env] 'ENABLE_RETRIEVAL_QUERY_GENERATION' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_SIGNUP' loaded from the latest database entry
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.InsufficientPrivilege) Only members of "azure_pg_admin" are allowed to use CREATE EXTENSION
config.load()
INFO [open_webui.env] 'ENABLE_IMAGE_GENERATION' loaded from the latest database entry
File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
return self._proxied.execute(
File "/usr/local/bin/uvicorn", line 10, in <module>
INFO:open_webui.internal.db:Starting migrations
File "/app/backend/open_webui/retrieval/vector/dbs/pgvector.py", line 66, in __init__
INFO [open_webui.env] 'OPENAI_API_KEYS' loaded from the latest database entry
INFO [open_webui.env] 'AUTOMATIC1111_BASE_URL' loaded from the latest database entry
from open_webui.routers import (
INFO [open_webui.env] 'TAGS_GENERATION_PROMPT_TEMPLATE' loaded from the latest database entry
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/scoping.py", line 779, in execute
INFO [alembic.runtime.migration] Will assume transactional DDL.
self.dialect.do_execute(
INFO [open_webui.env] 'IMAGE_SIZE' loaded from the latest database entry
INFO [open_webui.env] 'WEBHOOK_URL' loaded from the latest database entry
module = importlib.import_module(module_str)
return __callback(*args, **kwargs)
^^^^^
cursor.execute(statement, parameters)
rv = self.invoke(ctx)
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 942, in do_execute
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1843, in _execute_context
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1964, in _exec_single_context
from open_webui.retrieval.vector.connector import VECTOR_DB_CLIENT
INFO [open_webui.env] 'RAG_OLLAMA_BASE_URL' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 942, in do_execute
File "/app/backend/open_webui/routers/files.py", line 29, in <module>
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1443, in invoke
self.loaded_app = import_from_string(self.app)
INFO [open_webui.env] 'IMAGE_STEPS' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 70, in serve
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1964, in _exec_single_context
File "/app/backend/open_webui/retrieval/vector/dbs/pgvector.py", line 66, in __init__
INFO [open_webui.env] 'RAG_EMBEDDING_MODEL' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2352, in _handle_dbapi_exception
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1638, in _execute_clauseelement
File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
return self._loop.run_until_complete(task)
INFO [open_webui.env] 'DEFAULT_USER_ROLE' loaded from the latest database entry
INFO [open_webui.env] 'OPENAI_API_BASE_URLS' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_SEARCH_QUERY_GENERATION' loaded from the latest database entry
^^^^^^^^^^^^^^^^^^^^^^
INFO [open_webui.env] 'ENABLE_OPENAI_API' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_EVALUATION_ARENA_MODELS' loaded from the latest database entry
return connection._execute_clauseelement(
INFO [open_webui.env] 'COMFYUI_BASE_URL' loaded from the latest database entry
return self.main(*args, **kwargs)
sys.exit(main())
File "/app/backend/open_webui/main.py", line 55, in <module>
return self._proxied.execute(
INFO [open_webui.env] 'API_KEY_ALLOWED_ENDPOINTS' loaded from the latest database entry
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1964, in _exec_single_context
INFO [open_webui.env] 'TITLE_GENERATION_PROMPT_TEMPLATE' loaded from the latest database entry
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
INFO [open_webui.env] 'ENABLE_CHANNELS' loaded from the latest database entry
^^^^^^^^^^^^^^^^^^^^^^
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2365, in execute
from open_webui.routers.files import upload_file
INFO [open_webui.env] 'ENABLE_DIRECT_CONNECTIONS' loaded from the latest database entry
self._handle_dbapi_exception(
File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main
return _bootstrap._gcd_import(name[level:], package, level)
INFO [open_webui.env] 'WEBUI_URL' loaded from the latest database entry
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2260, in _execute_internal
INFO [open_webui.env] 'RAG_OLLAMA_API_KEY' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_COMMUNITY_SHARING' loaded from the latest database entry
INFO [open_webui.env] 'IMAGES_OPENAI_API_KEY' loaded from the latest database entry
INFO [open_webui.env] 'IMAGES_OPENAI_API_BASE_URL' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_AUTOCOMPLETE_GENERATION' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_API_KEY' loaded from the latest database entry
INFO:open_webui.internal.wrappers:Connected to PostgreSQL database
INFO [open_webui.env] 'ENABLE_RAG_HYBRID_SEARCH' loaded from the latest database entry
psycopg2.errors.InsufficientPrivilege: Only members of "azure_pg_admin" are allowed to use CREATE EXTENSION
INFO [open_webui.env] 'AUTOMATIC1111_API_AUTH' loaded from the latest database entry
INFO [open_webui.env] 'RAG_EMBEDDING_ENGINE' loaded from the latest database entry
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
return self._exec_single_context(
The above exception was the direct cause of the following exception:
INFO [open_webui.env] 'IMAGE_GENERATION_MODEL' loaded from the latest database entry
VECTOR_DB_CLIENT = PgvectorClient()
INFO [open_webui.env] 'ENABLE_LDAP' loaded from the latest database entry
File "/app/backend/open_webui/routers/images.py", line 16, in <module>
INFO [open_webui.env] 'RAG_FILE_MAX_SIZE' loaded from the latest database entry
File "/app/backend/open_webui/retrieval/vector/connector.py", line 18, in <module>
^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
cursor.execute(statement, parameters)
self.session.execute(text("CREATE EXTENSION IF NOT EXISTS vector;"))
File "/app/backend/open_webui/routers/knowledge.py", line 13, in <module>
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 788, in invoke
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1416, in execute
DEBUG:passlib.utils.compat:loaded lazy attr 'NativeStringIO': <class '_io.StringIO'>
INFO [open_webui.env] 'ENABLE_TITLE_GENERATION' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/scoping.py", line 779, in execute
INFO [open_webui.env] 'DOCUMENT_INTELLIGENCE_KEY' loaded from the latest database entry
[SQL: CREATE EXTENSION IF NOT EXISTS vector;]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^
^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INFO [open_webui.env] 'ENABLE_MESSAGE_RATING' loaded from the latest database entry
INFO [open_webui.env] 'AUTOCOMPLETE_GENERATION_INPUT_MAX_LENGTH' loaded from the latest database entry
INFO [open_webui.env] 'TASK_MODEL' loaded from the latest database entry
File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
File "/usr/local/lib/python3.11/site-packages/uvicorn/config.py", line 435, in load
INFO [open_webui.env] 'JWT_EXPIRES_IN' loaded from the latest database entry
^^^^^^^^^^^^^
result = conn.execute(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
INFO [open_webui.env] 'CHUNK_SIZE' loaded from the latest database entry
INFO [open_webui.env] 'TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 516, in _execute_on_connection
return meth(
INFO [open_webui.env] 'RAG_TEMPLATE' loaded from the latest database entry
return ctx.invoke(self.callback, **ctx.params)
INFO [open_webui.env] 'QUERY_GENERATION_PROMPT_TEMPLATE' loaded from the latest database entry
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 942, in do_execute
File "/usr/local/lib/python3.11/site-packages/uvicorn/importer.py", line 19, in import_from_string
INFO [open_webui.env] 'RAG_TOP_K' loaded from the latest database entry
INFO:open_webui.env:COMFYUI_LOG_LEVEL: DEBUG
INFO:open_webui.env:RAG_LOG_LEVEL: DEBUG
/app
INFO:open_webui.env:OPENAI_LOG_LEVEL: DEBUG
INFO:open_webui.env:AUDIO_LOG_LEVEL: DEBUG
INFO:open_webui.env:CONFIG_LOG_LEVEL: DEBUG
INFO:open_webui.env:MODELS_LOG_LEVEL: DEBUG
INFO:open_webui.env:IMAGES_LOG_LEVEL: DEBUG
/app/backend
INFO:open_webui.env:OAUTH_LOG_LEVEL: DEBUG
INFO:open_webui.env:GLOBAL_LOG_LEVEL: DEBUG
INFO:open_webui.env:SOCKET_LOG_LEVEL: DEBUG
INFO:open_webui.env:WEBHOOK_LOG_LEVEL: DEBUG
INFO:open_webui.env:MAIN_LOG_LEVEL: DEBUG
INFO:open_webui.env:OLLAMA_LOG_LEVEL: DEBUG
/app/backend/open_webui
INFO:open_webui.env:DB_LOG_LEVEL: DEBUG
Probe of StartUp failed with status code:
Created container 'chat'
Started container 'chat'
### Additional Information
This issue is preventing us from following least privilege principle.
https://learn.microsoft.com/en-us/azure/postgresql/extensions/how-to-create-extensions#steps-to-create-extensions
Potential fix:
```
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_extension WHERE extname = 'vector') THEN
CREATE EXTENSION IF NOT EXISTS vector;
END IF;
END $$;
```
GiteaMirror
added the bug label 2026-05-15 11:48:02 -05:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @snw55 on GitHub (Apr 4, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/12451
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.0
Ollama Version (if applicable)
No response
Operating System
Debian 12
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Startup succeeds. Using DB credentials that do not have azure_pg_admin permissions.
Assuming that vector extension is already created of course.
Actual Behavior
Startup fails, because of statement:
CREATE EXTENSION IF NOT EXISTS vector;https://github.com/open-webui/open-webui/blob/main/backend/open_webui/retrieval/vector/dbs/pgvector.py#L66
Steps to Reproduce
Logs & Screenshots
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.InsufficientPrivilege) Only members of "azure_pg_admin" are allowed to use CREATE EXTENSION
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1983, in _exec_single_context
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1416, in execute
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2260, in _execute_internal
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1638, in _execute_clauseelement
return self._execute_internal(
cursor.execute(statement, parameters)
self.dialect.do_execute(
ret = self._execute_context(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1964, in _exec_single_context
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
return connection._execute_clauseelement(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2352, in _handle_dbapi_exception
result = conn.execute(
(Background on this error at: https://sqlalche.me/e/20/f405)
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 516, in _execute_on_connection
^^^^^^^^^^^^^^^^^^^^^^^
return self._exec_single_context(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1843, in _execute_context
return meth(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 942, in do_execute
self._handle_dbapi_exception(
^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^
[SQL: CREATE EXTENSION IF NOT EXISTS vector;]
Container 'chat' was terminated with exit code '1' and reason 'ProcessExited'
INFO [open_webui.env] 'PDF_EXTRACT_IMAGES' loaded from the latest database entry
The above exception was the direct cause of the following exception:
INFO [open_webui.env] 'ENABLE_API_KEY_ENDPOINT_RESTRICTIONS' loaded from the latest database entry
File "", line 1147, in _find_and_load_unlocked
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1161, in call
INFO [open_webui.env] 'RAG_OPENAI_API_BASE_URL' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1983, in _exec_single_context
INFO [open_webui.env] 'ENABLE_ONEDRIVE_INTEGRATION' loaded from the latest database entry
INFO [open_webui.env] 'OLLAMA_API_CONFIGS' loaded from the latest database entry
INFO [open_webui.env] 'RAG_EMBEDDING_BATCH_SIZE' loaded from the latest database entry
INFO:open_webui.internal.db:There is nothing to migrate
return asyncio.run(self.serve(sockets=sockets))
INFO [open_webui.env] Embedding model set: azure/text-embedding-ada-002
INFO [open_webui.env] 'TASK_MODEL_EXTERNAL' loaded from the latest database entry
DEBUG:peewee:('SELECT "t1"."id", "t1"."name", "t1"."migrated_at" FROM "migratehistory" AS "t1" ORDER BY "t1"."id"', [])
File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 77, in _serve
INFO [open_webui.env] 'RAG_TEXT_SPLITTER' loaded from the latest database entry
run(
^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^
INFO [open_webui.env] 'ENABLE_IMAGE_PROMPT_GENERATION' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_GOOGLE_DRIVE_INTEGRATION' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2365, in execute
INFO [open_webui.env] 'CONTENT_EXTRACTION_ENGINE' loaded from the latest database entry
INFO [open_webui.env] 'OLLAMA_BASE_URLS' loaded from the latest database entry
INFO [open_webui.env] 'OPENAI_API_CONFIGS' loaded from the latest database entry
INFO [open_webui.env] 'COMFYUI_WORKFLOW' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_TAGS_GENERATION' loaded from the latest database entry
DEBUG:peewee:('CREATE TABLE IF NOT EXISTS "migratehistory" ("id" SERIAL NOT NULL PRIMARY KEY, "name" VARCHAR(255) NOT NULL, "migrated_at" TIMESTAMP NOT NULL)', [])
ret = self._execute_context(
psycopg2.errors.InsufficientPrivilege: Only members of "azure_pg_admin" are allowed to use CREATE EXTENSION
cursor.execute(statement, parameters)
INFO [open_webui.env] 'CHUNK_OVERLAP' loaded from the latest database entry
ERROR [open_webui.retrieval.vector.dbs.pgvector] Error during initialization: (psycopg2.errors.InsufficientPrivilege) Only members of "azure_pg_admin" are allowed to use CREATE EXTENSION
INFO [open_webui.env] 'TIKA_SERVER_URL' loaded from the latest database entry
File "", line 1204, in _gcd_import
INFO [open_webui.env] 'ENABLE_OLLAMA_API' loaded from the latest database entry
DEBUG:passlib.utils.compat:loaded lazy attr 'BytesIO': <class '_io.BytesIO'>
INFO [open_webui.env] 'DEFAULT_MODELS' loaded from the latest database entry
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
INFO [open_webui.env] 'MODEL_ORDER_LIST' loaded from the latest database entry
INFO [open_webui.env] 'IMAGES_GEMINI_API_BASE_URL' loaded from the latest database entry
INFO [open_webui.env] 'RAG_RELEVANCE_THRESHOLD' loaded from the latest database entry
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INFO [open_webui.env] 'USER_PERMISSIONS' loaded from the latest database entry
INFO [open_webui.env] 'IMAGES_GEMINI_API_KEY' loaded from the latest database entry
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^
INFO [open_webui.env] 'DOCUMENT_INTELLIGENCE_ENDPOINT' loaded from the latest database entry
return self._execute_internal(
File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run
server.run()
(Background on this error at: https://sqlalche.me/e/20/f405)
self.session.execute(text("CREATE EXTENSION IF NOT EXISTS vector;"))
INFO:open_webui.env:Running migrations
Traceback (most recent call last):
^^^^^^^^^^^^^^^^^^^^^^^^^^^
[SQL: CREATE EXTENSION IF NOT EXISTS vector;]
INFO [open_webui.env] 'DEFAULT_PROMPT_SUGGESTIONS' loaded from the latest database entry
INFO [open_webui.env] 'SHOW_ADMIN_DETAILS' loaded from the latest database entry
INFO [open_webui.env] 'IMAGE_GENERATION_ENGINE' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 66, in run
INFO [open_webui.env] 'COMFYUI_WORKFLOW' loaded from the latest database entry
Traceback (most recent call last):
INFO [open_webui.env] 'BYPASS_EMBEDDING_AND_RETRIEVAL' loaded from the latest database entry
INFO [open_webui.env] 'WEBUI_BANNERS' loaded from the latest database entry
INFO [open_webui.env] 'EVALUATION_ARENA_MODELS' loaded from the latest database entry
INFO [open_webui.env] 'RAG_OPENAI_API_KEY' loaded from the latest database entry
DEBUG:passlib.utils.compat:loaded lazy attr 'SafeConfigParser': <class 'configparser.ConfigParser'>
from open_webui.routers.knowledge import get_knowledge, get_knowledge_list
(Background on this error at: https://sqlalche.me/e/20/f405)
INFO [open_webui.env] 'COMFYUI_API_KEY' loaded from the latest database entry
File "", line 690, in _load_unlocked
return runner.run(main)
INFO [open_webui.env] 'IMAGE_PROMPT_GENERATION_PROMPT_TEMPLATE' loaded from the latest database entry
INFO [open_webui.env] 'RAG_FULL_CONTEXT' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1082, in main
Traceback (most recent call last):
INFO [open_webui.env] 'ENABLE_RETRIEVAL_QUERY_GENERATION' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_SIGNUP' loaded from the latest database entry
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.InsufficientPrivilege) Only members of "azure_pg_admin" are allowed to use CREATE EXTENSION
config.load()
INFO [open_webui.env] 'ENABLE_IMAGE_GENERATION' loaded from the latest database entry
File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
return self._proxied.execute(
File "/usr/local/bin/uvicorn", line 10, in
INFO:open_webui.internal.db:Starting migrations
File "/app/backend/open_webui/retrieval/vector/dbs/pgvector.py", line 66, in init
INFO [open_webui.env] 'OPENAI_API_KEYS' loaded from the latest database entry
INFO [open_webui.env] 'AUTOMATIC1111_BASE_URL' loaded from the latest database entry
from open_webui.routers import (
INFO [open_webui.env] 'TAGS_GENERATION_PROMPT_TEMPLATE' loaded from the latest database entry
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/scoping.py", line 779, in execute
INFO [alembic.runtime.migration] Will assume transactional DDL.
self.dialect.do_execute(
INFO [open_webui.env] 'IMAGE_SIZE' loaded from the latest database entry
INFO [open_webui.env] 'WEBHOOK_URL' loaded from the latest database entry
module = importlib.import_module(module_str)
return __callback(*args, **kwargs)
^^^^^
cursor.execute(statement, parameters)
rv = self.invoke(ctx)
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 942, in do_execute
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1843, in _execute_context
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1964, in _exec_single_context
from open_webui.retrieval.vector.connector import VECTOR_DB_CLIENT
INFO [open_webui.env] 'RAG_OLLAMA_BASE_URL' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 942, in do_execute
File "/app/backend/open_webui/routers/files.py", line 29, in
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1443, in invoke
INFO [open_webui.env] 'IMAGE_STEPS' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 70, in serve
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1964, in _exec_single_context
File "/app/backend/open_webui/retrieval/vector/dbs/pgvector.py", line 66, in init
INFO [open_webui.env] 'RAG_EMBEDDING_MODEL' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2352, in _handle_dbapi_exception
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1638, in _execute_clauseelement
File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
return self._loop.run_until_complete(task)
INFO [open_webui.env] 'DEFAULT_USER_ROLE' loaded from the latest database entry
INFO [open_webui.env] 'OPENAI_API_BASE_URLS' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_SEARCH_QUERY_GENERATION' loaded from the latest database entry
^^^^^^^^^^^^^^^^^^^^^^
INFO [open_webui.env] 'ENABLE_OPENAI_API' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_EVALUATION_ARENA_MODELS' loaded from the latest database entry
return connection._execute_clauseelement(
INFO [open_webui.env] 'COMFYUI_BASE_URL' loaded from the latest database entry
return self.main(*args, **kwargs)
sys.exit(main())
File "/app/backend/open_webui/main.py", line 55, in
return self._proxied.execute(
INFO [open_webui.env] 'API_KEY_ALLOWED_ENDPOINTS' loaded from the latest database entry
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1964, in _exec_single_context
INFO [open_webui.env] 'TITLE_GENERATION_PROMPT_TEMPLATE' loaded from the latest database entry
File "", line 940, in exec_module
INFO [open_webui.env] 'ENABLE_CHANNELS' loaded from the latest database entry
^^^^^^^^^^^^^^^^^^^^^^
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2365, in execute
from open_webui.routers.files import upload_file
INFO [open_webui.env] 'ENABLE_DIRECT_CONNECTIONS' loaded from the latest database entry
self._handle_dbapi_exception(
File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main
return _bootstrap._gcd_import(name[level:], package, level)
INFO [open_webui.env] 'WEBUI_URL' loaded from the latest database entry
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2260, in _execute_internal
INFO [open_webui.env] 'RAG_OLLAMA_API_KEY' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_COMMUNITY_SHARING' loaded from the latest database entry
INFO [open_webui.env] 'IMAGES_OPENAI_API_KEY' loaded from the latest database entry
INFO [open_webui.env] 'IMAGES_OPENAI_API_BASE_URL' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_AUTOCOMPLETE_GENERATION' loaded from the latest database entry
INFO [open_webui.env] 'ENABLE_API_KEY' loaded from the latest database entry
INFO:open_webui.internal.wrappers:Connected to PostgreSQL database
INFO [open_webui.env] 'ENABLE_RAG_HYBRID_SEARCH' loaded from the latest database entry
psycopg2.errors.InsufficientPrivilege: Only members of "azure_pg_admin" are allowed to use CREATE EXTENSION
INFO [open_webui.env] 'AUTOMATIC1111_API_AUTH' loaded from the latest database entry
INFO [open_webui.env] 'RAG_EMBEDDING_ENGINE' loaded from the latest database entry
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
return self._exec_single_context(
The above exception was the direct cause of the following exception:
INFO [open_webui.env] 'IMAGE_GENERATION_MODEL' loaded from the latest database entry
VECTOR_DB_CLIENT = PgvectorClient()
INFO [open_webui.env] 'ENABLE_LDAP' loaded from the latest database entry
File "/app/backend/open_webui/routers/images.py", line 16, in
INFO [open_webui.env] 'RAG_FILE_MAX_SIZE' loaded from the latest database entry
File "/app/backend/open_webui/retrieval/vector/connector.py", line 18, in
^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 241, in _call_with_frames_removed
cursor.execute(statement, parameters)
self.session.execute(text("CREATE EXTENSION IF NOT EXISTS vector;"))
File "/app/backend/open_webui/routers/knowledge.py", line 13, in
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 788, in invoke
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1416, in execute
DEBUG:passlib.utils.compat:loaded lazy attr 'NativeStringIO': <class '_io.StringIO'>
INFO [open_webui.env] 'ENABLE_TITLE_GENERATION' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/scoping.py", line 779, in execute
INFO [open_webui.env] 'DOCUMENT_INTELLIGENCE_KEY' loaded from the latest database entry
[SQL: CREATE EXTENSION IF NOT EXISTS vector;]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^
^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INFO [open_webui.env] 'ENABLE_MESSAGE_RATING' loaded from the latest database entry
INFO [open_webui.env] 'AUTOCOMPLETE_GENERATION_INPUT_MAX_LENGTH' loaded from the latest database entry
INFO [open_webui.env] 'TASK_MODEL' loaded from the latest database entry
File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
File "/usr/local/lib/python3.11/site-packages/uvicorn/config.py", line 435, in load
INFO [open_webui.env] 'JWT_EXPIRES_IN' loaded from the latest database entry
^^^^^^^^^^^^^
result = conn.execute(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1176, in _find_and_load
INFO [open_webui.env] 'CHUNK_SIZE' loaded from the latest database entry
INFO [open_webui.env] 'TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE' loaded from the latest database entry
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 516, in _execute_on_connection
return meth(
INFO [open_webui.env] 'RAG_TEMPLATE' loaded from the latest database entry
return ctx.invoke(self.callback, **ctx.params)
INFO [open_webui.env] 'QUERY_GENERATION_PROMPT_TEMPLATE' loaded from the latest database entry
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 942, in do_execute
File "/usr/local/lib/python3.11/site-packages/uvicorn/importer.py", line 19, in import_from_string
INFO [open_webui.env] 'RAG_TOP_K' loaded from the latest database entry
INFO:open_webui.env:COMFYUI_LOG_LEVEL: DEBUG
INFO:open_webui.env:RAG_LOG_LEVEL: DEBUG
/app
INFO:open_webui.env:OPENAI_LOG_LEVEL: DEBUG
INFO:open_webui.env:AUDIO_LOG_LEVEL: DEBUG
INFO:open_webui.env:CONFIG_LOG_LEVEL: DEBUG
INFO:open_webui.env:MODELS_LOG_LEVEL: DEBUG
INFO:open_webui.env:IMAGES_LOG_LEVEL: DEBUG
/app/backend
INFO:open_webui.env:OAUTH_LOG_LEVEL: DEBUG
INFO:open_webui.env:GLOBAL_LOG_LEVEL: DEBUG
INFO:open_webui.env:SOCKET_LOG_LEVEL: DEBUG
INFO:open_webui.env:WEBHOOK_LOG_LEVEL: DEBUG
INFO:open_webui.env:MAIN_LOG_LEVEL: DEBUG
INFO:open_webui.env:OLLAMA_LOG_LEVEL: DEBUG
/app/backend/open_webui
INFO:open_webui.env:DB_LOG_LEVEL: DEBUG
Probe of StartUp failed with status code:
Created container 'chat'
Started container 'chat'
Additional Information
This issue is preventing us from following least privilege principle.
https://learn.microsoft.com/en-us/azure/postgresql/extensions/how-to-create-extensions#steps-to-create-extensions
Potential fix: