Tag Archives: Troubleshooting

Python requests Error: ConnectionError: (‘Connection aborted.‘, error(104, ‘Connection reset by peer‘))

Python requests error

ConnectionError: (‘Connection aborted.’, error(104, ‘Connection reset by peer’))

There are two possible causes

1. Requests are too frequent, resulting in requests being rejected

Solution:

Set a sleep time for each request, such as
time sleep(1)

2. The interface has authentication or anti crawling mechanism. It is recognized that it is accessed by Python terminal, and the access is rejected

Solution:

Set user agent in request header to bypass authentication

as

headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko',"Content-Type": "application/json"}

Docker Open Error: Warning: docker.service changed on disk. Run ‘systemctl daemon-reload‘ to reload unit

[root@ct system]# systemctl start docker
Warning: docker.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

System ctl daemon-reload

System ctl start docker

[Solved] K8s cluster build error: error: kubectl get csr No resources found.

K8s cluster setup error: error: kubectl get CSR no resources found

Problem cause and solution test successful

problem

kubectl get csr
No resources found.

reason

because the original SSL certificate is invalid after restart, if it is not deleted, kubelet cannot communicate with the master even after restart 

Solution:

cd /opt/kubernetes/ssl
ls
kubelet-client-2021-04-14-08-41-36.pem  kubelet-client-current.pem  kubelet.crt  kubelet.key
# Delete all certificates 
rm -rf *
# close or open the kubelet
systemctl stop kubelet

master01

kubectl delete clusterrolebinding kubelet-bootstrap
clusterrolebinding.rbac.authorization.k8s.io "kubelet-bootstrap" deleted

kubectl create clusterrolebinding kubelet-bootstrap --clusterrole=system:node-bootstrapper --user=kubelet-bootstrap
clusterrolebinding.rbac.authorization.k8s.io/kubelet-bootstrap created

node 

#open kubelet
#node01
bash kubelet.sh 192.168.238.82
#node02
bash kubelet.sh 192.168.238.83

Test successful

master01

kubectl get csr
NAME                                                   AGE   REQUESTOR           CONDITION
node-csr-mJwuqA7DAf4UmB1InN_WEYhFWbQKOqUVXg9Bvc7Intk   4s    kubelet-bootstrap   Pending
node-csr-ydhzi9EG9M_Ozmbvep0ledwhTCanppStZoq7vuooTq8   11s   kubelet-bootstrap   Pending

Done!!!

The cxx compiler identification is unknown

//Configure VS2015/VS2015/VS2015/VS2015/VS2015/VS2015/VS2015

The CXX compiler identification is unknown

Cmake can’t find the C++ compiler. Check the VS installation directory for cl.exe, rc.exe and rcdll. DLL.
If you do not have cl.exe, you may have only installed VS and no VC compiler. Open VS and select VC to install.
If you do not have rc.exe and rcdll. DLL, which are used for compiling resources, you may install them in the Windows SDK. You can directly copy these two files to the VC/bin directory.

Error from server (alreadyexists) clusterrolebindings.rbac.authorization .k8s.io “kubelet

problem description

create bootstrap role to give permission to connect apiserver request signature error, modified as follows:

[root@localhost kubeconfig]# kubectl create clusterrolebinding kubelet-bootstrap –clusterrole=system:node-bootstrapper –user=kubelet-bootstrap
Error from server (AlreadyExists): Clusterrolebindings, rbac authorization. K8s. IO “kubelet – the bootstrap” already exists

problem analysis

this is because an incorrect signature has been created previously, the signature is occupied, and the occupied signature

needs to be deleted

problem solved

1. Delete signature

kubectl delete clusterrolebindings kubelet-bootstrap

2, recreate successfully

[root@localhost kubeconfig]# kubectl create clusterrolebinding kubelet-bootstrap –clusterrole=system:node-bootstrapper –user=kubelet-bootstrap
clusterrolebinding.rbac.authorization.k8s.io/kubelet-bootstrap created