Comments (13)
Could you share the logfiles please? Thanks!
from dsmr-reader-docker.
Which logfiles would you want to see?
from dsmr-reader-docker.
/tmp/supervisord.log
/var/log/nginx/error.log
or maybe docker logs -f
from dsmr-reader-docker.
/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.
fyi: restarted the docker container and copied the logs post-restart
from dsmr-reader-docker.
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.
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.
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.
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.
Ah, ok, then you won't need it indeed.
from dsmr-reader-docker.
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.
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.
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)
- NGINX port incorrect after restart when using NGINX_LISTEN_PORT HOT 2
- Container does not start: 20-set-app-defaults: line 213: syntax error near unexpected token `}' HOT 2
- ENABLE_NGINX_SSL does not work anymore HOT 4
- Database is not restoring HOT 1
- Can't connect to a postgres DB using encryption HOT 1
- Documentation request HOT 1
- Mqtt stopt met werken HOT 21
- Wrong media type for manifest HOT 1
- Upgrade the PostgreSQL client portion to version 15 in the docker-image HOT 3
- pg_dump: error :aborting because of server version mismatch HOT 11
- Missing docs / install & configure HOT 4
- Postgres update from 10 to 15 failed (with fix for: User "dsmrreader" does not have a valid SCRAM secret) HOT 6
- Docker container in warning status, logs with errors HOT 7
- SyntaxWarning: invalid escape sequence '\d' HOT 6
- Webinterface not starting on 2024.02.03 HOT 8
- Update path HOT 6
- Postgresql client Upgrade (pg_dump) HOT 47
- Support for docker secrets HOT 16
- MQTT werkt niet meer "Publish_split_topic_meter_statistics() failed: nextval: reached maximum" HOT 3
- DSMR-Reader losing conenction to datalogger since last update (:latest) HOT 48
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dsmr-reader-docker.