owntracks / docker-recorder

Docker image for OwnTracks Recorder
144 stars 67 forks source link

Frontend stopped connecting to recorder (crosspost from owntracks/frontend) #54

Closed plague-doctor closed 2 years ago

plague-doctor commented 2 years ago

I am sorry for cross-posting, but I have no idea which part is responsible for this issue...)

I run owntracks recorder and frontend in swarm. After the latest recorder upgrade (version 0.8.8), the frontend stopped working properly. It is throwing:

10.0.1.11 - - [23/May/2022:07:56:26 +1000] "GET /?lat=-34.53xxx&lng=142.66xxx&zoom=6&start=2022-04-22T14%3A00%3A00&end=2022-05-23T13%3A59%3A59&layers=last,line HTTP/1.1" 200 471 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36"
10.0.1.11 - - [23/May/2022:07:56:26 +1000] "GET /config/config.js HTTP/1.1" 500 579 "https://owntracks.mydomain.com/?lat=-34.53xxx&lng=142.66xxx&zoom=6&start=2022-04-22T14%3A00%3A00&end=2022-05-23T13%3A59%3A59&layers=last,line" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36"
2022/05/23 07:56:26 [error] 9#9: *1 rewrite or internal redirection cycle while internally redirecting to "/config/config.js/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html", client: 10.0.1.11, server: , request: "GET /config/config.js HTTP/1.1", host: "owntracks.mydomain.com", referrer: "https://owntracks.mydomain.com/?lat=-34.53xxx&lng=142.66xxx&zoom=6&start=2022-04-22T14%3A00%3A00&end=2022-05-23T13%3A59%3A59&layers=last,line"
10.0.1.11 - - [23/May/2022:07:56:26 +1000] "GET /api/0/list HTTP/1.1" 502 559 "https://owntracks.mydomain.com/?lat=-34.53xxx&lng=142.66xxx&zoom=6&start=2022-04-22T14%3A00%3A00&end=2022-05-23T13%3A59%3A59&layers=last,line" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36"

I hope you can point me to the right direction in order to fix this issue...

My docker-compose.yml:

version: "3.8"

services:
  otr-recorder:
    image: owntracks/recorder
    volumes:
      - /mnt/docker/docker-volumes/owntracks:/store
    environment:
      - OTR_HOST=mosquitto.mydomain.com
      - OTR_USER=<edited>
      - OTR_PASS=<edited>
      - PUID=1000
      - PGID=1000
      - TZ=Australia/Melbourne
    networks:
      owntracks:
        aliases:
          - otr-recorder

  otr-frontend:
    image: owntracks/frontend
    environment:
      - SERVER_HOST=otr-recorder
      - SERVER_PORT=8083
      - TZ=Australia/Melbourne
    networks:
      - proxy
      - owntracks
    deploy:
      labels:
        - "traefik.enable=true"
        - "traefik.http.routers.owntracks.rule=Host(`owntracks.mydomain.com`)"
        - "traefik.http.routers.owntracks.tls.certresolver=letsencrypt"
        - "traefik.http.routers.owntracks.entrypoints=https"
        - "traefik.http.routers.owntracks.tls=true"
        - "traefik.http.routers.owntracks.middlewares=authelia@docker"
        - "traefik.http.services.owntracks.loadbalancer.server.port=80"

networks:
  owntracks:
    internal: true
  proxy:
    external: true
madpsy commented 2 years ago

0.8.8 does indeed appear to be broken. Performing a GET / directly against the recorder:

> curl http://127.0.0.1:8083/api curl: (56) Recv failure: Connection reset by peer

Rolling back to 0.8.6-12 works. Nothing shows in the stdout logs.

pchampio commented 2 years ago

I think it is related to: https://github.com/owntracks/recorder/issues/387#issuecomment-1135660241

can you try with:

  otr-recorder:
    image: owntracks/recorder
    entrypoint: ot-recorder --http-host 0.0.0.0 owntracks/#
    [.....]
jpmens commented 2 years ago

This has now finally been fixed; all settings are taken first from compiled-in defaults, then from the configuration file, then from the environment, and finally from command-line options if specified.