Error grabbing logs: invalid character '\x00' looking for beginning of value
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
- [x] I have tried with the latest version of Docker Desktop
- [x] I have tried disabling enabled experimental features
- [x] I have uploaded Diagnostics
- Diagnostics ID (1): 962FF7CB-9D19-4487-9D56-1B70E3EB9D43/20230528230453
- Diagnostics ID (2): 00305E16-090F-4D84-8653-7CF3B1B4BFF9/20230528230838
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
- Is it reproducible? Yes. It occurs on 2 different Mac Minis running Docker Desktop for Mac 4.19.0, and on different containers.
- Is the problem new? Yes.
- Did the problem appear with an update? Yes, after installing Docker Desktop for Mac 4.19.0.
- macOS Version: Monterey 12.6 and Ventura 13.2.1
- Intel chip or Apple chip: Intel and Apple, respectively
- Docker Desktop Version: Docker Desktop for Mac 4.19.0
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
- Install Docker Desktop for Mac 4.19.0
- Check container logs
- Find that some containers show normal logs, while others show a few logs and then the aforementioned error.
can you give more details about how to reproduce the issue? Please share the exact commands and a minimal reproducible image.
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.
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
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
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
log:
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?
I am on using Mac Sequoia and docker engine 27.1.1 to run an ubuntu container. When I execute docker logs I see this:
error from daemon in stream: Error grabbing logs: invalid character '\x00' looking for beginning of value
I've had the same error across 2 dozen containers over various recent Docker versions and macOS (14.x, 15.x) versions. I even cleared all docker logs and changed the docker log format to be explicit:
"log-driver": "json-file",
"log-opts": {
"max-file": "3",
"max-size": "10m"
},
With no luck. I've destroyed the containers and spun them back up (the error clears if this is done); however, days/weeks later the error without fail returns to every container. Seems it could be related to the number of logs? Would make sense why it always returns after some amount of time where logs are accumulating.
It's interesting to note that I also send all my Docker logs to Logstash/Kibana where they show up perfectly fine, this problem is only visible directly in Docker Desktop for Mac OR when running docker logs <CONTAINER_NAME>.
I've had the same error across 2 dozen containers over various recent Docker versions and macOS (14.x, 15.x) versions. I even cleared all docker logs and changed the docker log format to be explicit:
I cleared the json log file in the docker host and the problem went away. From what you are saying I have a recurring issue to look forward to.
I cleared the json log file in the docker host and the problem went away. From what you are saying I have a recurring issue to look forward to.
Most likely based on how it behaves for me. I used the following to clear log files (nuclear but had to try something) but the problem eventually came back: https://gist.github.com/Justintime50/86061d7fc42d74f570926294d03bdf3f. Even reinstalled Docker in-between for another issue and it persisted.