msgbyte / tianji

Tianji: Insight into everything, Website Analytics + Uptime Monitor + Server Status. not only another GA alternatives
https://tianji.msgbyte.com/
Apache License 2.0
1.62k stars 93 forks source link

Postgres - FATAL: role "-d" does not exist #128

Open EthraZa opened 2 weeks ago

EthraZa commented 2 weeks ago

I have installed Tianji within CasaOS (Docker) and changed Tianji version to latest and postgres to 15-alpine (from 15.4-alpine). Everything seens to be working ok, but I see lots of the same error on postgres. 1- Is it something needing a fix? How do I do? 2- Does Tianji support MySQL or MariaDB?

Postgres log:

2024-11-14 18:35:18.374 UTC [94872] FATAL:  role "-d" does not exist
2024-11-14 18:35:22.163 UTC [27] LOG:  checkpoint starting: time
2024-11-14 18:35:23.584 UTC [94879] FATAL:  role "-d" does not exist
2024-11-14 18:35:25.805 UTC [27] LOG:  checkpoint complete: wrote 36 buffers (0.2%); 0 WAL file(s) added, 0 removed, 0 recycled; write=3.582 s, sync=0.034 s, total=3.643 s; sync files=14, longest=0.009 s, average=0.003 s; distance=215 kB, estimate=251 kB
2024-11-14 18:35:28.824 UTC [94886] FATAL:  role "-d" does not exist
2024-11-14 18:35:34.063 UTC [94893] FATAL:  role "-d" does not exist
2024-11-14 18:35:39.236 UTC [94901] FATAL:  role "-d" does not exist
2024-11-14 18:35:44.449 UTC [94908] FATAL:  role "-d" does not exist
2024-11-14 18:35:49.690 UTC [94915] FATAL:  role "-d" does not exist
2024-11-14 18:35:54.935 UTC [94922] FATAL:  role "-d" does not exist
2024-11-14 18:36:00.173 UTC [94930] FATAL:  role "-d" does not exist
2024-11-14 18:36:05.354 UTC [94937] FATAL:  role "-d" does not exist
2024-11-14 18:36:10.554 UTC [94944] FATAL:  role "-d" does not exist
2024-11-14 18:36:15.784 UTC [94952] FATAL:  role "-d" does not exist
2024-11-14 18:36:21.047 UTC [94960] FATAL:  role "-d" does not exist
2024-11-14 18:36:26.255 UTC [94967] FATAL:  role "-d" does not exist
moonrailgun commented 1 day ago

did you mind show your docker compose config?

i think somthing is wrong. about role

EthraZa commented 1 day ago

YML exported by CasaOS:

name: big-bear-tianji
services:
  big-bear-tianji:
    cpu_shares: 90
    command: []
    container_name: big-bear-tianji
    depends_on:
      big-bear-tianji-db:
        condition: service_started
        required: true
    deploy:
      resources:
        limits:
          memory: 1858M
    environment:
      - ALLOW_OPENAPI=true
      - ALLOW_REGISTER=false
      - DATABASE_URL=postgresql://tianji-user:xxx@big-bear-tianji-db:5432/tianji
      - JWT_SECRET=xxx
    hostname: big-bear-tianji
    image: moonrailgun/tianji:latest
    labels:
      icon: https://cdn.jsdelivr.net/gh/bigbeartechworld/big-bear-casaos/Apps/tianji/logo.png
    ports:
      - mode: ingress
        target: 12345
        published: "12345"
        protocol: tcp
    restart: unless-stopped
    volumes: []
    devices: []
    cap_add: []
    networks:
      - big_bear_tianji_network
    privileged: false
  big-bear-tianji-db:
    cpu_shares: 90
    command: []
    container_name: big-bear-tianji-db
    deploy:
      resources:
        limits:
          memory: 1858M
    environment:
      - POSTGRES_DB=tianji
      - POSTGRES_PASSWORD=xxx
      - POSTGRES_USER=tianji-user
    hostname: big-bear-tianji-db
    healthcheck:
      test:
        - CMD-SHELL
        - "pg_isready -U  -d "
      timeout: 5s
      interval: 5s
      retries: 5
    image: postgres:15-alpine
    labels:
      icon: https://cdn.jsdelivr.net/gh/bigbeartechworld/big-bear-casaos/Apps/tianji/logo.png
    restart: always
    volumes:
      - type: bind
        source: /DATA/AppData/big-bear-tianji/pgdata
        target: /var/lib/postgresql/data
        bind:
          create_host_path: true
    ports: []
    devices: []
    cap_add: []
    networks:
      - big_bear_tianji_network
    privileged: false
networks:
  big_bear_tianji_network:
    name: big-bear-tianji_big_bear_tianji_network
    driver: bridge
x-casaos:
  architectures:
    - amd64
    - arm64
  author: BigBearTechWorld
  category: BigBearCasaOS
  description:
    en_us: During our observations of the website. We often need to use multiple
      applications together. For example, we need analysis tools such as
      GA/umami to check pv/uv and the number of visits to each page, we need an
      uptime monitor to check the network quality and connectivity of the
      server, and we need to use prometheus to obtain the status reported by the
      server to check the quality of the server. In addition, if we develop an
      application that allows open source deployment, we often need a telemetry
      system to help us collect the simplest information about other people's
      deployment situations. I think these tools should serve the same purpose,
      so is there an application that can integrate these common needs in a
      lightweight way? After all, most of the time we don't need very
      professional and in-depth functions. But in order to achieve comprehensive
      monitoring, I need to install so many services. It's good to specialize in
      one thing, if we are experts in related abilities we need such specialized
      tools. But for most users who only have lightweight needs, an All-in-One
      application will be more convenient and easier to use.
  developer: moonrailgun
  hostname: ""
  icon: https://cdn.jsdelivr.net/gh/bigbeartechworld/big-bear-casaos/Apps/tianji/logo.png
  index: /
  is_uncontrolled: false
  main: big-bear-tianji
  port_map: "12345"
  scheme: http
  store_app_id: big-bear-tianji
  tagline:
    en_us: "Tianji: Insight into everything, Website Analytics + Uptime Monitor +
      Server Status. not only another GA alternatives"
  thumbnail: ""
  title:
    custom: ""
    en_us: Tianji
moonrailgun commented 1 day ago

image

its part looks has problem. idk.