amir20 / dozzle

Realtime log viewer for docker containers.
https://dozzle.dev/
MIT License
5.7k stars 287 forks source link

Logs not loading in version 8.4.0, it says it #3248

Closed JurBraam-EyeQuestion closed 1 week ago

JurBraam-EyeQuestion commented 1 week ago

πŸ” Check for existing issues

How is Dozzle deployed?

Standalone Deployment

πŸ“¦ Dozzle version

8.4.0

βœ… Command used to run Dozzle


  logs-viewer:
    container_name: eq-server-tools-logs-viewer
    hostname: eq-logs-viewer
    restart: always
    profiles: [logs-viewer]
    pull_policy: always
    image: amir20/dozzle:v8.3.0
    environment:
      DOZZLE_BASE: /logs
      DOZZLE_AUTH_PROVIDER: simple
      DOZZLE_LEVEL: debug
      DOZZLE_ENABLE_ACTIONS: true
      DOZZLE_NO_ANALYTICS: true
    networks:
      - eq-tools-net
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./images/eq-proxy-image/users.yml:/data/users.yml
    ports:
      - ${EQ_LOGS_MONITORING_PORT}:8080
    deploy:
      resources:
        limits:
          memory: 500M
        reservations:
          memory: 500M

πŸ› Describe the bug / provide steps to reproduce it

I just upgraded to version 8.4.0 and i use nginx to revrerse proxy to the logs with this config (which was always working before):

 location ~/logs(/.*)?$ {
        include /etc/nginx/mime.types;
        set $proxy_host "${http_host}";
        if ($host ~* ":[0-9]+") {
            set $proxy_host "${host}";
        }
        proxy_pass http://eq-logs-viewer:8080;
        proxy_set_header Host $proxy_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Host $http_host;
        proxy_set_header X-Forwarded-proto $scheme;
        proxy_ssl_verify off;
        proxy_buffering off;
        proxy_set_header Connection '';
        proxy_http_version 1.1;
        chunked_transfer_encoding off;
        proxy_cache off;
        proxy_cache_bypass 1; # Adding this as an extra measure
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 86400;
        proxy_redirect ~^http://[^/]+(/.*)$ http://$proxy_host$1;
    }

so I think its a bug because the stream is working if i use v8.3.0!

πŸ’» Environment

Client: Docker Engine - Community
 Version:    27.2.0
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.16.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.2
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 7
  Running: 7
  Paused: 0
  Stopped: 0
 Images: 315
 Server Version: 27.2.0
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 472731909fa34bd7bc9c087e4c27943f9835f111
 runc version: v1.1.13-0-g58aa920
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.8.0-1012-aws
 Operating System: Ubuntu 24.04.1 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 3.747GiB
 Name: IMPALA
 ID: a860b390-c82a-4e62-98af-f7e830f0681c
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: eyequestionsoftware
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

πŸ“Έ If applicable, add screenshots to help explain your bug

image

πŸ“œ If applicable, attach your Dozzle logs. You many need to enable debug mode. See https://dozzle.dev/guide/debugging.


dev@IMPALA:~/eq-docker/eq-application$ docker logs a96
{"level":"info","time":"2024-09-03T18:52:38Z","message":"Dozzle version v8.4.0"}
{"level":"debug","filterArgs":{},"time":"2024-09-03T18:52:38Z","message":"Creating local client"}
{"level":"debug","filter":{},"host":"IMPALA","time":"2024-09-03T18:52:38Z","message":"Listing containers"}
{"level":"debug","time":"2024-09-03T18:52:38Z","message":"Adding local Docker Engine"}
{"level":"info","clients":1,"time":"2024-09-03T18:52:38Z","message":"Connected to Docker"}
{"level":"debug","time":"2024-09-03T18:52:38Z","message":"Using simple authentication"}
{"level":"debug","path":"/data/users.yml","time":"2024-09-03T18:52:38Z","message":"Reading users.yml file"}
{"level":"debug","users":1,"time":"2024-09-03T18:52:38Z","message":"Loaded users"}
{"level":"debug","filter":{},"host":"IMPALA","time":"2024-09-03T18:52:38Z","message":"Listing containers"}
{"level":"debug","host":"IMPALA","time":"2024-09-03T18:52:38Z","message":"docker store subscribing docker events"}
{"level":"info","time":"2024-09-03T18:52:38Z","message":"Accepting connections on :8080"}
{"level":"debug","id":"a96fa9602176","time":"2024-09-03T18:52:38Z","message":"Finding container"}
{"level":"debug","id":"2e1c08ab8331","time":"2024-09-03T18:52:38Z","message":"Finding container"}
{"level":"debug","id":"c4ee1f80f1ed","time":"2024-09-03T18:52:38Z","message":"Finding container"}
{"level":"debug","id":"6994924b0eee","time":"2024-09-03T18:52:38Z","message":"Finding container"}
{"level":"debug","id":"cf93721b793a","time":"2024-09-03T18:52:38Z","message":"Finding container"}
{"level":"debug","id":"76937cb5cef2","time":"2024-09-03T18:52:38Z","message":"Finding container"}
{"level":"debug","id":"0213786ed6ae","time":"2024-09-03T18:52:38Z","message":"Finding container"}
{"level":"debug","containers":7,"time":"2024-09-03T18:52:38Z","message":"finished initializing container store"}
{"level":"debug","filter":{},"host":"IMPALA","time":"2024-09-03T18:52:39Z","message":"Listing containers"}
{"level":"debug","container":"c4ee1f80f1ed","host":"IMPALA","time":"2024-09-03T18:52:39Z","message":"starting to stream stats"}
{"level":"debug","container":"6994924b0eee","host":"IMPALA","time":"2024-09-03T18:52:39Z","message":"starting to stream stats"}
{"level":"debug","container":"2e1c08ab8331","host":"IMPALA","time":"2024-09-03T18:52:39Z","message":"starting to stream stats"}
{"level":"debug","container":"76937cb5cef2","host":"IMPALA","time":"2024-09-03T18:52:39Z","message":"starting to stream stats"}
{"level":"debug","container":"cf93721b793a","host":"IMPALA","time":"2024-09-03T18:52:39Z","message":"starting to stream stats"}
{"level":"debug","container":"0213786ed6ae","host":"IMPALA","time":"2024-09-03T18:52:39Z","message":"starting to stream stats"}
{"level":"debug","container":"a96fa9602176","host":"IMPALA","time":"2024-09-03T18:52:39Z","message":"starting to stream stats"}
{"level":"debug","host":"IMPALA","time":"2024-09-03T18:52:39Z","message":"starting to listen to docker events"}
{"level":"debug","hit":false,"data":"[]releases.Release","time":"2024-09-03T18:52:39Z","message":"Cache hit"}
{"level":"debug","hit":true,"data":"[]releases.Release","time":"2024-09-03T18:52:43Z","message":"Cache hit"}
amir20 commented 1 week ago

Hmm I didn't change much in the new release except how search works.

Is this happening with every container? Anything else to help me reproduce would be appreciated.

JurBraam-EyeQuestion commented 1 week ago

Yes it is happening with every container. what else could help you? the nginx.conf thats used besides the default.conf? To help you reproduce it i could also send my whole dockerfile and the files i use from nginx config?

On Tue, Sep 3, 2024 at 9:04β€―PM Amir Raminfar @.***> wrote:

Hmm I didn't change much in the new release except how search works.

Is this happening with every container? Anything else to help me reproduce would be appreciated.

β€” Reply to this email directly, view it on GitHub https://github.com/amir20/dozzle/issues/3248#issuecomment-2327222098, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKC2OLU2CGC2S4MSY5AS5SLZUYB4LAVCNFSM6AAAAABNSXR7O6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRXGIZDEMBZHA . You are receiving this because you authored the thread.Message ID: @.***>

--

With kind regards/Met vriendelijke groeten,

Jur Braam Senior Software Engineer

EyeQuestion Software - Logic8 BV - Nieuwe Aamsestraat 90D - 6662 NK - Elst (Gld) - The Netherlands T +31 (0)481 350370 | USA T +1 513 822 4705 | M +31 (0)6 1053 4507 | E @.***

The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorised to receive it. If you are not the intended recipient you are hereby (a): notified that any disclosure, copying, distribution or taking any action with respect to the content of this information is strictly prohibited and may be unlawful, and (b): kindly requested to inform the sender immediately and destroy any copies. Logic8 BV does neither accept any responsibility and/or liability for the improper and incomplete transmission of the information contained in this communication nor for any delay in its receipt.

amir20 commented 1 week ago

Before I try to set this up locally (since it could be a lot of work) can you figure out what the response is for the log stream?

Go to network tab > look for api/hosts/<host>/containers/<id>/logs/stream?stdout=1&stderr=1 and see the response.

From the screenshot above, it says this is text/html instead of an actual json stream.

What is the error?

natestrom commented 1 week ago

If it helps , I'm having the same issue, logs not loading on v8.4.0. I'm using the following command to run dozzle: docker run --log-driver json-file --log-opt max-size=10m --log-opt max-file=1 --name dozzle -d --label=com.centurylinklabs.watchtower.enable=true --restart=unless-stopped --volume=/var/run/docker.sock:/var/run/docker.sock -p 8080:8080 amir20/dozzle:latest --base /dzl

amir20 commented 1 week ago

Nice. I was able to reproduce it. It has nothing to do with proxy. It's the base that is broken.

amir20 commented 1 week ago

OK found the issue. Doing some testing.

JurBraam-EyeQuestion commented 1 week ago

Wow thats fast! Thank you so much! I really appreciate this tool and your hard work! It was with a double path in the api call right? I see β€œ/logs/logs”

And your past in jobs is so cool! Also for Netflix. And your open source website for COC :) do you know Info Support perhaps? From the Netherlands

With kind regards/Met vriendelijke groeten,

Jur Braam Senior Software Engineer

EyeQuestion Software - Logic8 BV - Nieuwe Aamsestraat 90D - 6662 NK - Elst (Gld) - The Netherlands T +31 (0)481 350370 | USA T +1 513 822 4705 | M +31 (0)6 1053 4507 | E @.***

The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorised to receive it. If you are not the intended recipient you are hereby (a): notified that any disclosure, copying, distribution or taking any action with respect to the content of this information is strictly prohibited and may be unlawful, and (b): kindly requested to inform the sender immediately and destroy any copies. Logic8 BV does neither accept any responsibility and/or liability for the improper and incomplete transmission of the information contained in this communication nor for any delay in its receipt.

Op di 3 sep 2024 om 22:35 schreef Amir Raminfar @.***>

OK found the issue. Doing some testing.

β€” Reply to this email directly, view it on GitHub https://github.com/amir20/dozzle/issues/3248#issuecomment-2327388915, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKC2OLVFISFS6IUSXDCOLUDZUYMQFAVCNFSM6AAAAABNSXR7O6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRXGM4DQOJRGU . You are receiving this because you authored the thread.Message ID: @.***>

amir20 commented 1 week ago

Wow thats fast! Thank you so much! I really appreciate this tool and your hard work! It was with a double path in the api call right? I see β€œ/logs/logs”

That's right. I was appending base twice. Should probably add a test case around this πŸ€·πŸΌβ€β™‚οΈ

Thank you on kinds works.

What do you mean with "do you know Info Support perhaps?".

JurBraam-EyeQuestion commented 1 week ago

Thanks man!! I mean the company info support!

Can you delete my replies with the docker and nginx config? From public

With kind regards/Met vriendelijke groeten,

Jur Braam Senior Software Engineer

EyeQuestion Software - Logic8 BV - Nieuwe Aamsestraat 90D - 6662 NK - Elst (Gld) - The Netherlands T +31 (0)481 350370 | USA T +1 513 822 4705 | M +31 (0)6 1053 4507 | E @.***

The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorised to receive it. If you are not the intended recipient you are hereby (a): notified that any disclosure, copying, distribution or taking any action with respect to the content of this information is strictly prohibited and may be unlawful, and (b): kindly requested to inform the sender immediately and destroy any copies. Logic8 BV does neither accept any responsibility and/or liability for the improper and incomplete transmission of the information contained in this communication nor for any delay in its receipt.

Op di 3 sep 2024 om 22:54 schreef Amir Raminfar @.***>

Closed #3248 https://github.com/amir20/dozzle/issues/3248 as completed via 2a3af94 https://github.com/amir20/dozzle/commit/2a3af94467012ab72cca83149cfbfa682edf64b4 .

β€” Reply to this email directly, view it on GitHub https://github.com/amir20/dozzle/issues/3248#event-14121106287, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKC2OLWV5KNGUTGC5NEKEETZUYOYRAVCNFSM6AAAAABNSXR7O6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJUGEZDCMJQGYZDQNY . You are receiving this because you authored the thread.Message ID: @.***>

amir20 commented 1 week ago

I deleted your configs. Your attachment was never sent so all good.

I mean the company info support!

I am a one man team. I do this on my part time. No company. You can support me by buying me beers. https://buymeacoffee.com/amirraminfar 🍺🍺🍺

JurBraam-EyeQuestion commented 2 days ago

Hey! How are you? Still doing a very good job!!!! So happy with it!

One question: Can I add custom actions besides the restart and start actions that will run some custom scripts?

On Wed, Sep 4, 2024 at 12:34β€―AM Amir Raminfar @.***> wrote:

I deleted your configs. Your attachment was never sent so all good.

I mean the company info support!

I am a one man team. I do this on my part time. No company. You can support me by buying me beers. https://buymeacoffee.com/amirraminfar 🍺🍺🍺

β€” Reply to this email directly, view it on GitHub https://github.com/amir20/dozzle/issues/3248#issuecomment-2327556888, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKC2OLW4KI7UOTSACYVKGV3ZUY2PZAVCNFSM6AAAAABNSXR7O6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRXGU2TMOBYHA . You are receiving this because you authored the thread.Message ID: @.***>

--

With kind regards/Met vriendelijke groeten,

Jur Braam Senior Software Engineer

EyeQuestion Software - Logic8 BV - Nieuwe Aamsestraat 90D - 6662 NK - Elst (Gld) - The Netherlands T +31 (0)481 350370 | USA T +1 513 822 4705 | M +31 (0)6 1053 4507 | E @.***

The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorised to receive it. If you are not the intended recipient you are hereby (a): notified that any disclosure, copying, distribution or taking any action with respect to the content of this information is strictly prohibited and may be unlawful, and (b): kindly requested to inform the sender immediately and destroy any copies. Logic8 BV does neither accept any responsibility and/or liability for the improper and incomplete transmission of the information contained in this communication nor for any delay in its receipt.

amir20 commented 2 days ago

No, that's not within the scope for Dozzle.