Tag Archives: Operation and maintenance

Solutions to ADB failed to start daemon

a lot of people have this problem

adb server is out of date. killing…
ADB server didn’t ACK
* failed to start daemon *

baidu, there are all kinds of perfect solutions, that is, 5037 port is occupied, according to the online steps to operate

netstat -ano | findstr “5037”

find the corresponding process number and stop the corresponding process in task manager.

but after using this method to start adb, the error is still reported as above, and then to find the port occupying 5037 is adb. Exe.

right-click in the process and open the location of the process, and find that the process of adb. Exe is the adb that I installed in Genymotion (D:\Program Files\Genymobile\Genymotion\tools
adb. Exe), and it is this process that preempts the port of 5037.

enter the Genymotion setting path interface, select ADB TAB, the first is to use the default Genymotion ADB, select the second, the second is to use ADB. It is ok to restart and start

reproduced in: https://www.cnblogs.com/Maggie2019/p/11120642.html

Failed to get D-Bus connection: No such file or directory

when running centos7 image in docker, error
[root@2181bc14e47f /]# systemctl list-units
Failed to get d-bus connection: No such file or directory
d-bus allows the program to register on it to provide services to other programs. It also provides the possibility for the client program to query what services are available. Applications can also be registered to wait for kernel events, such as hardware hotplug. It is a three-tier inter-process communication (IPC) system, including:
function library libdbus, used for calling contacts and interacting messages between two applications. A message constructed based on libdbus, the bus daemon can connect to multiple applications simultaneously and can route messages from one application to 0 or more other programs. A series of Wrapper libraries based on specific application frameworks. D-bus is designed for two specific situations:
communication between two desktop applications within the same desktop session, allowing the desktop session to be integrated as a whole to solve problems related to the process lifecycle. Communication between a desktop session and an operating system, where the operating system generally includes the kernel and system daemons.
after the docker exit
$docker run — br> $docker run –privileged/ti-e “container=docker” centos7-base /usr/sbin/init
-privileged docker introduction, using this parameter, the root in the container has the real root privilege, otherwise, the root in the container is just an external ordinary user privilege. The container that the Privileged starts can see a lot of equipment on host and mount can be performed.
even allows you to start a docker container in a docker container. -e “container=docker” sets the environment variable that processes inside the container can get directly.
can now execute the systemctl command

/root @ bd5aa199dbc9 ~ # systemctl status SSHD
low SSHD. Service – the OpenSSH server daemon
the Loaded: the Loaded (/ usr/lib/systemd/system/SSHD. Service; enabled; Vendor pre: enabled)
Active: inactive (dead)
Docs: man: SSHD (8)
man:sshd_config(5)

Rsync: failed to exec SSH: no such error in remote Rsync

1. Transfer the file /etc/hosts to 10.41.1.77/MNT /
[root@backup ~]# rsync-avz /etc/hostess-p 22′ [email protected]:/ MNT /
rsync: Failed to exec SSH No to the file or directory (2)
rsync error: error in the IPC code (code 14) at pipe. C (84) [sender = 3.0.6]
rsync: connection unexpectedly closed (0 bytes received so far) (sender)
rsync error: Error in IPC code (code 14) at io.c(600) [sender=3.0.6]
### # check the reason is that SSH client has not been installed ### # br>[root-backup MNT]# yum install openssh-counts-y
[root-@backup MNT]# rsync avz /etc/hosts-p 22′ [email protected]:/MNT/
The authenticity of host ‘10.41.1.77 (10.41.1.77)’ can ‘t be established.
RSA key fingerprint is: 85 4 f: when d: 41: e2: fb: eb: 88: e2: ba: ce: 4 e: 5 a: 49: c4.
Are you sure you want to continue connecting (yes/no)?Yes
Warning: Permanently added ‘10.41.1.77’ (RSA) to the list of known hosts.
[email protected]’s password:
bash: rsync: command not found: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: Remote command not found (code 127) at IO. C (600) [sender=3.0.6]
[root-@backup MNT]# rrm-qa rsync
rsync 3.0.6-12. El6.x86_64
prompt bash: rsync: Rsync program
client installer
[root-@nfs01 MNT]# yum install rsync-y
retransmit
[root-@backup MNT]# rsync-avz /etc/hosts-ssh-p 22′ [email protected]:/ MNT /
[email protected]’s password:
sending incremental file list
hosts

sent 196 bytes received 31 bytes 41.27 bytes/ SEC
total size is 309 speedup is 1.36
target computer check to see if the transmission was successful
[root@nfs01 MNT]# ls
hosts
chuan successfully

reproduced in: https://blog.51cto.com/11956937/2067602

PHP error Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error:

introduction

project cannot be accessed after porting to the new VPS. Error message:
Warning: Unknown: failed to open stream: Permission denied in on line 0
Fatal error: Unknown: Failed opening required ‘/ var/WWW/project/index. PHP’ (include_path = ‘. :/usr/share/PHP ‘) in the Unknown on line 0

solution

key information: failed to open stream — Permission denied Permission

reason: the project folder as a whole does not have read/write permissions, so PHP cannot parse

solution:

cd /var/www/project/

sudo chmod -R 0755 ./

is the same as 0755 or 0777

Linux_ day07_ 05_ Configure common add, delete, modify and query commands in network

configuration network commonly used add, delete, change search command

modify the IP address
  1. modify the configuration file

    /etc/sysconfig/network-scripts/ifcfg-ens33

  2. ifconfig command
    ifconfig ens33:0 192.168.235.127/24
    

  3. IP command
    ip addr add 192.168.235.127/24 dev ens33 label ens33:1
    

  4. nmcli command
    nmcli connection modify ens33 ipv4.address 192.168.80.100/24 # 修改ip地址
    nmcli connection modify ens33 ipv4.gateway 192.168.80.2/24 #修改网关
    nmcli connection modify ens33 ipv4.dns1 114.114.114.114 # 修改dns信息
    nmcli connection modify ens33 ipv4.method mannual # 指定网络信息获取方式为手动指定
    
open/disable network card
  1. ifconfig command
    ifconfig ens33 up
    ifconfig ens33 down
    

  2. ifup/ifdown command
    ifup ens33
    ifdown ens33
    

  3. IP command
    ip link set ens33 up
    ip link set ens33 down
    

  4. nmcli command
    nmcli device connect ens33
    nmcli device disconnect ens33
    
add routing
  1. modify the configuration file

    /etc/sysconfig/network-scripts/route-ens33

    The

    • way

      target via gw
      220.181.38.148 via 192.168.80.2

    • each three lines defines a route
      ADDRESS0=TARGET
      NETMASK0=MASK
      GATEWAY0=GW

      Blockquote>

  2. route command
    route add -net 192.168.235.0 netmask 255.255.255.0 gw 192.168.235.2 dev ens33
    

  3. IP command
    ip route add 192.168.80.0/24 via 192.168.80.2 dev ens33 # 添加网络路由
    ip route add 192.168.80.100 via 192.168.80.0 dev ens33 #添加主机路由
    ip route add default via 192.168.80.2 dev ens33 # 添加默认路由
    
modify routing
  1. modify the configuration file

    /etc/sysconfig/network-scripts/route-ens33

    The

    • way

      target via gw
      220.181.38.148 via 192.168.80.2

    • each three lines defines a route
      ADDRESS0=TARGET
      NETMASK0=MASK
      GATEWAY0=GW

      Blockquote>

  2. IP command
    ip route change # 如果路由本身不存在则报错显示不存在
    ip route replace # 如果路由本身不存在则会直接创建该路由信息
    
delete route
  1. delete the configuration file

    /etc/sysconfig/network-scripts/route-ens33

  2. the route command
    route del -net 192.168.235.0 netmask 255.255.255.0 gw 192.168.235.2 dev ens33
    

  3. IP command
    ip route del 192.168.80.0/24 via 192.168.80.2 dev ens33
    
view routing table
  1. the route command
    route -n
    

  2. netstat command
    netstat -r # 显示内核路由表
    netstat -n # 数字格式(不进行反向解析)
    

Centos7 quick installation of docker and configuration of image acceleration

follow the official documentation step by step

https://docs.docker.com/engine/install/centos/

1: uninstall the old version

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

2: download docker dependent packages and configure docker warehouse address

 sudo yum install -y yum-utils
 sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

3: install docker’s engine, operate docker’s client, and its container

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

after the execution of the installation is complete

start docker command:

sudo systemctl start docker

set docker startup:

sudo systemctl enable docker

view docker version:

docker -v

view docker image:

sudo docker images

configure image acceleration: configure ali cloud

1: create directory

sudo mkdir -p /etc/docker

2: configure the mirror accelerator address

sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://17o3zxc0.mirror.aliyuncs.com"]
}
EOF

3: restart docker background thread

sudo systemctl daemon-reload

4: restart docker service

sudo systemctl restart docker


Huawei cloud Kunpeng server docker installation VIM error

problem description

huawei cloud kunpeng server docker installation vim error, architecture is Arm64,

W: Failed to fetch http://ftp.tw.debian.org/debian/dists/jessie/Release  Unable to find expected entry 'main/binary-arm64/Packages' in Release file (Wrong sources.list entry or malformed file)

, I can’t find

root@d15291ceae43:/etc/mysql# apt-get install vim
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package vim

and then update failed

root@d15291ceae43:/etc/mysql# apt-get update
Ign http://ftp.tw.debian.org jessie InRelease
Hit http://ftp.tw.debian.org jessie Release.gpg
Hit http://ftp.tw.debian.org jessie Release
W: Failed to fetch http://ftp.tw.debian.org/debian/dists/jessie/Release  Unable to find expected entry 'main/binary-arm64/Packages' in Release file (Wrong sources.list entry or malformed file)

solution, add source

printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list

update

apt-get update

installs

again

apt-get install vim

installed successfully

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