Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unable to start ZEP with limited DB access rights (under non-root user) #230

Closed
koldoon opened this issue Oct 16, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@koldoon
Copy link

koldoon commented Oct 16, 2023

Unable to start ZEP using dedicated Postgres database user with limited access rights (for example, in case of Google Cloud SQL).

Main issues is: ZEP is unconditionally trying to create/update pgvector extension at startup:

  • when this is not needed because it is already up-to-date
  • when there are no rights to do that (extensions must be installed by PG DB admin ONLY and not the target applications)

Expected behavior
ZEP can try to create/update an extension if really wants but this should be a warning and not the fatal error. The best way is to check that there is extension already installed.

Logs

time="2023-10-16T11:45:00Z" level=warning msg=".env file not found or unable to load. This warning can be ignored if Zep is run using docker compose with env_file defined or you are passing ENV variables."
time="2023-10-16T11:45:00Z" level=info msg="Starting Zep server version 0.15.1-e950fff (2023-10-13T00:38:11+0000)"
time="2023-10-16T11:45:00Z" level=info msg="Log level set to: info"
time="2023-10-16T11:45:01Z" level=info msg="error enabling pgvector extension: error updating pgvector extension: ERROR: must be owner of extension vector (SQLSTATE=42501)"
time="2023-10-16T11:45:01Z" level=fatal msg="Failed to connect to database: error updating pgvector extension: ERROR: must be owner of extension vector (SQLSTATE=42501)\n"

Environment (please complete the following information):

  • Zep version: 0.15.1-e950fff (2023-10-13T00:38:11+0000)
  • Deployment using helm chart to Google Cloud Kubernetes targeting Google Cloud Postgres version POSTGRES_12_16.R20230830.01_01
  • extensions installed:
[
  {
    "oid": 14038,
    "extname": "plpgsql",
    "extowner": 10,
    "extnamespace": 11,
    "extrelocatable": false,
    "extversion": "1.0",
    "extconfig": null,
    "extcondition": null
  },
  {
    "oid": 80380,
    "extname": "vector",
    "extowner": 16416,
    "extnamespace": 2200,
    "extrelocatable": true,
    "extversion": "0.5.0",
    "extconfig": null,
    "extcondition": null
  }
]

Additional context
Previous version (0.12.4) was working fine in this environment.

@koldoon koldoon changed the title [BUG] [BUG] Unable to start ZEP with limited DB access rights (under non-root user) Oct 16, 2023
@danielchalef danielchalef added the bug Something isn't working label Oct 16, 2023
@danielchalef
Copy link
Member

danielchalef commented Oct 16, 2023

Fixed in #231. Will be released shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants