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

database not reciving alerts #29

Open
blazinpancakes opened this issue Jan 6, 2025 · 6 comments
Open

database not reciving alerts #29

blazinpancakes opened this issue Jan 6, 2025 · 6 comments

Comments

@blazinpancakes
Copy link

blazinpancakes commented Jan 6, 2025

First of all, wanted to say thank you for this project, I wouldn't be surprised if BI would add something like this or even this as part of the ALPR feature set.

I'm getting ALPR alerts w/ the plate number on BI but after setting up thealert with web request I'm not getting anything populated.

I did change the port from 3000 to 4000 and made sure to make that change on the alert and tried several alerts with plate & memo and got no luck

Attached is my docker compose, I do host a handful of other items, but I don't think that impacted anything.

version: "3.9"

networks:
rustdesk-net:
external: false
nc-net:
external: false

services:
qbittorrent:
image: linuxserver/qbittorrent:latest
container_name: qbittorrent
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- WEBUI_PORT=8090
volumes:
# - /media/downloads:z
- /media/2tb/qbt/config:/config:z
- /media:/media:z
ports:
- 8090:8090
- 6881:6881
- 6881:6881/udp
restart: unless-stopped
plex:
image: linuxserver/plex:latest
container_name: plex
restart: unless-stopped
environment:
- TZ=America/Chicago
- PUID=1000
- PGID=1000
- VERSION=docker
volumes:
- /media:/media:z
- /media/Media/DockerLinks/PlexLinks/config:/config:z
network_mode: host

tautulli:
image: ghcr.io/tautulli/tautulli
container_name: tautulli
restart: unless-stopped
volumes:
- /media/Media/tautulli/config:/config:z
environment:
- TZ=America/Chicago
- PUID=1000
- PGID=1000
ports:
- 8181:8181
homepage:
image: ghcr.io/gethomepage/homepage:latest
container_name: homepage
ports:
- 3030:3000
volumes:
- /media:/media:z
- /media/Media/hompage:/app/config # Make sure your local config directory exists
- /var/run/docker.sock:/var/run/docker.sock # (optional) For docker integration
restart: unless-stopped

homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
volumes:
- /media/Media/homeassistnat/DockerLinks:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
privileged: true
ports:
- 8123:8123

heimdall:
image: lscr.io/linuxserver/heimdall:latest
container_name: heimdall
environment:
- PUID=1000
- PGID=1000
- TZ=America/Chicago
volumes:
- /media/Media/DockerLinks/HeimdallLinks/config:/config
ports:
- 80:80
- 443:443
restart: unless-stopped

palworld-dedicated-server:
#build: .
container_name: palworld-dedicated-server
image: jammsen/palworld-dedicated-server:latest
restart: unless-stopped
ports:
- target: 8211 # Gamerserver port inside of the container
published: 8211 # Gamerserver port on your host
protocol: udp
mode: host
- target: 25575 # RCON port inside of the container
published: 25575 # RCON port on your host
protocol: tcp
mode: host
env_file:
- ./default.env
volumes:
- ./game:/palworld

audiobookshelf:
image: ghcr.io/advplyr/audiobookshelf:latest
ports:
- 13378:80
volumes:
- /media/3rd2tb/audiobookshelf/audiobooks:/audiobooks:z
- /media/3rd2tb/audiobookshelf/podcasts:/podcasts:z
- /media/Media/DockerLinks/audiobookshelf/config:/config:z
- /media/3rd2tb/audiobookshelf/metadata:/metadata:z
environment:
- TZ=America/Chicago
restart: unless-stopped

nessus:
image: tenable/nessus:10.6.1-ubuntu
restart: always
container_name: nessus
environment:
USERNAME: alex
PASSWORD: fakepassowrd
ACTIVATION_CODE: xxxxxxxxxxxxxxxxxxxxxxxxxxxx
ports:
- 8834:8834

valheim:
image: mbround18/valheim:latest
ports:
- 2456:2456/udp
- 2457:2457/udp
- 2458:2458/udp
environment:
PORT: 2456
NAME: "Blazin"
WORLD: "Dedicated"
PASSWORD: "fakepassword"
TZ: "America/Chicago"
PUBLIC: 1
volumes:
- /media:/media:z
- /media/media/DockerLinks/Valheim/saves:/home/steam/.config/unity3d/IronGate/Valheim:z
- /media/media/DockerLinks/Valheim/server:/home/steam/valheim:z

CodeProjectAI:
image: codeproject/ai-server
container_name: codeproject-ai-server-cpu
hostname: codeproject-ai-server
restart: unless-stopped
ports:
- "32168:32168"
environment:
- TZ=America/Toronto
alpr:
image: algertc/alpr-dashboard:latest
restart: unless-stopped
ports:
- "4000:3000" # Change the first port to the port you want to expose
environment:
- NODE_ENV=production
- ADMIN_PASSWORD=fakepassowrd # Change this to a secure password
- DB_PASSWORD=fakepassowrd # Change this to match your postgres password
depends_on:
- db
volumes:
- app-auth:/app/auth
- app-config:/app/config

db:
image: postgres:13
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=fakepassowrd # Change this to a secure password
volumes:
- db-data:/var/lib/postgresql/data:z
- ./schema.sql:/docker-entrypoint-initdb.d/schema.sql:z
- ./migrations.sql:/migrations.sql:z

# Make sure you download the migrations.sql file if you are updating your existing database.
# Place it in the same directory as your docker-compose.yml and schema.sql files. If you changed the user or database name, you will need to plug those values into the command below.
command: >
  bash -c "
    docker-entrypoint.sh postgres &
    until pg_isready; do sleep 1; done;
    psql -U postgres -d postgres -f /migrations.sql;
    wait
  "
ports:
  - "5432:5432"
healthcheck:
  test: ["CMD-SHELL", "pg_isready -U postgres"]
  interval: 10s
  timeout: 5s
  retries: 5

volumes:
db-data:
app-auth:
driver: local
driver_opts:
type: none
o: bind
device: ./auth
app-config:
driver: local
driver_opts:
type: none
o: bind
device: ./config

@algertc
Copy link
Owner

algertc commented Jan 8, 2025

Have you looked at the container logs at all? To troubleshoot we would want to know what it says in there, what it says in the BI logs, and if there are any errors.

If you see "no stream" in BI, try reducing the size and quality of your JPEGS in BI. That fixed it for me.

@mojopolo11
Copy link

mojopolo11 commented Feb 23, 2025

I am having the same issue. Docker log shows password authentication error for user postgres. I have tried fixing it via reinstalling via the updated script, editing the docker compose, & via the web console - (ports are also open) nothing is fixing it. Any suggestions?

025-02-23 08:36:57 app-1 | camera: 'gate1',
2025-02-23 08:36:57 app-1 | timestamp: '2025-02-23T16:36:34.259Z'
2025-02-23 08:36:57 app-1 | }
2025-02-23 08:36:57 db-1 | 2025-02-23 16:36:57.222 GMT [202] FATAL: password authentication failed for user "postgres"
2025-02-23 08:36:57 db-1 | 2025-02-23 16:36:57.222 GMT [202] DETAIL: Password does not match for user "postgres".
2025-02-23 08:36:57 db-1 | Connection matched pg_hba.conf line 99: "host all all all md5"
2025-02-23 08:36:57 app-1 | Error processing request: error: password authentication failed for user "postgres"
2025-02-23 08:36:57 app-1 | at (/app/node_modules/pg-pool/index.js:45:11)
2025-02-23 08:36:57 app-1 | at async p (/app/.next/server/app/api/plate-reads/route.js:1:3600)
2025-02-23 08:36:57 app-1 | at async te.do (/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:18:17826)
2025-02-23 08:36:57 app-1 | at async te.handle (/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:18:22492)
2025-02-23 08:36:57 app-1 | at async doRender (/app/node_modules/next/dist/server/base-server.js:1455:42)
2025-02-23 08:36:57 app-1 | at async responseGenerator (/app/node_modules/next/dist/server/base-server.js:1814:28)
2025-02-23 08:36:57 app-1 | at async NextNodeServer.renderToResponseWithComponentsImpl (/app/node_modules/next/dist/server/base-server.js:1824:28)
2025-02-23 08:36:57 app-1 | at async NextNodeServer.renderPageComponent (/app/node_modules/next/dist/server/base-server.js:2240:24)
2025-02-23 08:36:57 app-1 | at async NextNodeServer.renderToResponseImpl (/app/node_modules/next/dist/server/base-server.js:2278:32) {
2025-02-23 08:36:57 app-1 | length: 104,
2025-02-23 08:36:57 app-1 | severity: 'FATAL',
2025-02-23 08:36:57 app-1 | code: '28P01',
2025-02-23 08:36:57 app-1 | detail: undefined,
2025-02-23 08:36:57 app-1 | hint: undefined,
2025-02-23 08:36:57 app-1 | position: undefined,
2025-02-23 08:36:57 app-1 | internalPosition: undefined,
2025-02-23 08:36:57 app-1 | internalQuery: undefined,
2025-02-23 08:36:57 app-1 | where: undefined,
2025-02-23 08:36:57 app-1 | schema: undefined,
2025-02-23 08:36:57 app-1 | table: undefined,
2025-02-23 08:36:57 app-1 | column: undefined,
2025-02-23 08:36:57 app-1 | dataType: undefined,
2025-02-23 08:36:57 app-1 | constraint: undefined,
2025-02-23 08:36:57 app-1 | file: 'auth.c',
2025-02-23 08:36:57 app-1 | line: '331',
2025-02-23 08:36:57 app-1 | routine: 'auth_failed'
2025-02-23 08:36:57 app-1 | }

@algertc
Copy link
Owner

algertc commented Feb 24, 2025

Changing the password in the compose file won't do anything after it has been created. Those values are only used for first time setup. If you need to change the database password, it has to be done manually with an SQL client. Use the password you first used when setting it up and it should work.

https://stackoverflow.com/questions/12720967/how-can-i-change-a-postgresql-user-password

@mojopolo11
Copy link

mojopolo11 commented Feb 24, 2025

I am deleting the docker container each time and then running a new install using the windows script you provided. I also tried changing the password and saving in the console.

@megablocks
Copy link

I do see No stream in BI and nothing is getting recorded. How do I change size and quality of what is being posted?

@megablocks
Copy link

megablocks commented Feb 26, 2025

container log...```

2025-02-26 11:33:15 app-1  |   camera: 'alpr',
2025-02-26 11:33:15 app-1  |   ALERT_PATH: 'alpr.20250226_110001.1967522.3-1.jpg',
2025-02-26 11:33:15 app-1  |   ALERT_CLIP: '@19332782441441',
2025-02-26 11:33:15 app-1  |   timestamp: '2025-02-26T19:32:57.496Z'
2025-02-26 11:33:15 app-1  | }
2025-02-26 11:33:15 app-1  | Database connection established
2025-02-26 11:33:15 app-1  | [FileStorage] Successfully saved image
2025-02-26 11:33:15 app-1  | Error processing request: error: there is no unique or exclusion constraint matching the ON CONFLICT specification
2025-02-26 11:33:15 app-1  |     at <unknown> (/app/node_modules/pg/lib/client.js:535:17)
2025-02-26 11:33:15 app-1  |     at async p (/app/.next/server/app/api/plate-reads/route.js:1:4464)
2025-02-26 11:33:15 app-1  |     at async te.do (/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:18:17826)
2025-02-26 11:33:15 app-1  |     at async te.handle (/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:18:22492)
2025-02-26 11:33:15 app-1  |     at async doRender (/app/node_modules/next/dist/server/base-server.js:1455:42)
2025-02-26 11:33:15 app-1  |     at async responseGenerator (/app/node_modules/next/dist/server/base-server.js:1814:28)
2025-02-26 11:33:15 app-1  |     at async NextNodeServer.renderToResponseWithComponentsImpl (/app/node_modules/next/dist/server/base-server.js:1824:28)
2025-02-26 11:33:15 app-1  |     at async NextNodeServer.renderPageComponent (/app/node_modules/next/dist/server/base-server.js:2240:24)
2025-02-26 11:33:15 app-1  |     at async NextNodeServer.renderToResponseImpl (/app/node_modules/next/dist/server/base-server.js:2278:32) {
2025-02-26 11:33:15 app-1  |   length: 148,
2025-02-26 11:33:15 app-1  |   severity: 'ERROR',
2025-02-26 11:33:15 app-1  |   code: '42P10',
2025-02-26 11:33:15 app-1  |   detail: undefined,
2025-02-26 11:33:15 app-1  |   hint: undefined,
2025-02-26 11:33:15 app-1  |   position: undefined,
2025-02-26 11:33:15 app-1  |   internalPosition: undefined,
2025-02-26 11:33:15 app-1  |   internalQuery: undefined,
2025-02-26 11:33:15 app-1  |   where: undefined,
2025-02-26 11:33:15 app-1  |   schema: undefined,
2025-02-26 11:33:15 app-1  |   table: undefined,
2025-02-26 11:33:15 app-1  |   column: undefined,
2025-02-26 11:33:15 app-1  |   dataType: undefined,
2025-02-26 11:33:15 app-1  |   constraint: undefined,
2025-02-26 11:33:15 app-1  |   file: 'plancat.c',
2025-02-26 11:33:15 app-1  |   line: '870',
2025-02-26 11:33:15 app-1  |   routine: 'infer_arbiter_indexes'
2025-02-26 11:33:15 app-1  | }

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

4 participants