Failed to execute 'text' on 'Response': body stream already read #490

Closed
opened 2026-04-05 16:16:34 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @ysharoiko on 7/24/2025

Using podman-compose

docker-compose.yml

version: "3"

services:
  postgresus:
    container_name: postgresus
    image: rostislavdugin/postgresus:latest
    ports:
      - "4005:4005"
    volumes:
      - ./postgresus-data:/postgresus-data
    depends_on:
      postgresus-db:
        condition: service_healthy
    restart: unless-stopped

  postgresus-db:
    container_name: postgresus-db
    image: postgres:15
    # we use default values, but do not expose
    # PostgreSQL ports so it is safe
    environment:
      - POSTGRES_DB=postgresus
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=Q1234567
    volumes:
      - ./pgdata:/var/lib/postgresql/data
    command: -p 5437
    shm_size: 10gb
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres -d postgresus -p 5437"]
      interval: 5s
      timeout: 5s
      retries: 5
    restart: unless-stopped

export PODMAN_RUNTIME=/usr/bin/runc
podman-compose up -d

Added 1st database - all is good
Added 2nd database - Got error trying to test connection to the database. Database is available (have a connection with dbeaver)

In browser alert
Failed to execute 'text' on 'Response': body stream already read

in browser console

index-bRh3PA_R.js:51  POST http://192.168.1.46:4005/api/v1/databases/test-connection-direct 500 (Internal Server Error)
oo @ index-bRh3PA_R.js:51
fetchPostJson @ index-bRh3PA_R.js:51
testDatabaseConnectionDirect @ index-bRh3PA_R.js:418
E @ index-bRh3PA_R.js:418
onClick @ index-bRh3PA_R.js:418
(anonymous) @ index-bRh3PA_R.js:200
Zx @ index-bRh3PA_R.js:48
(anonymous) @ index-bRh3PA_R.js:48
zi @ index-bRh3PA_R.js:48
Ug @ index-bRh3PA_R.js:48
ah @ index-bRh3PA_R.js:49
jI @ index-bRh3PA_R.js:49

in terminal

[postgresus]    |
[postgresus]    |
[postgresus]    | 2025/07/24 08:49:43 [Recovery] 2025/07/24 - 08:49:43 panic recovered:
[postgresus]    | invalid postgresql version: 12
[postgresus]    | /app/internal/util/tools/enums.go:38 (0x786a3a)
[postgresus]    | /app/internal/features/databases/databases/postgresql/model.go:133 (0xc40e79)
[postgresus]    | /app/internal/features/databases/databases/postgresql/model.go:98 (0xc40a67)
[postgresus]    | /app/internal/features/databases/databases/postgresql/model.go:65 (0xc40829)
[postgresus]    | /app/internal/features/databases/model.go:53 (0xf324b3)
[postgresus]    | /app/internal/features/databases/service.go:179 (0xf31b1b)
[postgresus]    | /app/internal/features/databases/controller.go:282 (0xf31b08)
[postgresus]    | /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x9e368e)
[postgresus]    | /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/recovery.go:102 (0x9e367b)
[postgresus]    | /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x9e27c4)
[postgresus]    | /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/logger.go:249 (0x9e27ab)
[postgresus]    | /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x9e1bb1)
[postgresus]    | /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:633 (0x9e1620)
[postgresus]    | /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:589 (0x9e1151)
[postgresus]    | /usr/local/go/src/net/http/server.go:3210 (0x77222d)
[postgresus]    | /usr/local/go/src/net/http/server.go:2092 (0x75174f)
[postgresus]    | /usr/local/go/src/runtime/asm_amd64.s:1700 (0x477b40)
*Originally created by @ysharoiko on 7/24/2025* Using podman-compose docker-compose.yml ``` version: "3" services: postgresus: container_name: postgresus image: rostislavdugin/postgresus:latest ports: - "4005:4005" volumes: - ./postgresus-data:/postgresus-data depends_on: postgresus-db: condition: service_healthy restart: unless-stopped postgresus-db: container_name: postgresus-db image: postgres:15 # we use default values, but do not expose # PostgreSQL ports so it is safe environment: - POSTGRES_DB=postgresus - POSTGRES_USER=postgres - POSTGRES_PASSWORD=Q1234567 volumes: - ./pgdata:/var/lib/postgresql/data command: -p 5437 shm_size: 10gb healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d postgresus -p 5437"] interval: 5s timeout: 5s retries: 5 restart: unless-stopped ``` export PODMAN_RUNTIME=/usr/bin/runc podman-compose up -d Added 1st database - all is good Added 2nd database - Got error trying to test connection to the database. Database is available (have a connection with dbeaver) In browser alert `Failed to execute 'text' on 'Response': body stream already read` in browser console ``` index-bRh3PA_R.js:51 POST http://192.168.1.46:4005/api/v1/databases/test-connection-direct 500 (Internal Server Error) oo @ index-bRh3PA_R.js:51 fetchPostJson @ index-bRh3PA_R.js:51 testDatabaseConnectionDirect @ index-bRh3PA_R.js:418 E @ index-bRh3PA_R.js:418 onClick @ index-bRh3PA_R.js:418 (anonymous) @ index-bRh3PA_R.js:200 Zx @ index-bRh3PA_R.js:48 (anonymous) @ index-bRh3PA_R.js:48 zi @ index-bRh3PA_R.js:48 Ug @ index-bRh3PA_R.js:48 ah @ index-bRh3PA_R.js:49 jI @ index-bRh3PA_R.js:49 ``` in terminal ``` [postgresus] | [postgresus] | [postgresus] | 2025/07/24 08:49:43 [Recovery] 2025/07/24 - 08:49:43 panic recovered: [postgresus] | invalid postgresql version: 12 [postgresus] | /app/internal/util/tools/enums.go:38 (0x786a3a) [postgresus] | /app/internal/features/databases/databases/postgresql/model.go:133 (0xc40e79) [postgresus] | /app/internal/features/databases/databases/postgresql/model.go:98 (0xc40a67) [postgresus] | /app/internal/features/databases/databases/postgresql/model.go:65 (0xc40829) [postgresus] | /app/internal/features/databases/model.go:53 (0xf324b3) [postgresus] | /app/internal/features/databases/service.go:179 (0xf31b1b) [postgresus] | /app/internal/features/databases/controller.go:282 (0xf31b08) [postgresus] | /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x9e368e) [postgresus] | /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/recovery.go:102 (0x9e367b) [postgresus] | /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x9e27c4) [postgresus] | /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/logger.go:249 (0x9e27ab) [postgresus] | /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x9e1bb1) [postgresus] | /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:633 (0x9e1620) [postgresus] | /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:589 (0x9e1151) [postgresus] | /usr/local/go/src/net/http/server.go:3210 (0x77222d) [postgresus] | /usr/local/go/src/net/http/server.go:2092 (0x75174f) [postgresus] | /usr/local/go/src/runtime/asm_amd64.s:1700 (0x477b40) ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/databasus#490