Tag Archives: cents

[Solved] Rsync synchronization Error: @ERROR: Unknown module xxx

Scenario:

Push files from server a to server B

Error message

@ERROR: Unknown module ‘xxx’

rsync error: error starting client-server protocol (code 5) at main. c(1649) [sender=3.1.6]

Finally, it is found that the default configuration file of Rsync is rsyncd.com under/etc.conf instead of the file rsyncd. In the/etc/rsyncd/folder.conf

Solution 1: directly configure /etc/rsyncd.conf file, the operation steps are omitted.

Solution 2:

(1) Modify VIM /lib/SYSTEMd/system/rsyncd.service,

The following is the configuration content

[Unit]
Description=fast remote file copy program daemon
ConditionPathExists=/etc/rsyncd/rsyncd.conf

[Service]
EnvironmentFile=/etc/sysconfig/rsyncd
ExecStart=/usr/bin/rsync --config=/etc/rsyncd/rsyncd.conf  --daemon --no-detach "$OPTIONS"

[Install]
WantedBy=multi-user.target

(2) Reload the background process and restart the Rsync service to synchronize.

systemctl daemon-reload

systemctl restart rsyncd

Related commands:

Systemctl daemon reload daemon

Systemctl restart rsyncd restart synchronization service

Systemctl start rsyncd# start

Systemctl stop rsyncd stop

systemctl status rsyncd. Service view Rsync status

PS aux | grep Rsync | viewing process

CentOS 8: No URLs in mirrorlist error [How to Solve]

Question:

In CentOS 8, there is an error using yum. There is no URL in the image list, similar to the following:

Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

reason:

On January 31, 2022, the CentOS team finally removed all packages of CentOS 8 from the official image.

CentOS 8 has expired on December 31, 2021, but the software package has been retained on the official image for some time. Now they are transferred to https://vault.centos.org

Solution:

If you still need to run CentOS 8, you can run it in/etc/yum repos. Update the source in D. Use vault.centos.Org instead of mirror.centos.org.

sudo sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*
sudo sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*

Essentially, it replaces the previous URL with the URL that is still running. This problem should be solved within this period of time.

[Solved] yum Command Error: Error: Failed to download metadata for repo ‘appstream‘

From the official explanation:
CentOS Linux 8 had reached the End Of Life (EOL) on December 31st, 2021. It means that CentOS 8 will no longer receive development resources from the official CentOS project. After Dec 31st, 2021, if you need to update your CentOS, you need to change the mirrors to vault.centos.org where they will be archived permanently.

Solution: Execute the following statements in sequence

cd /etc/yum.repos.d/
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
yum update

Virtual machine ping Command Error: ping name or service not known

Problem description

In the process of using VMware, the virtual machine environment was configured, but due to the confusion of pending shutdown, the following errors were found when restarting today:
Ping www.google.com, the following errors are found: Ping name or service not known

Since it can be used correctly before, ensure that the virtual network editor of the virtual machine is configured correctly. If it is the first configuration and has not been successfully started before, you can check the configuration of the network editor.

In the process of finding a solution, the following errors are found by using the restart network command service network restart :
restarting network failed journalctl - Xe for detail control process exited with error code

Problem-solving

systemctl stop NetworkManager
systemctl disable NetworkManager
systemctl start network.service

[Solved] source /etc/profile Error: not a valid identifier

During the recent web automation test, I used Jenkins, a continuous integration tool, and then added my own alicloud server as the node, which is CentOS server. I am ready to install allure and configure the environment variables for it. I have set the environment variables myself, as shown below

-Use the source command to activate the environment variable

source /etc/profile

As a result, the following errors are reported

 

Solution:

Go directly to ~/.bash_profile to add environment variables, then go to activate it, and finally use the following command, go to enter, you can see my alure installation successfully

allure --version

[Solved] VMware Create a Virtual Machine Error: unsuccessful

VMware encountered a classic error when creating a virtual machine:

Attempting to start up from:
EFI VMware Virtual SCSI Hard Drive (0.0) … unsuccessful.
EFI VMware Virtual SATA CDROM Drive (1.0) … unsuccessful.
EFI Network…

Solution:
1 Find the VMX file in the installation directory of the virtual machine
2 Delete firmware = “EFI”
3 Save and restart the virtual machine to install normally

[Solved] CentOS Use Yum to install dependency: error: rpmdb open failed

When installing dependencies using Yum in CentOS, the following errors are reported:

the solution is as follows:

Execute the following commands in order

 # Go to the directory where rpmdb is located
 cd /var/lib/rpm
 # Clear the original rpmdb file
 rm -f __db.*
 # Rebuild the rpm database
 rpm --rebuilddb
 # Clear all yum caches
 yum clean all

After execution, use Yum to install the dependent packages normally

[Solved] docker Error: System has not been booted with systemd as init system (PID 1). Can‘t operate. Failed to con

Environment centos7 eight

The docker container reported an error using the systemctl command:

[root@d7a74069b83c yum.repos.d]# systemctl status firewalld
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down

Solution:

Add the parameter — privileged when starting the container

[root@localhost ~]# docker run -itd --name c8 --privileged centos /usr/sbin/init
6a6a3c9f9fa9acc59d62a6e82ccb6a637db8aada004aa8a096c6061108c6b144
[root@localhost ~]# docker exec -it c8 /bin/bash