Tag Archives: Operation and maintenance

Linux Virtual Machine Boot Container: Error response from daemon: driver failed programming external connectivity on endpoint

docker: Error response from daemon: driver failed programming external connectivity on endpoint tomcat01 (00028237b8dd7b21dbce757be3bf2df0e0fcfa6c3987cac68c42d2fb6603b42d): 
(iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 49162 -j DNAT --to-destination ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1)).

When starting a docker container or doing docker configuration, setting a configuration such as restart for the firewall
will clear the relevant configuration of docker, resulting in the query firewall rules when the docker chain is not displayed

The specific reason is that you deleted the chain in iptables
There are many ways to remove the links

restart firewalld firewall can be cleared, firewalld is centos7 or more, iptables is centos6 or less will have, and the underlying firewalld is involved in the iptables, so when it comes to firewall firewalld commands or commands in the iptables Be careful to remove the chain that involves docker

The solution is to restart the Docker engine

systemctl restart docker

Query the chain of the docker againiptables -L
or use this command to queryiptables -t nat - nL

Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to

Installed calico using the tigera-operator method and reported an error after startup, all calico related pods show CrashLoopBackoff.

kubectl -n calico-system describe pod calico-node-2t8w6 and found the following error.

Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to connect to BIRDv4 socket: dial unix /var/ run/calico/ bird.ctl: connect: no such file or directory.

Cause of the problem:

We are experiencing this issue during a Kubernetes Cluster deployment. Since Calico automatically detects IP addresses by default using the first-found method and gets the wrong address, we need to specify the detection method manually.

1. Remove all the claico

kubectl -n tigera-operator get deployments.apps -o yaml > a.yaml
kubectl -n calico-system get daemonsets.apps calico-node -o yaml > b.yaml
kubectl -n calico-system get deployments.apps calico-kube-controllers -o yaml > c.yaml
kubectl -n calico-system get deployments.apps calico-typha -o yaml > d.yaml
kubectl -n calico-apiserver get deployments.apps calico-apiserver -o yaml > e.yaml
kubectl delete -f a.yaml
kubectl delete -f b.yaml
kubectl delete -f c.yaml
kubectl delete -f d.yaml
kubectl delete -f e.yaml
2. Remove custom-resources.yaml
kubectl delete -f tigera-operator.yaml
kubectl delete -f custom-resources.yaml

3. Remove vxlan.calico
ip link delete vxlan.calico

4. Modify custom-resources.yaml file and add nodeAddressAutodetectionV4:
# This section includes base Calico installation configuration.
# For more information, see: https://projectcalico.docs.tigera.io/v3.23/reference/installation/api#operator.tigera.io/v1.Installation
apiVersion: operator.tigera.io/v1
kind: Installation
name: default
# Configures Calico networking.
# Note: The ipPools section cannot be modified post-install.
#bgp: Enabled
#hostPorts: Enabled
– blockSize: 26
encapsulation: VXLANCrossSubnet
natOutgoing: Enabled
nodeSelector: all()
#linuxDataplane: Iptables
#multiInterfaceMode: None
interface: ens.*

# This section configures the Calico API server.
# For more information, see: https://projectcalico.docs.tigera.io/v3.23/reference/installation/api#operator.tigera.io/v1.APIServer
apiVersion: operator.tigera.io/v1
kind: APIServer
name: default
spec: {}
5. Re-create
kubectl create -f tigera-operator.yaml
kubectl create -f custom-resources.yaml
kubectl -n calico-system get daemonsets.apps calico-node  -o yaml|grep -A2 IP_AUTODETECTION_METHOD

Petalinux Failed to open PetaLinux lib: librdi_commonxillic.so: cannot open shared object file:

Petalinux create app reported an error

mrzhang@ubuntu:~/works/MZ702P_FEP$ petalinux-create -t apps -n testapp --enable --force
INFO: Create apps: testapp
WARNING: Component "/home/mrzhang/works/MZ702P_FEP/project-spec/meta-user/recipes-apps/testapp" already exists.
WARNING: --force parameter specified, overwriting
INFO: New apps successfully created in /home/mrzhang/works/MZ702P_FEP/project-spec/meta-user/recipes-apps/testapp
INFO: Enabling created component...
INFO: sourcing bitbake
INFO: oldconfig rootfs
INFO: testapp has been enabled 
Failed to open PetaLinux lib: librdi_commonxillic.so: cannot open shared object file: No such file or directory.


sudo echo "/opt/pkg/petalinux/2018.3/tools/lib" > /etc/ld.so.conf.d/petalinux.so.conf
sudo ldconfig

Extended content:

Solution to ‘cannot open shared object file’ (Linux ):

1. Prompt when calling the dynamic library .so file in Linux:

cannot open shared object file: No such file or directory


1. At this time, enter ldd xxx to check which libraries are missing

libmysqlcppconn.so.7 => not found
libboost_system.so.1.64.0 => not found

2. Set variable LD_LIBRARY_PATH

sudo gedit ~/.bashrc

Add on the last line:


Re-open bash and then ldd to find the library path.

2. (Recommended) Modify the shared library configuration file /etc/ld.so.conf
1. Setting:

sudo gedit /etc/ld.so.conf

2. Add library path:

include /etc/ld.so.conf.d/*.conf

Save and exit
3. Make the configuration effective immediately

sudo ldconfig

[Solve] Yinhe Qilin V10 System Error: Failed to download metadata for repo ‘ks10-adv-os‘

In the use of Yinhe Kirin system will be installed from time to time, yum command is the most convenient and fast command, but in the process of using the Failed to download metadata for repo ‘ks10-adv-os’ such an error how to solve it?

After several attempts, I finally succeeded in solving it, and the following is the specific solution.
Enter the yum source file directory
cd /etc/yum.repos.d
Back up the yum source files
cp kylin_aarch64.repo kylin_aarch64.repo.bak

Modify the contents of the source file
Enter the command: vim kylin_aarch64.repo
Delete the original code and copy the following code over

name = Kylin Linux Advanced Server 10 - Os
baseurl = http://archive2.kylinos.cn/rpm/kylin/production/KY-KY10-GFB-aarch64/custom/kylin-server/KY10-GFB-aarch64/
#baseurl = http://update.cs2c.com.cn:8080/NS/V10/V10SP1/os/adv/lic/base/$basearch/
gpgcheck = 0
enabled = 1

name = Kylin Linux Advanced Server 10 - Updates
baseurl = http://update.cs2c.com.cn:8080/NS/V10/V10SP1/os/adv/lic/updates/$basearch/
gpgcheck = 0
enabled = 0

name = Kylin Linux Advanced Server 10 - Addons
baseurl = http://update.cs2c.com.cn:8080/NS/V10/V10SP1/os/adv/lic/addons/$basearch/
gpgcheck = 0
enabled = 0

Use the download command:
reposync -v –installroot /opt/aarch64/
After completion, you can see that the yum install program name can be downloaded normally, no error will be reported

[Solved] Pycharm Failed to Upload: Upload to *** failed. Could not list the contents of folder “sftp

Problem description:

Use pycharm to connect to the remote server. It has been working well before. Suddenly, there is a problem that cannot be uploaded. The problem prompt is as follows:

Upload to *** failed. Could not list the contents of folder “sftp:***”. (Timeout expired)

Analysis and Solution:

First, look at the sftp connection. It is found that it is normal

The problems may be caused by the lack of permissions on the remote server and the problem of path mapping. It is strange that there are no such problems after checking. I think the problem may case by the path.

In the path set before, Root path is / and Development path is the project path. Change it to Root path is the project path directly and Development path is /, then you can upload it normally.

[Solved] Sed Failed to Reference Variable error: extra characters after command


Operating system: CentOS
Background: shell script


sudo sed -n '842,${line}p' /.../file > ./file1

After execution, an error is reported:
– e expression # 1, char 7: extra characters after command.


After investigation, it is found that it is OK to replace single quotation marks with double quotation marks, as follows:

sudo sed -n "842,${line}p" /.../file > ./file1

If none of the methods found work, try this one.

Remember that variables cannot be referenced within single quotes.


[Solved] libvirtd Error: virNetServerAddClient:271 : Too many active clients

error: virNetServerAddClient:271 : Too many active clients (20), dropping connection from; 0

Reason: The number of libvirt client links exceeds the maximum number allowed by libvirtd, causing new client links to be discarded
Solution: Temporary workaround: modify max_clients in /etc/libvirt/libvirtd.conf to be larger, then restart libvirtd
Long-term solution: locate the cause of client link overflow on the server

The following figure shows that the destruction of a large number of cvm sub machines on the server failed, resulting in client link overflow. The solution is to migrate the running cvm sub machines on the master machine, and then restart the master machine

Cannot start container 39f96c64a9c6: [8] System error: exec format error

An error occurred when Docker started the container!

Error response from daemon: Cannot start container 39f96c64a9c6: [8] System error: exec format error
FATA[0000] Error: failed to start one or more containers

Cause: Running a 64 bit Docker image on a 32-bit system

To view the system version:

  • uname -a
  • lsb_release -a


Install and use docker in Ubuntu 14.04 (32-bit)

New Error as below:

FATA[0000] Post http:///var/run/docker.sock/v1.18/images/create?fromSrc=ubuntu%3A14.04&repo=: dial unix /var/run/docker.sock: permission denied. Are you trying to connect to a TLS-enabled daemon without TLS?

Solution: Switch to root administrator status to solve the problem!

PHP php-config is not installed error in ubuntu 16 [How to Solve]


Ubuntu 16.04.1 LTSPHP 7.0.33


When compiling and installing php extensions with php config, it is found that php-config does not exist.

Check whether php-config exists or not?

$ whereis php-config

As above, it returns null, indicating that it does not exist.


This problem occurs because the php-dev package is not installed. You can install it once.

Install php-dev

$ apt-get install php-dev

If php5 is version, run apt-get install php5-dev.

re-check php-config

$ whereis php-config
php-config: /usr/bin/php-config /usr/bin/php-config7.0 /usr/share/man/man1/php-config.1.gz

As shown above, the installation is successful.

[Solved] Docker Filed to Start Container: Error response from daemon: network XXX not found

[root@xxx dc-gitlab]# docker start cce932ba5dc2
Error response from daemon: network ase6cd78ccf7f24c49871653f2dd not found
Error: failed to start containers: css932ba5dd3

The above are error messages. The previous bridging is configured.



docker-compose up -d --force-recreate

It can be solved.


During the production launch, the port of the gitlab started by Docker cannot be accessed suddenly. It is OK to check the corresponding server listening port. It can be pinged, but the telnet port is not. In an hurry to go online, I had to restart the server and Docker, and then the above problem occurred.