docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.43k stars 118 forks source link

Error grabbing logs: invalid character '\x00' looking for beginning of value #6857

Open nothing2obvi opened 1 year ago

nothing2obvi commented 1 year ago

Ever since upgrading to Docker Desktop for Mac 4.19.0, on 2 separate Mac Minis, I started getting the following error when looking at the container logs; it will show a few normal logs and then the error. The containers with the errors are different on the 2 Mac Minis.

Error grabbing logs: invalid character '\x00' looking for beginning of value

Expected behavior

Checking the logs should just show a container's normal log entries and not this error.

Actual behavior

On some but not all containers, a few normal log entries are visible, and then this error.

Information

Output of /Applications/Docker.app/Contents/MacOS/com.docker.diagnose check

For the 1st Mac Mini

[2023-05-28T23:09:00.341757000Z][com.docker.diagnose][I] set path configuration to OnHost
Starting diagnostics

[PASS] DD0027: is there available disk space on the host?
[FAIL] DD0028: is there available VM disk space? low free VM disk space
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0031: does the Docker API work?
[PASS] DD0013: is the $PATH ok?
[PASS] DD0003: is the Docker CLI working?
[PASS] DD0038: is the connection to Docker working?
[FAIL] DD0014: are the backend processes running? 1 error occurred:
    * com.docker.vpnkit is not running

[PASS] DD0007: is the backend responding?
[PASS] DD0008: is the native API responding?
[FAIL] DD0009: is the vpnkit API responding? dial unix vpnkit.diag.sock: connect: connection refused
[PASS] DD0010: is the Docker API proxy responding?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0033: does the host have Internet access?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0031: does the Docker API work?
[PASS] DD0032: do Docker networks overlap with host IPs?

Please investigate the following 2 issues:

1 : The test: are the backend processes running?
    Failed with: 1 error occurred:
    * com.docker.vpnkit is not running

Not all of the backend processes are running.

2 : The test: is there available VM disk space?
    Failed with: low free VM disk space

Verify the available VM disk space. Try running `docker system prune` to clean up.

For the 2nd Mac Mini

[2023-05-28T23:10:01.023238000Z][com.docker.diagnose][I] set path configuration to OnHost
Starting diagnostics

[PASS] DD0027: is there available disk space on the host?
[PASS] DD0028: is there available VM disk space?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[FAIL] DD0017: can a VM be started? vm has not started: vm has not started
[FAIL] DD0016: is the LinuxKit VM running? vm is not running: vm has not started
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0031: does the Docker API work?
[PASS] DD0013: is the $PATH ok?
[PASS] DD0003: is the Docker CLI working?
[PASS] DD0038: is the connection to Docker working?
[FAIL] DD0014: are the backend processes running? 1 error occurred:
    * com.docker.vpnkit is not running

[PASS] DD0007: is the backend responding?
[PASS] DD0008: is the native API responding?
[FAIL] DD0009: is the vpnkit API responding? dial unix vpnkit.diag.sock: connect: connection refused
[PASS] DD0010: is the Docker API proxy responding?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0033: does the host have Internet access?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[WARN] DD0017: can a VM be started? vm has not started: vm has not started
[WARN] DD0016: is the LinuxKit VM running? vm is not running: vm has not started
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0031: does the Docker API work?
[PASS] DD0032: do Docker networks overlap with host IPs?

Please note the following 2 warnings:

1 : The check: can a VM be started?
    Produced the following warning: vm has not started: vm has not started

The Docker engine runs inside a Linux VM. Therefore we must be able to start Virtual Machines.

2 : The check: is the LinuxKit VM running?
    Produced the following warning: vm is not running: vm has not started

The Docker engine runs inside a Linux VM. Therefore the VM must be running.

Please investigate the following 1 issue:

1 : The test: can a VM be started?
    Failed with: vm has not started: vm has not started

The Docker engine runs inside a Linux VM. Therefore we must be able to start Virtual Machines.

Steps to reproduce the behavior

  1. Install Docker Desktop for Mac 4.19.0
  2. Check container logs
  3. Find that some containers show normal logs, while others show a few logs and then the aforementioned error.
bsousaa commented 1 year ago

can you give more details about how to reproduce the issue? Please share the exact commands and a minimal reproducible image.

nothing2obvi commented 1 year ago

Sorry for the delay. I'm not doing anything in particular. I just start Docker Desktop, it starts my containers, then I look in the logs for the containers and find the error. I'm not sure what you mean by minimal reproducible image, sorry, but I can tell you that I experience it with containers like FTPGrab and Jellyfin.

qdrddr commented 1 year ago

A similar issue occurs when running any containers. Ideas on how to fix it?

Engine v24.0.6 Docker Desktop 4.23.0 (120376) macOS 13.5.2

qdrddr commented 1 year ago

A similar issue occurs when running any containers. Ideas on how to fix it?

Engine v24.0.6 Docker Desktop 4.23.0 (120376) macOS 13.5.2

qq1014853731 commented 2 months ago

I also encountered this problem

OS macOS sonoma 14.4.1

Engine version Docker version 26.1.1, build 4cf5afa

Docker Desktop version 4.30.0 (149282)

my container sh:

#!/bin/bash
BASE_PATH=$(cd `dirname $0`; pwd)
echo "DIR:${BASE_PATH}"

docker run -itd --name mysql \
    --privileged=true \
    --net=docker --ip=172.18.0.10 \
    -p 3306:3306 \
    -e MYSQL_ROOT_PASSWORD=root \
    -v ${BASE_PATH}/data:/var/lib/mysql \
    mysql:5.7.44

daemon.json

{
  "builder": {
    "gc": {
      "defaultKeepStorage": "20GB",
      "enabled": true
    }
  },
  "experimental": false,
  "registry-mirrors": [
    "https://dockerhub.icu",
    "https://xxxxxx.mirror.aliyuncs.com"
  ]
}

setting

image image

log:

image

I'm not sure when this issue started, as this container was normal in the first place. Maybe it's because of an operating system update?