Git Product home page Git Product logo

Comments (13)

xirixiz avatar xirixiz commented on July 19, 2024

Could you share the logfiles please? Thanks!

from dsmr-reader-docker.

daansan avatar daansan commented on July 19, 2024

Which logfiles would you want to see?

from dsmr-reader-docker.

xirixiz avatar xirixiz commented on July 19, 2024

/tmp/supervisord.log
/var/log/nginx/error.log

or maybe docker logs -f

from dsmr-reader-docker.

daansan avatar daansan commented on July 19, 2024

/tmp/supervisord.log : https://pastebin.com/tQSZnDbj
/var/log/nginx/error.log : empty file
docker logs -f dsmr: https://pastebin.com/3NgmmjvG

from dsmr-reader-docker.

daansan avatar daansan commented on July 19, 2024

fyi: restarted the docker container and copied the logs post-restart

from dsmr-reader-docker.

xirixiz avatar xirixiz commented on July 19, 2024

Thanks! The process seems to be running fine, however I noticed custom_logging being set. Can you provide the docker-compose content or docker run command you're using?

from dsmr-reader-docker.

daansan avatar daansan commented on July 19, 2024

Below are the services within my docker-compose file I use for DSMR.. Currently i'm exposing postgres to my local network but I previously used docker dependencies (commented out). That also worked fine.

When I go to the console of the DSMR container and invoke curl localhost:80 this also gives me the same 502 error

  dsmrdb:
    container_name: dsmrdb
    image: postgres:10.5-alpine
    restart: always
    ports:
      - "5432:5432"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ${DOCKERDIR}/docker/dsmrdb:/var/lib/postgresql/data
    environment:
      - TZ=${TZ}
      - POSTGRES_USER=dsmrreader
      - POSTGRES_PASSWORD=dsmrreader
      - POSTGRES_DB=dsmrreader

  dsmr:
    container_name: dsmr
    image: xirixiz/dsmr-reader-docker
#    depends_on:
#      - dsmrdb
#    links:
#      - dsmrdb
#    networks:
#      - dsmr
    restart: always
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ${DOCKERDIR}/docker/dsmr_backups:/dsmr/backups
    environment:
      - TZ=${TZ}
      - DSMR_LOGLEVEL=WARNING
      - DB_HOST=192.168.6.220
      - DSMR_USER=admin
      - DSMR_EMAIL=root@localhost
      - DSMR_PASSWORD=admin
      - VIRTUAL_HOST=localhost
    ports:
      - 2506:80
      - 2507:443

from dsmr-reader-docker.

xirixiz avatar xirixiz commented on July 19, 2024

I`m missing the device, and maybe the loglevel isn't allowed, I should make a verification on it. However, the below config should work, well if you're using /dev/ttyUSB0, otherwise you have to change that. Could you please test the below compose file?

I thinks it's the device that's missing, a loglevel issue, or the db_host config setup.

  dsmrdb:
    image: postgres:10.5-alpine
    container_name: dsmrdb
    network_mode: bridge
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ${DOCKERDIR}/docker/dsmrdb:/var/lib/postgresql/data
    restart: always
    environment:
      - TZ=Europe/Amsterdam
      - POSTGRES_USER=dsmrreader
      - POSTGRES_PASSWORD=dsmrreader
      - POSTGRES_DB=dsmrreader

  dsmr:
    image: xirixiz/dsmr-reader-docker
    container_name: dsmr
    network_mode: bridge
    depends_on:
      - dsmrdb
    cap_add:
      - NET_ADMIN
    links:
      - dsmrdb
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ${DOCKERDIR}/docker/dsmr_backups:/dsmr/backups
    restart: always
    environment:
      - TZ=Europe/Amsterdam
      - DSMR_LOGLEVEL=DEBUG
      - DB_HOST=dsmrdb
      - DSMR_USER=admin
      - DSMR_EMAIL=root@localhost
      - DSMR_PASSWORD=admin
      - VIRTUAL_HOST=localhost
    ports:
      - 2506:80
      - 2507:443
    devices:
      - /dev/ttyUSB0:/dev/ttyUSB0

from dsmr-reader-docker.

daansan avatar daansan commented on July 19, 2024

do I need the device? I want to use a remote logger on a Raspberry Pi to feed the data to my dsmr-reader on my server, that is why I left it out.. The cable as such is also not connected to this server

from dsmr-reader-docker.

xirixiz avatar xirixiz commented on July 19, 2024

Ah, ok, then you won't need it indeed.

from dsmr-reader-docker.

daansan avatar daansan commented on July 19, 2024

Jus tested below config and still get the 502 bad gateway error.

i believe the only difference is the device and nothing else. Is the device required for the docker image to work or not?

dsmrdb:
   container_name: dsmrdb
   image: postgres:10.5-alpine
   restart: always
   ports:
     - "5432:5432"
   networks:
     - dsmr
   volumes:
     - /etc/localtime:/etc/localtime:ro
     - ${DOCKERDIR}/docker/dsmrdb:/var/lib/postgresql/data
   environment:
     - TZ=Europe/Amsterdam
     - POSTGRES_USER=dsmrreader
     - POSTGRES_PASSWORD=dsmrreader
     - POSTGRES_DB=dsmrreader

 dsmr:
   container_name: dsmr
   image: xirixiz/dsmr-reader-docker
   depends_on:
     - dsmrdb
   links:
     - dsmrdb
   networks:
     - dsmr
   cap_add:
     - NET_ADMIN
   restart: always
   volumes:
     - /etc/localtime:/etc/localtime:ro
     - ${DOCKERDIR}/docker/dsmr_backups:/dsmr/backups
   environment:
     - TZ=Europe/Amsterdam
     - DSMR_LOGLEVEL=DEBUG
     - DB_HOST=dsmrdb
     - DSMR_USER=admin
     - DSMR_EMAIL=root@localhost
     - DSMR_PASSWORD=admin
     - VIRTUAL_HOST=localhost
   ports:
     - 2506:80
     - 2507:443

networks:
 dsmr:
   driver: bridge

from dsmr-reader-docker.

xirixiz avatar xirixiz commented on July 19, 2024

I think so when looking at the code for Docker as well as DSMR Reader. You could mount just a device as /dev/ttyUSB0 and give it a try ofcourse.

from dsmr-reader-docker.

daansan avatar daansan commented on July 19, 2024

I can make it work by giving 'others' write access to the sock file:
chmod 777 /var/tmp/gunicorn--dsmr_webinterface.socket

However, when I reboot, the write flag is removed again, probably because the /var/tmp folder isn't mounted as a volume.

My docker does not run as the root user on my host, on another installation where I do run docker as 'root' on the host, I notice that the o=w flag always is enabled by default and the dsmr dashboard as such will be working.

Would you have any clue why in my installation o=w is automatically disabled for the sock file?

Thanks.

from dsmr-reader-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.