docker / for-linux

Docker Engine for Linux
https://docs.docker.com/engine/installation/
756 stars 85 forks source link

Error response from daemon: file integrity checksum failed for "etc/openldap/certs/cert8.db" #1307

Closed yanxianhe closed 3 years ago

yanxianhe commented 3 years ago

Docker images work fine

Docker images work fine

Error message using docker 20.10.8 save-o

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:    20.04
Codename:   focal

$ docker --version

Docker version 20.10.8, build 3967b7d

$ docker images | grep -i v14.0.1
xianheyan/builder-nodejs                   v14.0.1             7e083d2930a4   13 days ago         1.9GB

$ docker ps -a | grep -i v14.0.1
29143a28e0a5   xianheyan/builder-nodejs:v14.0.1   "top"                    3 minutes ago       Up 3 minutes                                                                          agitated_murdock

$ docker save -o nodejs1401.tar xianheyan/builder-nodejs:v14.0.1
Error response from daemon: file integrity checksum failed for "etc/openldap/certs/cert8.db"
thaJeztah commented 3 years ago

This error is produced by the tar-split library, which reconstructs the original layers (as a tar) on save; https://github.com/moby/moby/blob/master/vendor/github.com/vbatts/tar-split/tar/asm/assemble.go#L84-L90

That step compares the checksum of the layer's files on disk with the original checksum from when the image was pulled. An error here likely means that either a file was modified (which could be, e.g. a virus-scanner quarantining a file), or (e.g.) disk corruption (perhaps your system has run out of disk space at some point?).

I don't think this is a bug, but could be an issue on your machine, so I'll close this ticket, but feel free to continue the conversation if you have more details and/or are consistently able to reproduce the problem.

yanxianhe commented 3 years ago

The current check disk root directory is 15%

yanxianhe@yanxianhe:/tmp$ ls -lha script*
-rw-rw-r-- 1 yanxianhe yanxianhe 4.1K 9月  30 15:14 script.his
-rw-rw-r-- 1 yanxianhe yanxianhe 2.8K 9月  30 15:14 script.time
yanxianhe@yanxianhe:/tmp$ cat script.his 
Script started on 2021-09-30 15:12:31+08:00 [TERM="xterm-256color" TTY="/dev/pts/1" COLUMNS="145" LINES="36"]
yanxianhe@yanxianhe:/tmp$ docker images
REPOSITORY                                 TAG                 IMAGE ID       CREATED         SIZE
node                                       16.10.0             9c23a8242f8b   47 hours ago    908MB
centos                                     centos7.9.2009      eeb6ee3f44bd   2 weeks ago     204MB
xianheyan/builder-nodejs                   v14.0.1             7e083d2930a4   2 weeks ago     1.9GB
haproxy                                    latest              06340012d093   6 weeks ago     95.5MB
10.111.80.66/library/stilliard/pure-ftpd   latest              04e2c228c8e9   3 months ago    148MB
stilliard/pure-ftpd                        latest              04e2c228c8e9   3 months ago    148MB
postgres                                   13.3                ed45d5bb6847   3 months ago    315MB
10.111.80.66/library/busybox               latest              69593048aa3a   3 months ago    1.24MB
busybox                                    latest              69593048aa3a   3 months ago    1.24MB
xianheyan/builder-nodejs                   latest              5bfc227f8b78   4 months ago    1.87GB
kubespheredev/builder-base                 latest              b1aaf6754bee   4 months ago    911MB
10.111.80.66/library/haproxy               2.4.0               b68c771805b9   4 months ago    95.3MB
haproxy                                    2.4.0               b68c771805b9   4 months ago    95.3MB
10.111.80.66/library/rabbitmq              3.8.14-management   e2b066e3fc02   5 months ago    186MB
rabbitmq                                   3.8.14-management   e2b066e3fc02   5 months ago    186MB
khoazero123/navicat-keygen                 latest              abcafaa9fb17   10 months ago   653MB
10.111.80.66/library/mongo                 4.2.7               66c68b650ad4   16 months ago   388MB
mongo                                      4.2.7               66c68b650ad4   16 months ago   388MB
mysql                                      5.7.26              e9c354083de7   2 years ago     373MB
centos                                     7.6.1810            f1cb7c7d58b7   2 years ago     202MB
yanxianhe@yanxianhe:/tmp$ docker save -o builder-nodejs.tar xianheyan/builder-nodejs:v14.0.1
Error response from daemon: file integrity checksum failed for "etc/openldap/certs/cert8.db"
yanxianhe@yanxianhe:/tmp$ df -h
文件系统        容量  已用  可用 已用% 挂载点
udev            5.8G     0  5.8G    0% /dev
tmpfs           1.2G  1.9M  1.2G    1% /run
/dev/sda7       375G   51G  305G   15% /
tmpfs           5.8G  250M  5.6G    5% /dev/shm
tmpfs           5.0M  4.0K  5.0M    1% /run/lock
tmpfs           5.8G     0  5.8G    0% /sys/fs/cgroup
/dev/loop0       33M   33M     0  100% /snap/snapd/13170
/dev/sda6       945M  142M  739M   17% /boot
/dev/sda2       220G  176G   45G   80% /home/yanxianhe/winD
/dev/sda3       220G  123G   98G   56% /home/yanxianhe/winE
tmpfs           1.2G   60K  1.2G    1% /run/user/1000
yanxianhe@yanxianhe:/tmp$ docker --version
Docker version 20.10.8, build 3967b7d
yanxianhe@yanxianhe:/tmp$ docker info | grep -i DIR
WARNING: No swap limit support
 Docker Root Dir: /var/lib/docker
yanxianhe@yanxianhe:/tmp$ docker save -o mysql.tar mysql:5.7.26
yanxianhe@yanxianhe:/tmp$ ls -lhs mysql.tar 
361M -rw------- 1 yanxianhe yanxianhe 361M 9月  30 15:14 mysql.tar
yanxianhe@yanxianhe:/tmp$ exit
yanxianhe commented 3 years ago

In addition, run the export command to export the image successfully

yanxianhe@yanxianhe:/tmp$ cat script1.his 
Script started on 2021-09-30 15:43:14+08:00 [TERM="xterm-256color" TTY="/dev/pts/2" COLUMNS="140" LINES="54"]
yanxianhe@yanxianhe:/tmp$ 
yanxianhe@yanxianhe:/tmp$ docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
yanxianhe@yanxianhe:/tmp$ docker images
REPOSITORY                                 TAG                 IMAGE ID       CREATED         SIZE
node                                       16.10.0             9c23a8242f8b   47 hours ago    908MB
centos                                     centos7.9.2009      eeb6ee3f44bd   2 weeks ago     204MB
xianheyan/builder-nodejs                   v14.0.1             7e083d2930a4   2 weeks ago     1.9GB
haproxy                                    latest              06340012d093   6 weeks ago     95.5MB
stilliard/pure-ftpd                        latest              04e2c228c8e9   3 months ago    148MB
10.111.80.66/library/stilliard/pure-ftpd   latest              04e2c228c8e9   3 months ago    148MB
postgres                                   13.3                ed45d5bb6847   3 months ago    315MB
10.111.80.66/library/busybox               latest              69593048aa3a   3 months ago    1.24MB
busybox                                    latest              69593048aa3a   3 months ago    1.24MB
xianheyan/builder-nodejs                   latest              5bfc227f8b78   4 months ago    1.87GB
kubespheredev/builder-base                 latest              b1aaf6754bee   4 months ago    911MB
10.111.80.66/library/haproxy               2.4.0               b68c771805b9   4 months ago    95.3MB
haproxy                                    2.4.0               b68c771805b9   4 months ago    95.3MB
10.111.80.66/library/rabbitmq              3.8.14-management   e2b066e3fc02   5 months ago    186MB
rabbitmq                                   3.8.14-management   e2b066e3fc02   5 months ago    186MB
khoazero123/navicat-keygen                 latest              abcafaa9fb17   10 months ago   653MB
10.111.80.66/library/mongo                 4.2.7               66c68b650ad4   16 months ago   388MB
mongo                                      4.2.7               66c68b650ad4   16 months ago   388MB
mysql                                      5.7.26              e9c354083de7   2 years ago     373MB
centos                                     7.6.1810            f1cb7c7d58b7   2 years ago     202MB
yanxianhe@yanxianhe:/tmp$ docker run -it -d xianheyan/builder-nodejs:v14.0.1 top
036efcf141be4b89d8998871b237b19e5e97365824236b2c34f077cd9e0a87c1
yanxianhe@yanxianhe:/tmp$ docker ps
CONTAINER ID   IMAGE                              COMMAND   CREATED         STATUS         PORTS     NAMES
036efcf141be   xianheyan/builder-nodejs:v14.0.1   "top"     3 seconds ago   Up 2 seconds             festive_ptolemy
yanxianhe@yanxianhe:/tmp$ docker save -o nodejs.tar xianheyan/builder-nodejs:v14.0.1
Error response from daemon: file integrity checksum failed for "etc/openldap/certs/cert8.db"
yanxianhe@yanxianhe:/tmp$ docker export 036efcf141be > nodejs14.tar
yanxianhe@yanxianhe:/tmp$ ls -lha nodejs14.tar 
-rw-rw-r-- 1 yanxianhe yanxianhe 1.7G 9月  30 15:45 nodejs14.tar
yanxianhe@yanxianhe:/tmp$ df -h
文件系统        容量  已用  可用 已用% 挂载点
udev            5.8G     0  5.8G    0% /dev
tmpfs           1.2G  2.0M  1.2G    1% /run
/dev/sda7       375G   53G  303G   15% /
tmpfs           5.8G  292M  5.6G    5% /dev/shm
tmpfs           5.0M  4.0K  5.0M    1% /run/lock
tmpfs           5.8G     0  5.8G    0% /sys/fs/cgroup
/dev/loop0       33M   33M     0  100% /snap/snapd/13170
/dev/sda6       945M  142M  739M   17% /boot
/dev/sda2       220G  176G   45G   80% /home/yanxianhe/winD
/dev/sda3       220G  123G   98G   56% /home/yanxianhe/winE
tmpfs           1.2G   64K  1.2G    1% /run/user/1000
overlay         375G   53G  303G   15% /var/lib/docker/overlay2/5c0aaa27c609c44282224d9a0eb86cf69c9fda57a5660a6418bf8638da8a9146/merged
thaJeztah commented 3 years ago

In addition, run the export command to export the image successfully

That's expected, because docker export exports a container's rootfs, but does not verify if file checksums match that of the image that the container was created from.

Stephenfang51 commented 2 years ago

@yanxianhe meet the same issue as yours

and all the circustances are same, no space problem, and of cource no virus scanner, still cannot easily using docker save to export a images. Any tips? Please!