xirixiz / dsmr-reader-docker

DSMR Reader in Docker.
https://hub.docker.com/r/xirixiz/dsmr-reader-docker
112 stars 33 forks source link

password authentication failed, not have a valid SCRAM secret. #321

Closed joeph84 closed 1 year ago

joeph84 commented 1 year ago

Support guidelines

I've found an issue and checked that ...

Description

Hi, Thanks for all your great work. I was using it for a long time and wanted to do an update today. I have backup up my database, updated the docker-compose file to match the one you shared, and tried restarting the application. Unfortunately I get the error message "User "dsmrreader" does not have a valid SCRAM secret." I have tried tweaking around, but was not able to resolve the issue myself. I can manually log into the database by using: docker exec -t dsmrdb psql -d dsmrreader -U dsmrreader

I use the following:

image

Expected behaviour

Application to start

Actual behaviour

Application not starting

Steps to reproduce

-

Docker info

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Docker Buildx (Docker Inc., v0.7.1-docker)

Server:
 Containers: 3
  Running: 1
  Paused: 0
  Stopped: 2
 Images: 5
 Server Version: 20.10.12
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
 runc version: v1.0.2-0-g52b36a2
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.10.63-v7+
 Operating System: Raspbian GNU/Linux 10 (buster)
 OSType: linux
 Architecture: armv7l
 CPUs: 4
 Total Memory: 923.2MiB
 Name: rpi-meterkast
 ID: 3LOU:UHIW:D3UG:4HKN:BUUD:A3UL:E6KK:WUGP:A3IR:RKJ7:ZP2C:LSLS
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No kernel memory TCP limit support
WARNING: No oom kill disable support
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support

Version

Docker compose

services:
  dsmr:
    cap_add:
    - NET_ADMIN
    container_name: dsmr
    depends_on:
    - dsmrdb
    devices:
    - /dev/ttyUSB0:/dev/ttyUSB0
    environment:
      DJANGO_DATABASE_NAME: xxxxxxxx
      DJANGO_DATABASE_PASSWORD: xxxxxxxx
      DJANGO_DATABASE_USER: xxxxxxxx
      DJANGO_TIME_ZONE: Europe/Amsterdam
      DSMRREADER_ADMIN_PASSWORD: xxxxxxxx
      DSMRREADER_ADMIN_USER: xxxxxxxx
      VIRTUAL_HOST: localhost
    healthcheck:
      interval: 10s
      retries: 10
      test:
      - CMD
      - curl
      - -Lsf
      - http://localhost:80
      - -o
      - /dev/null
      - -w
      - HTTP_%{http_code}
      timeout: 5s
    image: xirixiz/dsmr-reader-docker:latest
    links:
    - dsmrdb
    ports:
    - 7777:80/tcp
    - 7779:443/tcp
    restart: unless-stopped
    volumes:
    - /etc/localtime:/etc/localtime:ro
    - /home/pi/dsmr/dsmr_backups:/dsmr/backups:rw
  dsmrdb:
    container_name: dsmrdb
    environment:
      PG_TZ: Europe/Amsterdam
      POSTGRES_DB: dsmrreader
      POSTGRES_HOST_AUTH_METHOD: password
      POSTGRES_PASSWORD: xxxxxxxx
      POSTGRES_USER: xxxxxxxx
      TZ: Europe/Amsterdam
    healthcheck:
      interval: 10s
      retries: 10
      test:
      - CMD-SHELL
      - pg_isready -U dsmrreader
      timeout: 5s
    image: postgres:14-alpine
    restart: always
    volumes:
    - /etc/localtime:/etc/localtime:ro
    - /home/pi/dsmr/dsmrdb:/var/lib/postgresql/data:rw
version: '3.1'
volumes:
  dsmrdb: {}
  dsmrdb_backups: {}

Container logs

-

Additional info

No response

joeph84 commented 1 year ago

I have upgraded my complete raspberry, docker and docker compose and everything is running fine now. Ticket can be rejected

Thanks for all the good work on this project!

xirixiz commented 1 year ago

Sorry, I have been quiet busy. I wlll respond asap!