Pagoda panel docker failed to start and yum update failed: rpmdb: BDB0113 Thread/process 2673/140126198814528 failed: BDB1507 Thread died

 If the Pagoda panel fails to start docker , first check whether there are official updates , or ask the official

If it is determined that it is not an official problem, then it may be an error in the yum command.



Use command

yum update
If the update fails, it is basically certain that the failure of docker to start is caused by yum dependencies. The prompt is as follows:

yum update failed: rpmdb: BDB0113 Thread/process 2673/140126198814528 failed: BDB1507 Thread died

Clear, execute the following commands step by step, then update yum, and finally try restarting docker

#cd /var/lib/rpm
#ls
Basenames __db. 001 __db. 003 Group Name Packages Requirename Sigmd5
Conflictname __db. 002 Dirnames Installtid Obsoletename Providename Sha1header Triggername
#rm -rf __db*
#rpm --rebuilddb

If it still doesn't work, change the source with one click and try reinstalling docker.

bash <( wget --no-check-certificate -qO- http://101.37.149.22:5880/new/fix_source.sh)

Run the following command on the server terminal to install it.

/bin / bash /www/server/panel/install/install_soft.sh 0 install docker_install

d

But the old version of the Pagoda panel is useless no matter how much you try. The smart command terminal installs it directly.

The following are some practical notes that the author recorded during the process of learning to build docker. I also encountered some pitfalls during the process, but they were all solved. I will record them here for direct reference when building again in the future.

1. First, check the CentOS version to ensure that it is CentOS7 or above and the system kernel is above 3.10——

[ root@ 192 opt ]# uname -r
3.10 . 0 - 693. el7 . x86_64


2. Uninstall the old docker version

sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest\
docker-latest-logrotate \
docker-logrotate \
docker-engine


3. Install the required dependency packages

sudo yum install -y yum-utils
4. Set up a domestic mirror warehouse

sudo yum-config-manager \
--add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

5. Update the yum package index

yum makecache fast
6. Install docker-related docker-ce community docker ee enterprise version

sudo yum install docker-ce docker-ce-cli containerd.io
7. Start docker

systemctl start docker
At this time, a very strange exception occurred:

Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

Don’t panic, let’s check the daemon.json file format first:

vim /etc/docker/daemon.json
I found that the daemon.json file looks like this, and I don’t know why it is missing some characters after updating and downloading it directly...

It needs to be modified like this, that’s it

{"registry-mirrors": ["http://9600955f.m.daocloud.io"],
"insecure-registries": []
}

Next, you can start docker normally——

[root@192 opt]# systemctl daemon-reload
[root@192 opt]# systemctl start docker

If no error is reported, enter systemctl status docker.service. If the following information is displayed, the installation is started and the startup is successful:

After successful installation, when using docker version, the following information will generally appear:

[ root@ 192 opt ]# docker version
Client: Docker Engine - Community
Version: 20.10 . 8
API version: 1.41
Go version: go1. 16 . 6
Git commit: 3967b7d
Built: Fri Jul 30 19 : 55 : 49 2021
OS/Arch: linux/amd64
Context:default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10 . 8
API version: 1.41 ( minimum version 1.12 )
Go version: go1. 16 . 6
Git commit: 75249d8
Built: Fri Jul 30 19 : 54 : 13 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4 . 9
GitCommit: e25210fe30a0a703442421b0f60afac609f950a3
runc:
Version: 1.0 . 1
GitCommit: v1. 0 . 1 - 0 -g4144b63
docker-init:
Version: 0.19 . 0
GitCommit: de40ad0

When trying to pull down hello-world, a timeout problem occurred:

[root@192 opt]# docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/library/hello-world/manifests/sha256:393b81f0ea5a98a7335d7ad44be96fe76ca8eb2eaa76950eb8c989ebf2b78ec0": net/http: TLS handshake timeout.
See 'docker run --help'.

At this time, you need to change the information in the daemon.json file to the domestic Alibaba Cloud image configuration, which can improve the pulling speed and avoid timeout problems, as follows:

{"registry-mirrors": ["https://6kx4zyno.mirror.aliyuncs.com"],
"insecure-registries": []
}
Then, restart systemctl restart docker.

[root@192 opt]# sudo systemctl restart docker
and try to execute docker run hello-world again. This time it works fine:

[root@192 opt]# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
2db29710123e: Pull complete
Digest: sha256:393b81f0ea5a98a7335d7ad44be96fe76ca8eb2eaa76950eb8c989ebf2b78ec0
Status: Download ed newer image for hello- world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.
Check whether the hello-world image has been successfully downloaded. You can see that the hello-world image has been pulled into docker:

root@192 opt]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest feb5d9fea6a5 40 hours ago 13.3kB
nginx latest f35646e83998 11 months ago 133MB
ubuntu latest 549b9b86cb8d 21 months ago 64.2MB

————————————————