pezzolabs / pezzo

🕹️ Open-source, developer-first LLMOps platform designed to streamline prompt design, version management, instant delivery, collaboration, troubleshooting, observability and more.
https://pezzo.ai
Apache License 2.0
2.55k stars 211 forks source link

Local KMS issue preventing Docker Compose stacks from saving Provider API Keys #239

Closed arielweinberger closed 1 year ago

arielweinberger commented 1 year ago

Report

When spinning up the stack using Docker Compose (docker-compose up) entirely (incl. Server and Console), it's not possible to save provider API keys due to a local KMS issue.

Expected behavior

Saving the provider API key should work.

Steps to reproduce the problem

  1. Spin up docker-compose
  2. Sign up and sign in
  3. Attempt to add a provider API key

Pezzo version

v0.6.4

How do you use Pezzo?

Docker Compose

deadsunrise commented 1 year ago

I have the same issue. I can add this from the general logs,

pezzo-supertokens-1 | pezzo-pezzo-server-1 | INFO [18:21:50.529] ([Redacted]): Updating provider API key pezzo-pezzo-server-1 | requestId: "0fc6948a-41d4-4c3e-b147-114312ddd72a" pezzo-pezzo-server-1 | userId: "9398e005-66a6-4141-b8d4-b59f3223aaa6" pezzo-pezzo-server-1 | provider: "OpenAI" pezzo-pezzo-server-1 | organizationId: "clnm2uaur0000o70idgz2cmmj" pezzo-pezzo-server-1 | INFO [18:21:50.542] ([Redacted]): Encrypting data pezzo-pezzo-server-1 | requestId: "0fc6948a-41d4-4c3e-b147-114312ddd72a" pezzo-pezzo-server-1 | userId: "9398e005-66a6-4141-b8d4-b59f3223aaa6" pezzo-pezzo-server-1 | provider: "OpenAI" pezzo-pezzo-server-1 | organizationId: "clnm2uaur0000o70idgz2cmmj" pezzo-pezzo-server-1 | INFO [18:21:50.543] ([Redacted]): Generating data key pezzo-pezzo-server-1 | requestId: "0fc6948a-41d4-4c3e-b147-114312ddd72a" pezzo-pezzo-server-1 | userId: "9398e005-66a6-4141-b8d4-b59f3223aaa6" pezzo-pezzo-server-1 | provider: "OpenAI" pezzo-pezzo-server-1 | organizationId: "clnm2uaur0000o70idgz2cmmj" pezzo-pezzo-server-1 | ERROR [18:21:50.716] ([Redacted]): Error updating provider API key pezzo-pezzo-server-1 | requestId: "0fc6948a-41d4-4c3e-b147-114312ddd72a" pezzo-pezzo-server-1 | userId: "9398e005-66a6-4141-b8d4-b59f3223aaa6" pezzo-pezzo-server-1 | provider: "OpenAI" pezzo-pezzo-server-1 | organizationId: "clnm2uaur0000o70idgz2cmmj" pezzo-pezzo-server-1 | message: "connect ECONNREFUSED 127.0.0.1:9981" pezzo-pezzo-server-1 | stack: "Error: connect ECONNREFUSED 127.0.0.1:9981\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16)\n at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17)" pezzo-pezzo-server-1 | error: { pezzo-pezzo-server-1 | "errno": -111, pezzo-pezzo-server-1 | "code": "ECONNREFUSED", pezzo-pezzo-server-1 | "syscall": "connect", pezzo-pezzo-server-1 | "address": "127.0.0.1", pezzo-pezzo-server-1 | "port": 9981, pezzo-pezzo-server-1 | "$metadata": { pezzo-pezzo-server-1 | "attempts": 3, pezzo-pezzo-server-1 | "totalRetryDelay": 77 pezzo-pezzo-server-1 | } pezzo-pezzo-server-1 | }`

The local-kms logs don't say much:

2023-10-11 20:19:08 INFO[2023-10-11 18:19:08.668] Local KMS Version Unknown (Commit Hash Unknown) 2023-10-11 20:19:08 INFO[2023-10-11 18:19:08.673] Importing data from seed file /init/seed.yaml 2023-10-11 20:19:08 INFO[2023-10-11 18:19:08.673] 1 new keys and 1 new aliases added
2023-10-11 20:19:08 INFO[2023-10-11 18:19:08.673] Data will be stored in /data
2023-10-11 20:19:08 INFO[2023-10-11 18:19:08.673] Local KMS started on 0.0.0.0:9981 `

Screenshot 2023-10-11 at 20 25 47
arielweinberger commented 1 year ago

Working on a fix as we speak @deadsunrise