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

PostgreSQL vector store doesn't work with self-signed certificates #366

Open
marcusschiesser opened this issue Jan 11, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@marcusschiesser
Copy link
Collaborator

Generated with create-llama@0.0.13 an express, streaming, postgresSQL example. Using TimescaleDB as DB.

Directly using the connection string from TimescaleDB as PG_CONNECTION_STRING and calling npm run generate leads to the following error:

> my-app@0.1.0 generate
> node src/controllers/engine/generate.mjs

Start creating embeddings...
Error: self-signed certificate in certificate chain
    at TLSSocket.onConnectSecure (node:_tls_wrap:1659:34)
    at TLSSocket.emit (node:events:517:28)
    at TLSSocket._finishInit (node:_tls_wrap:1070:8)
    at ssl.onhandshakedone (node:_tls_wrap:856:12) {
  code: 'SELF_SIGNED_CERT_IN_CHAIN'
}
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error: self-signed certificate in certificate chain
    at TLSSocket.onConnectSecure (node:_tls_wrap:1659:34)
    at TLSSocket.emit (node:events:517:28)
    at TLSSocket._finishInit (node:_tls_wrap:1070:8)
    at ssl.onhandshakedone (node:_tls_wrap:856:12) {
  code: 'SELF_SIGNED_CERT_IN_CHAIN'
}

I had to remove sslmode=require from the connection string, and then the generation worked as intended. It wasn't reproducible on Windows, only on MacOS.

@marcusschiesser marcusschiesser added the bug Something isn't working label Jan 11, 2024
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

1 participant