amir20 / dozzle

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

The log is not fully displayed. #3139

Closed yangy30 closed 1 month ago

yangy30 commented 1 month ago

šŸ” Check for existing issues

How is Dozzle deployed?

Standalone Deployment

šŸ“¦ Dozzle version

v8.0.6

āœ… Command used to run Dozzle

services:
  dozzle:
    image:  amir20/dozzle:v8.0.6
    container_name: dozzle
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./data:/data
    ports:
      - 8888:8080
    environment:
      DOZZLE_AUTH_PROVIDER: simple

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

# docker ps
IMAGE                 PORTS                                       NAMES
dozzle:v8.0.6         0.0.0.0:8888->8080/tcp, :::8888->8080/tcp   dozzle
nginx:stable-alpine   80/tcp                                      nginx

# docker logs dozzle
time="2024-07-23T04:27:00Z" level=info msg="Dozzle version v8.0.6"
time="2024-07-23T04:27:00Z" level=info msg="Connected to 1 Docker Engine(s)"
time="2024-07-23T04:27:00Z" level=info msg="Accepting connections on :8080"

The dozzle container has 3 rows of logs, but only 2 rows were collected and the first row was not collected The nginx container has 17 rows of logs, but only 15 rows were collected and the first two rows were not collected

šŸ’» Environment

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

Server:
 Containers: 2
  Running: 2
  Paused: 0
  Stopped: 0
 Images: 2
 Server Version: 26.1.3
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 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: 8b3b7ca2e5ce38e8f31a34f35b2b68ceb8470d89
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
 Kernel Version: 4.18.0-553.8.1.el8_10.x86_64
 Operating System: Rocky Linux 8.10 (Green Obsidian)
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 5.517GiB
 Name: docker
 ID: 3cc7f6dd-e3b8-4f8e-b87d-80c30415d536
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

šŸ“ø If applicable, add screenshots to help explain your bug

No response

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

No response

yangy30 commented 1 month ago

After a period of time, the dozzle has been fully displayed, but the nginx issue still persists.

amir20 commented 1 month ago

Sounds like a issue with proxy? https://dozzle.dev/guide/faq#i-installed-dozzle-but-logs-are-slow-or-they-never-load-what-do-i-do

yangy30 commented 1 month ago

Hello, I'm not using a proxy. I have a fresh system with Docker installed, and I access it directly via IP address and port.

I retested and found:

  1. Logs from containers that existed before installing Dozzle can be collected correctly.
  2. Logs from containers installed after installing Dozzle are missing the first few lines.
  3. Dozzle's own logs sometimes appear correctly, but sometimes they are missing the first few lines.
amir20 commented 1 month ago

Logs from containers installed after installing Dozzle are missing the first few lines

I wasn't able to reproduce this with Dozzle, but I did see new containers missing the first line. I ask for all logs from the time the container started. I might be able to guess what this is.

Let me see if I can have a fix today.

amir20 commented 1 month ago

This is so crazy. I asked for all logs and it is still not returning the first line. Must be a bug some where else. šŸ« 

amir20 commented 1 month ago

Can you try amir20/dozzle:pr-3142? It might have been an easy fix.

yangy30 commented 1 month ago

The logs are showing normal now. Thank you very much for your efforts.