Code: Select all
import { Client } from "jsr:@bartlomieju/postgres";
import "jsr:@std/dotenv/load";
const client = new Client({
user: Deno.env.get("POSTGRES_USER"),
database: Deno.env.get("POSTGRES_DB"),
hostname: Deno.env.get("POSTGRES_HOSTNAME"),
port: Deno.env.get("POSTGRES_PORT"),
});
client.connect();
console.log("connected");
await client.queryObject("SELECT * FROM blogs");
client.end();
Code: Select all
error: Uncaught (in promise) PostgresError: received unencrypted data after SSL request
throw new PostgresError(parseNoticeMessage(msg));
^
at assertSuccessfulStartup (https://jsr.io/@bartlomieju/postgres/0.17.2/connection/c
onnection.ts:80:13)
at Connection.#startup (https://jsr.io/@bartlomieju/postgres/0.17.2/connection/conne
ction.ts:394:7)
at eventLoopTick (ext:core/01_core.js:175:7)
at async Connection.startup (https://jsr.io/@bartlomieju/postgres/0.17.2/connection/
connection.ts:474:11)
at async Client.connect (https://jsr.io/@bartlomieju/postgres/0.17.2/client.ts:233:7
)
Mit ssl: false und ssl=off in postgresql.conf, Ich erhalte die folgende Fehlermeldung:
Code: Select all
error: Uncaught (in promise) PostgresError: received unencrypted data after SSL request
throw new PostgresError(parseNoticeMessage(msg));
^
at assertSuccessfulStartup (https://jsr.io/@bartlomieju/postgres/0.17.2/connection/c
onnection.ts:80:13)
at Connection.#startup (https://jsr.io/@bartlomieju/postgres/0.17.2/connection/conne
ction.ts:394:7)
at eventLoopTick (ext:core/01_core.js:175:7)
at async Connection.startup (https://jsr.io/@bartlomieju/postgres/0.17.2/connection/
connection.ts:474:11)
at async Connection.query (https://jsr.io/@bartlomieju/postgres/0.17.2/connection/co
nnection.ts:909:7)
at async Client.#executeQuery (https://jsr.io/@bartlomieju/postgres/0.17.2/client.ts
:256:12)
at async Client.queryObject (https://jsr.io/@bartlomieju/postgres/0.17.2/client.ts:4
34:12)
Mit ssl: true und ssl=on in postgresql.conf, Ich erhalte die folgende Fehlermeldung:
Code: Select all
error: Uncaught (in promise) ConnectionRefused: Connection refused (os error 61)
this.#conn = await Deno.connect(options);
^
at async Object.connect (ext:deno_net/01_net.js:583:55)
at async Connection.#openConnection (https://jsr.io/@bartlomieju/postgres/0.17.2/con
nection/connection.ts:246:18)
at async Connection.#startup (https://jsr.io/@bartlomieju/postgres/0.17.2/connection
/connection.ts:322:7)
at async Connection.startup (https://jsr.io/@bartlomieju/postgres/0.17.2/connection/
connection.ts:474:11)
at async Client.connect (https://jsr.io/@bartlomieju/postgres/0.17.2/client.ts:233:7
)
Wie soll ich vorgehen?