Tag Archives: The server

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 172.17.0.2:8080 ! -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

[Solved] failed to set bridge addr: “cni0“ already has an IP address different from xxxx

failed to set bridge addr: “cni0“ already has an IP address different from xxxx

Recently, when debugging Kubernetes to add or delete a node, and then deploying Pod on this node, a network card address error exception occurred. The troubleshooting solution for this exception is as follows:

Error:

(combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox “745720ffb20646054a167560299b19bb9ae046fe6c677b5d26312b89a26554e1”: failed to set bridge addr: “cni0” already has an IP address different from 172.20.2.1/24

 

Solution:

  1. Delete the node without restarting the node server, restart the node server (in this case, it is usually caused by the server cache, restart the server on it)
  2. After restarting the server or not, delete the wrong NIC on the node and wait for the system to rebuild automatically, the operation process is as follows.
sudo ifconfig cni0 down    
sudo ip link delete cni0

Centos8 Could not restart the Network: Failed to restart network.service: Unit network.service not found

Error:

[root@centos8 ~]# service network  status
Redirecting to /bin/systemctl status network.service
Unit network.service could not be found.

[root@centos8 ~]# systemctl status network.service
Unit network.service could not be found.

[root@centos8 ~]# systemctl status network
Unit network.service could not be found.

[root@centos8 ~]# systemctl restart network
Failed to restart network.service: Unit network.service not found.

After installing Centos8, configure the static IP address. If you want to restart the network, the previous commands on Centos7 are hard to use

Error reported as above

After checking the data, it is found that the original network has been replaced by Centos8. The new version is called NetworkManager

This tool is amazing and easy to use. especially those related to wifi,

So you can restart with this command: systemctl restart NetworkManager

[root@centos8 ~]# systemctl status  NetworkManager
● NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-10-15 22:20:43 CST; 9min ago
     Docs: man:NetworkManager(8)
 Main PID: 7299 (NetworkManager)
    Tasks: 3 (limit: 11357)
   Memory: 6.8M
   CGroup: /system.slice/NetworkManager.service
           └─7299 /usr/sbin/NetworkManager --no-daemon

 

[Solved] docker Startup Error: Job for docker.service failed because the control process exited with error code

I. Error

docker service startup error: sudo systemctl restart docker, prompt: Job for docker.service failed because the control process exited with error code. See “systemctl status docker.service” and “journalctl -xe” for details.
check the status fo the service: systemctl status docker.service

II. Problem-solving
1. Enter the docker directory: cd /etc/docker/
2. Modify the type of daemon: mv daemon.json daemon.conf
3. Restart docker: systemctl restart docker

[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] Windows Nginx Startup Error: bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket

Solution 1:

(1) Check the error.log in the nginx-1.19.2\logs directory, and learn that the error message is: bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)

(2) Press win+r, type cmd, and open the administrator interface

(3) type netstat -aon|findstr :80, find the port number 0.0.0.0:80 is occupied, check the pid value of 4

(4) Enter tasklist | findstr “4” to find the name corresponding to port 4, which is System

(5) after viewing the System system occupancy can not be manually terminated, the reason is SQLServer Reporting Services, stop this service and set to start manually can, after starting nginx, need to restart SQLServer Reporting Services

Disadvantage: This approach requires you to stop SQLServer Reporting Services again after each boot, and then start nginx

Solution 2:

Modify the default port number under nginx.conf

(1) Open the nginx.conf file in the nginx directory with Notepad

(2) Press win+r, type cmd, open the administrator interface, type netstat -aon|findstr :expected port number to see if your expected port number is occupied

(3) Modify nginx.conf, and then save it

(4) At the command prompt, type nginx -s reload (an important step)

(5) Then type start nginx at the command prompt

(6) in the browser localhost:81, if the following page appears in the modified successful

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

Environment:

Operating system: CentOS
Background: shell script

Question:

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

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

Solution:

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.

DONE!

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

error: virNetServerAddClient:271 : Too many active clients (20), dropping connection from 127.0.0.1; 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

[Solved] Linux error E: dpkg is broken, you must manually run ‘sudo dpkg –configure -a’ to resolve this issue

Executes the Linux commandsudo apt install curland reports an error:

E: dpkg is interrupted. You must manually run ‘sudo dpkg — configure – a’ to solve this problem

System version: Ubuntu 20.04 LTS

Solution: three-step command line

sudo rm /var/lib/dpkg/updates/*
sudo apt-get update
sudo apt-get upgrade

[Solved] Frida-server Startup Error: syntax error: unexpected‘(‘

Problem description:

An error will be reported after frida-server-15.2.android-arm64.xz is installed, as follows:

�5�5�5�5�: inaccessible or not found
./fs152201[2]: �: inaccessible or not found
./fs152201[80]: syntax error: unexpected '('

Solution:

The correct way is to switch to root privileges first. Then use the following command . /filename. To summarize, there is a problem with the boot method. The correct one is: . /filename

For example.

redfin:/data/local/tmp # . /fs152201

verification:

1: Premise:

1.1: Install the corresponding version of frida on the PC side

pip  install frida
pip install frida-tools

1.2: Check the version of frida. The server should be installed to the matching version

frida –version

2: Start to verify whether the frida-server installation is successful or not. Execute the following commands in the cmd window. If a list appears, it indicates success.

 frida-ps -U