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

Getting error when deployed on Ubuntu + Postgres 14 #2

Open
dotsinspace opened this issue Dec 26, 2024 · 0 comments
Open

Getting error when deployed on Ubuntu + Postgres 14 #2

dotsinspace opened this issue Dec 26, 2024 · 0 comments

Comments

@dotsinspace
Copy link

Module is throwing error even when everything is perfect.

rnl@vmi2298266:~/cm_go$ goprisma format
prisma:engines binaries to download query-engine, schema-engine +1938ms
prisma:get-platform Found distro info:
{
  "targetDistro": "debian",
  "familyDistro": "debian",
  "originalDistro": "ubuntu"
} +43ms
prisma:get-platform Command "uname -m" successfully returned "x86_64
" +63ms
prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu") +1ms
prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.3 +8ms
prisma:get-platform The parsed libssl version is: 3.0.x +0ms
prisma:fetch-engine:env Using env var PRISMA_QUERY_ENGINE_BINARY for binary query-engine, which points to /home/rnl/.cache/prisma/binaries/cli/5.22.0/605197351a3c8bdd595af2d2a9bc3025bca48ea2/prisma-query-engine-linux-static-x64 +1ms
prisma:fetch-engine:env Using env var PRISMA_SCHEMA_ENGINE_BINARY for binary schema-engine, which points to /home/rnl/.cache/prisma/binaries/cli/5.22.0/605197351a3c8bdd595af2d2a9bc3025bca48ea2/prisma-schema-engine-linux-static-x64 +0ms
prisma:getSchema prismaConfig {
  "packagePath": "/home/rnl/cm_go/package.json"
} +2849ms
prisma:getSchema Checking existence of /home/rnl/cm_go/schema.prisma +2ms
prisma:getSchema Reading schema from single file /home/rnl/cm_go/schema.prisma +0ms
Prisma schema loaded from schema.prisma
prisma:validate Using validate Wasm +61ms
prisma:cli:bin Execution time for executing "await cli.parse(commandArray)": 1036.0398540496826 ms +76ms
Formatted schema.prisma in 143ms 🚀
prisma:getSchema prismaConfig {
  "packagePath": "/home/rnl/cm_go/package.json"
} +24ms
prisma:getSchema Checking existence of /home/rnl/cm_go/schema.prisma +12ms
prisma:getSchema Reading schema from single file /home/rnl/cm_go/schema.prisma +6ms
prisma:getSchema prismaConfig {
  "packagePath": "/home/rnl/cm_go/package.json"
} +2ms
prisma:getSchema Checking existence of /home/rnl/cm_go/schema.prisma +2ms
prisma:getSchema Reading schema from single file /home/rnl/cm_go/schema.prisma +14ms
prisma:getConfig Using getConfig Wasm +38ms
prisma:getConfig config data retrieved without errors in getConfig Wasm +14ms
prisma:get-platform Found distro info:
{
  "targetDistro": "debian",
  "familyDistro": "debian",
  "originalDistro": "ubuntu"
} +65ms
prisma:get-platform Command "uname -m" successfully returned "x86_64
" +130ms
prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu") +0ms
prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.3 +50ms
prisma:get-platform The parsed libssl version is: 3.0.x +46ms
prisma:cli:checkpoint runCheckpointClientCheck(): Execution time for getting info: 408.6033272743225 ms +5ms
prisma:cli:checkpoint runCheckpointClientCheck(): Execution time for "await checkpoint.check(data)": 336.6935591697693 ms +337ms
rnl@vmi2298266:~/cm_go$ goprisma db push
{"timestamp":"2024-12-26T07:17:56.148383Z","level":"ERROR","fields":{"message":"Error in PostgreSQL connection: Error { kind: Db, cause: Some(DbError { severity: \"FATAL\", parsed_severity: Some(Fatal), code: SqlState(E57P01), message: \"terminating connection due to administrator command\", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some(\"postgres.c\"), line: Some(3232), routine: Some(\"ProcessInterrupts\") }) }"},"target":"quaint::connector::postgres::native"}
prisma:engines binaries to download query-engine, schema-engine +1493ms
prisma:get-platform Found distro info:
{
  "targetDistro": "debian",
  "familyDistro": "debian",
  "originalDistro": "ubuntu"
} +26ms
prisma:get-platform Command "uname -m" successfully returned "x86_64
" +43ms
prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu") +0ms
prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.3 +4ms
prisma:get-platform The parsed libssl version is: 3.0.x +3ms
prisma:fetch-engine:env Using env var PRISMA_QUERY_ENGINE_BINARY for binary query-engine, which points to /home/rnl/.cache/prisma/binaries/cli/5.22.0/605197351a3c8bdd595af2d2a9bc3025bca48ea2/prisma-query-engine-linux-static-x64 +1ms
prisma:fetch-engine:env Using env var PRISMA_SCHEMA_ENGINE_BINARY for binary schema-engine, which points to /home/rnl/.cache/prisma/binaries/cli/5.22.0/605197351a3c8bdd595af2d2a9bc3025bca48ea2/prisma-schema-engine-linux-static-x64 +0ms
prisma:getSchema prismaConfig {
  "packagePath": "/home/rnl/cm_go/package.json"
} +1956ms
prisma:getSchema Checking existence of /home/rnl/cm_go/schema.prisma +0ms
prisma:getSchema Reading schema from single file /home/rnl/cm_go/schema.prisma +0ms
prisma:loadEnv project root found at /home/rnl/cm_go/package.json +6ms
prisma:getSchema prismaConfig {
  "packagePath": "/home/rnl/cm_go/package.json"
} +7ms
prisma:tryLoadEnv Environment variables loaded from /home/rnl/cm_go/.env +7ms
prisma:getConfig Using getConfig Wasm +19ms
prisma:getConfig config data retrieved without errors in getConfig Wasm +44ms
prisma:get-platform Found distro info:
{
  "targetDistro": "debian",
  "familyDistro": "debian",
  "originalDistro": "ubuntu"
} +4ms
prisma:get-platform Command "uname -m" successfully returned "x86_64
" +31ms
prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu") +1ms
prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.3 +4ms
prisma:get-platform The parsed libssl version is: 3.0.x +0ms
prisma:loadEnv project root found at /home/rnl/cm_go/package.json +2ms
prisma:getSchema prismaConfig {
  "packagePath": "/home/rnl/cm_go/package.json"
} +3ms
prisma:tryLoadEnv Environment variables loaded from /home/rnl/cm_go/.env +0ms
Environment variables loaded from .env
prisma:getSchema Reading schema from single file /home/rnl/cm_go/schema.prisma +16ms
Prisma schema loaded from schema.prisma
prisma:getSchema Reading schema from single file /home/rnl/cm_go/schema.prisma +7ms
prisma:getConfig Using getConfig Wasm +11ms
prisma:getConfig config data retrieved without errors in getConfig Wasm +33ms
Datasource "db": PostgreSQL database "clustermanager", schema "public" at "0.0.0.0:5433"
prisma:getSchema Reading schema from single file /home/rnl/cm_go/schema.prisma +32ms
prisma:getConfig Using getConfig Wasm +17ms
prisma:getConfig config data retrieved without errors in getConfig Wasm +10ms
prisma:fetch-engine:env Using env var PRISMA_SCHEMA_ENGINE_BINARY for binary schema-engine, which points to /home/rnl/.cache/prisma/binaries/cli/5.22.0/605197351a3c8bdd595af2d2a9bc3025bca48ea2/prisma-schema-engine-linux-static-x64 +10ms
prisma:getSchema Reading schema from single file /home/rnl/cm_go/schema.prisma +429ms
prisma:fetch-engine:env Using env var PRISMA_SCHEMA_ENGINE_BINARY for binary schema-engine, which points to /home/rnl/.cache/prisma/binaries/cli/5.22.0/605197351a3c8bdd595af2d2a9bc3025bca48ea2/prisma-schema-engine-linux-static-x64 +7ms
prisma:schemaEngine:rpc starting Schema engine with binary: /home/rnl/.cache/prisma/binaries/cli/5.22.0/605197351a3c8bdd595af2d2a9bc3025bca48ea2/prisma-schema-engine-linux-static-x64 +0ms
prisma:getSchema Reading schema from single file /home/rnl/cm_go/schema.prisma +1ms
prisma:getConfig Using getConfig Wasm +13ms
prisma:getConfig config data retrieved without errors in getConfig Wasm +25ms
prisma:schemaEngine:rpc SENDING RPC CALL {"id":1,"jsonrpc":"2.0","method":"schemaPush","params":{"force":false,"schema":{"files":[{"path":"/home/rnl/cm_go/schema.prisma","content":"generator db {\n  provider = \"go run github.com/steebchen/prisma-client-go\"\n}\n\ndatasource db {\n  provider = \"postgresql\"\n  url      = env(\"DATABASE_POSTGRES_WRITE_URL\")\n}\n\n//\n// CLUSTER MANAGER\n// \nmodel Cluster {\n  id           String   @id @unique @default(cuid())\n  createdAt    DateTime @default(now()) @db.Timestamp(6)\n  updatedAt    DateTime @default(now()) @updatedAt @db.Timestamp(6)\n  displayName  String   @unique\n  isRunning    Boolean  @default(false)\n  description  String?\n  System__fk__ String?\n  System       System?  @relation(fields: [System__fk__], references: [id])\n}\n\nmodel System {\n  id                  String             @id @unique @default(cuid())\n  createdAt           DateTime           @default(now()) @db.Timestamp(6)\n  updatedAt           DateTime           @default(now()) @updatedAt @db.Timestamp(6)\n  os                  String?\n  version             String?\n  host                String\n  port                Int\n  username            String\n  password            String?\n  privateKey          String?\n  haveAuthMethod      SYSTEM_AUTH_METHOD @default(PASSWORD)\n  pluginPath          String\n  containerPluginPath String\n  Cluster             Cluster[]\n  Container           Container[]\n}\n\nmodel Container {\n  id                String       @id @unique @default(cuid())\n  createdAt         DateTime     @default(now()) @db.Timestamp(6)\n  updatedAt         DateTime     @default(now()) @updatedAt @db.Timestamp(6)\n  image             String\n  tag               String\n  replica           Int?\n  pluginPath        String\n  // vsCodeLink        String\n  port              Int?\n  network           String?\n  Environment__fk__ String?\n  Environment       Environment? @relation(fields: [Environment__fk__], references: [id])\n  System__fk__      String?\n  System            System?      @relation(fields: [System__fk__], references: [id])\n}\n\nmodel Environment {\n  id        String      @id @unique @default(cuid())\n  createdAt DateTime    @default(now()) @db.Timestamp(6)\n  updatedAt DateTime    @default(now()) @updatedAt @db.Timestamp(6)\n  variables Json\n  Container Container[]\n}\n\nmodel ResourceLimits {\n  id        String   @id @unique @default(cuid())\n  createdAt DateTime @default(now()) @db.Timestamp(6)\n  updatedAt DateTime @default(now()) @updatedAt @db.Timestamp(6)\n  cpu       String\n  memory    String\n}\n\nmodel Type {\n  id          String   @id @unique @default(cuid())\n  createdAt   DateTime @default(now()) @db.Timestamp(6)\n  updatedAt   DateTime @default(now()) @updatedAt @db.Timestamp(6)\n  displayName String   @unique\n  description String\n}\n\nenum SYSTEM_AUTH_METHOD {\n  PASSWORD\n  PRIVATE_KEY\n}\n\n//\n// SIP\n// \nmodel Service {\n  id          String        @id @default(cuid())\n  createdAt   DateTime      @default(now())\n  updatedAt   DateTime      @updatedAt\n  displayName String\n  address     String\n  port        Int\n  metadata    Json?\n  HealthCheck HealthCheck[]\n  Tags        Tag[]\n  ServiceLog  ServiceLog[]\n}\n\nmodel Tag {\n  id            String  @id @default(cuid())\n  displayName   String\n  Service__fk__ String\n  Service       Service @relation(fields: [Service__fk__], references: [id])\n}\n\nmodel HealthCheck {\n  id            String    @id @default(cuid())\n  createdAt     DateTime  @default(now())\n  updatedAt     DateTime  @updatedAt\n  httpUrl       String?\n  interval      String?\n  timeout       String?\n  lastStatus    String?\n  lastChecked   DateTime?\n  Service__fk__ String    @unique @default(cuid())\n  Service       Service   @relation(fields: [Service__fk__], references: [id])\n}\n\nmodel ServiceLog {\n  id            String   @id @default(cuid())\n  createdAt     DateTime @default(now())\n  updatedAt     DateTime @updatedAt\n  message       String\n  Service__fk__ String\n  service       Service  @relation(fields: [Service__fk__], references: [id])\n}\n"}]}}} +51ms
prisma:schemaEngine:stderr {"timestamp":"2024-12-26T07:17:58.999010449Z","level":"INFO","fields":{"message":"Starting schema engine RPC server","git_hash":"605197351a3c8bdd595af2d2a9bc3025bca48ea2"},"target":"schema_engine"} +17ms

The database is already in sync with the Prisma schema.

Running generate... (Use --skip-generate to skip the generators)
prisma:getSchema Reading schema from single file /home/rnl/cm_go/schema.prisma +519ms
prisma:getConfig Using getConfig Wasm +2ms
prisma:getConfig config data retrieved without errors in getConfig Wasm +3ms
prisma:getDMMF Using getDmmf Wasm +0ms
prisma:getDMMF Using given datamodel +1ms
prisma:getDMMF dmmf data retrieved without errors in getDmmf Wasm +479ms
prisma:GeneratorProcess child exited with code 1 on signal null +2425ms
Error: GeneratorError: Generator "go run github.com/steebchen/prisma-client-go" failed:


    at ChildProcess.<anonymous> (/snapshot/node_modules/prisma/build/index.js:314:1731)
    at ChildProcess.emit (node:events:537:28)
    at ChildProcess._handle.onexit (node:internal/child_process:291:12)
panic: could not run [db push]: exit status 1

goroutine 1 [running]:
main.main()
	/home/rnl/go/pkg/mod/github.com/steebchen/[email protected]/main.go:38 +0x665
exit status 2
rnl@vmi2298266:~/cm_go$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant