Closed CablingOptional closed 9 months ago
I'm launching all four containers (nightscout, traefik, mongo, and nightscout-libre-link) via the same docker-compose.yml file, and all four start successfully. I can log in to Nightscout without issue, and the logs show that libre-link is at least able to connect to LibreLinkUp...but always dealing with various issues re: libre-link writing to nightscout.
Just did a docker-compose pull and got the newest version of some of the containers, but issue remains.
Could you post your docker-compose.yml file here? Maybe I can see what's wrong with your setup.
Just make sure to delete all sensitive information first (patient id, tokens, passwords).
` [REDACTED]:~$ more docker-compose.yml version: '3.9'
x-logging: &default-logging options: max-size: '10m' max-file: '5' driver: json-file
services: nightscout: image: nightscout/cgm-remote-monitor:latest environment:
#
TZ: US
API_SECRET: [REDACTED]
ENABLE: careportal sage iage cage iob cob basal upbat devicestatus dbsize cors
SHOW_PLUGINS: careportal sage iob cob dbsize cors ar2
DISPLAY_UNITS: mg/dl
#BRIDGE_USER_NAME: username
#BRIDGE_PASSWORD: password
#BRIDGE_SERVER: EU
AUTH_DEFAULT_ROLES: readable
NIGHT_MODE: off
THEME: colors
TIME_FORMAT: 24
SCALE_Y: linear
AR2_CONE_FACTOR: 0
SHOW_RAWBG: always
DBSIZE_MAX: DISK_SIZE
#BASAL_RENDER: default
BOLUS_RENDER_FORMAT_SMALL: minimal
BOLUS_RENDER_OVER: 1
BG_LOW: 60
BG_TARGET_BOTTOM: 70
BG_TARGET_TOP: 180
BG_HIGH: 200
ALARM_TYPES: simple
ALARM_HIGH: on
ALARM_LOW: on
ALARM_URGENT_HIGH: on
ALARM_URGENT_LOW: on
ALARM_TIMEAGO_URGENT: on
ALARM_TIMEAGO_URGENT_MINS: 30
ALARM_TIMEAGO_WARN: on
ALARM_TIMEAGO_WARN_MINS: 15
DEVICESTATUS_ADVANCED: true
SAGE_INFO: 336
SAGE_URGENT: 348
SAGE_WARN: 342
#SHOW_FORECAST:
#PUMP_FIELDS: reservoir battery clock status
#PUMP_RETRO_FIELDS: battery reservoir clock status
#PUMP_URGENT_BATT: 26
#PUMP_WARN_BATT: 51
#IAGE_INFO: 68
#IAGE_URGENT: 79
#IAGE_WARN: 72
#PUMP_ENABLE_ALERTS: true
#PUMP_URGENT_BATT_U: 30
#PUMP_URGENT_BATT_V: 1.25
#PUMP_URGENT_RES: 10
#PUMP_URGENT_CLOCK: 30
#LOOP_ENABLE_ALERTS: true
#LOOP_WARN: 20
#LOOP_URGENT: 60
INSECURE_USE_HTTP: false
MONGO_CONNECTION: mongodb://mongo:27017/Nightscout
ports:
- "1337:1337"
depends_on:
- mongo
labels:
- 'traefik.enable=true'
# Change the below Host from `localhost` to be the web address where Nightscout is running.
# Also change the email address in the `traefik` service below.
- 'traefik.http.routers.nightscout.rule=Host(`[REDACTED]`)'
- 'traefik.http.routers.nightscout.entrypoints=websecure'
- 'traefik.http.routers.nightscout.tls.certresolver=le'
volumes:
- /nightscout/docker:/var/opt/ssl/:ro
restart: unless-stopped
mongo:
image: mongo:4.4
container_name: mongo
volumes:
- ./data:/data/db
#ports:
#- "27017:27017"
logging: *default-logging
restart: unless-stopped
traefik: image: traefik:latest container_name: 'traefik' command:
'/var/run/docker.sock:/var/run/docker.sock:ro' restart: unless-stopped
nightscout-libre-link: image: timoschlueter/nightscout-librelink-up container_name: nightscout-libre-link environment: LINK_UP_USERNAME: "[REDACTED]" LINK_UP_PASSWORD: "[REDACTED]" LINK_UP_TIME_INTERVAL: "1" LINK_UP_REGION: "US" NIGHTSCOUT_URL: "nightscout:1337" NIGHTSCOUT_API_TOKEN: "[REDACTED]" NIGHTSCOUT_DISABLE_HTTPS: "false" LOG_LEVEL: "info" volumes:
From first glance I think the problem is that you set the following option:
_NIGHTSCOUT_DISABLEHTTPS: "false"
Since you are using docker internal networking, this option should be set to "true".
Please try again with this setting :)
When I change that to true and restart all containers, I get the same log messages from nightscout-librelink-up
When I also change INSECURE_USE_HTTP:, under the nightscout section of the docker-compose.yml, from false to true, I then get the messages below. I suspect this additional change I made was not proper, as I definitely do want my externally-reachable Nightscout site to be https.
nightscout-libre-link | [info]: Logged in to LibreLink Up nightscout-libre-link | [info]: Found 1 LibreLink Up connection. nightscout-libre-link | [info]: -> The following connection will be used: [REDACTED] (Patient-ID: [REDACTED]) nightscout-libre-link | [error]: {"status":401,"message":"Unauthorized","description":"Invalid/Missing"} nightscout-libre-link | [info]: Trying to upload 142 glucose measurement items to Nightscout nightscout-libre-link | [error]: {"status":401,"message":"Unauthorized","description":"Invalid/Missing"} nightscout-libre-link | [error]: Upload to NightScout failed
It's finally working!
Fix was to change INSECURE_USE_HTTP:, under the nightscout section of the docker-compose.yml, to true in addition to setting NIGHTSCOUT_DISABLE_HTTPS: to true under the nightscout-librelink-up section (as timo mentioned above).
The final error was just an invalid hash of my API token.
Thanks Timo for the help and for making an awesome tool!
awesome! glad that it works for you now :)
Hello -
Has anyone ever seen this error?
nightscout-libre-link | [info]: Trying to upload 142 glucose measurement items to Nightscout nightscout-libre-link | [error]: write EPROTO C0C745C8107F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355: nightscout-libre-link | nightscout-libre-link | [error]: Upload to NightScout failed nightscout-libre-link | [info]: Found 1 LibreLink Up connection. nightscout-libre-link | [info]: -> The following connection will be used: [my name] (Patient-ID: [super long number]) nightscout-libre-link | [error]: write EPROTO C0C745C8107F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355: nightscout-libre-link |