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

Fail to setup/start for PostgreSQL database #1039

Closed
gdm257 opened this issue Aug 23, 2024 · 3 comments
Closed

Fail to setup/start for PostgreSQL database #1039

gdm257 opened this issue Aug 23, 2024 · 3 comments

Comments

@gdm257
Copy link

gdm257 commented Aug 23, 2024

Environment

  • Linux: Docker
  • Warpgate: 0.10.1
  • PostgreSQL Server: 14

Problem

Fail to setup/start warpgate with PostgreSQL database. I'm sure that postgres works well and other applications depending on postgres still work. Any idea for this problem?

docker-compose file:

services:
  warpgate:
    container_name: warpgate
    image: ghcr.io/warp-tech/warpgate:${VERSION:-latest}
    networks:
      - stack
      - services-network
    volumes:
      # you should generate config first
      # docker compose run --rm warpgate setup
      - ./data/warpgate:/data
networks:
  stack: {}
  services-network:
    external: true

Setup log

$ docker compose run --rm warpgate setup --database-url postgres://warpgate:xxxxxxxxxxxx@postgres:5432/warpgate?sslmode=disable
22:53:57  INFO Welcome to Warpgate 0.10.1
22:53:57  INFO Let's do some basic setup first.
22:53:57  INFO The new config will be written in /data/warpgate.yaml.
✔ Do you want to record user sessions? · yes
✔ Set a password for the Warpgate admin user · ********
22:54:24  INFO Generated configuration:
---
sso_providers: []
recordings:
  enable: true
  path: /data/recordings
external_host: ~
database_url: "postgres://warpgate:xxxxxxxxxxx@postgres:5432/warpgate?sslmode=disable"
ssh:
  enable: true
  listen: "0.0.0.0:2222"
  external_port: ~
  keys: /data/ssh-keys
  host_key_verification: prompt
  inactivity_timeout: 5m
http:
  enable: true
  listen: "0.0.0.0:8888"
  external_port: ~
  certificate: /data/tls.certificate.pem
  key: /data/tls.key.pem
  trust_x_forwarded_headers: false
  session_max_age: 30m
  cookie_max_age: 1day
mysql:
  enable: true
  listen: "0.0.0.0:33306"
  external_port: ~
  certificate: /data/tls.certificate.pem
  key: /data/tls.key.pem
log:
  retention: 7days
  send_to: ~
config_provider: database

22:54:24  INFO Saved into /data/warpgate.yaml
22:54:24  INFO Using config: "/data/warpgate.yaml"
22:54:24 ERROR Fatal error error=Execution Error: error returned from database: current transaction is aborted, commands ignored until end of transaction block

Caused by:
    0: error returned from database: current transaction is aborted, commands ignored until end of transaction block
    1: error returned from database: current transaction is aborted, commands ignored until end of transaction block
    2: current transaction is aborted, commands ignored until end of transaction block

Startup log

$ docker stack deploy -c warpgate/compose.yaml warpgate
$ docker logs warpgate_warpgate.1.yjwf4qex89ds28afpzha3ep77
23.08.2024 23:13:21  INFO warpgate::commands::run: Warpgate version=0.10.2
23.08.2024 23:13:21  INFO warpgate::config: Using config: "/data/warpgate.yaml"
23.08.2024 23:13:21 ERROR warpgate: Fatal error error=Execution Error: error returned from database: current transaction is aborted, commands ignored until end of transaction block

Caused by:
    0: error returned from database: current transaction is aborted, commands ignored until end of transaction block
    1: error returned from database: current transaction is aborted, commands ignored until end of transaction block
    2: current transaction is aborted, commands ignored until end of transaction block
@gdm257
Copy link
Author

gdm257 commented Aug 23, 2024

It seems some compatibility problems #982 for postgres

@vjmax
Copy link

vjmax commented Oct 18, 2024

We are Facing same issue in version=0.11.0 is this fixed ?

@johannwagner
Copy link

I experienced the same issues on 0.11.0.
Postgres logs errors about the manual query done in a migration:
https://github.com/warp-tech/warpgate/blob/main/warpgate-db-migrations/src/m00001_create_ticket.rs#L49

@Eugeny Eugeny closed this as completed in 41d3158 Nov 28, 2024
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

3 participants