Richard G
Verified User
Exactly which same problem?I'm having the exact same problem
I don't have any issues on our Centos 7 servers.
Exactly which same problem?I'm having the exact same problem
As described in the first post. At least I was assuming it is the same issue. Happened to me after running routine updates through Custombuild earlier today.Hello, in DA Service Monitor I have 2 stopped services:
When I try to run that services, there are errors:
- clamav-freshclam
- clamd@scan
Cannot find the script in /etc/systemd/system, /usr/lib/systemd/system, nor /lib/systemd/system
/lib/systemd/system/clamav-freshclam.service
Cannot find the script in /etc/systemd/system, /usr/lib/systemd/system, nor /lib/systemd/system
/lib/systemd/system/[email protected]
...
2023-01-08 16:50:58 localhost: dovecot.conf installed
2023-01-08 16:53:14 localhost: Dovecot 2.3.20 installed
2023-01-08 16:53:36 localhost: exim.conf installed
2023-01-08 16:53:54 localhost: Exim 4.96-58-g4e9ed49f8 installed
2023-01-08 16:54:33 localhost: SpamAssassin 4.0.0 installed
2023-01-08 16:55:11 localhost: ClamAV removed
2023-01-08 16:55:15 localhost: exim.conf installed
2023-01-08 16:55:15 localhost: ClamAV installed
...
Removing clamav...
Removing file: /usr/local/bin/clamav-config...
Removing file: /usr/local/include/clamav.h...
Removing file: /usr/local/include/clamav-types.h...
Removing file: /usr/local/include/clamav-version.h...
Removing file: /usr/local/include/libfreshclam.h...
Removing file: /usr/local/bin/clamconf...
Removing file: /usr/local/sbin/clamd...
Removing file: /lib/systemd/system/clamav-daemon.service...
Removing file: /lib/systemd/system/clamav-daemon.socket...
Removing file: /usr/local/bin/clamdscan...
Removing file: /usr/local/sbin/clamonacc...
Removing file: /lib/systemd/system/clamav-clamonacc.service...
Removing file: /usr/local/bin/clamscan...
Removing file: /usr/local/bin/sigtool...
Removing file: /usr/local/bin/clambc...
Removing file: /usr/local/bin/clamsubmit...
Removing file: /usr/local/bin/freshclam...
Removing file: /lib/systemd/system/clamav-freshclam.service...
Removing file: /usr/local/bin/clamdtop...
Removing file: /etc/clamd.conf.sample...
Removing file: /etc/freshclam.conf.sample...
Removing file: /usr/local/share/man/man1/clamscan.1...
Removing file: /usr/local/share/man/man1/freshclam.1...
Removing file: /usr/local/share/man/man1/sigtool.1...
Removing file: /usr/local/share/man/man1/clamdscan.1...
Removing file: /usr/local/share/man/man1/clamconf.1...
Removing file: /usr/local/share/man/man1/clamdtop.1...
Removing file: /usr/local/share/man/man1/clamsubmit.1...
Removing file: /usr/local/share/man/man1/clambc.1...
Removing file: /usr/local/share/man/man5/clamd.conf.5...
Removing file: /usr/local/share/man/man5/clamav-milter.conf.5...
Removing file: /usr/local/share/man/man5/freshclam.conf.5...
Removing file: /usr/local/share/man/man8/clamd.8...
Removing file: /usr/local/share/man/man8/clamav-milter.8...
Removing file: /usr/local/share/man/man8/clamonacc.8...
Removing directory: /usr/local/share/doc/ClamAV...
Removing clamav/freshclam from services.status...
Removing clamd systemd script...
Removed symlink /etc/systemd/system/multi-user.target.wants/clamd.service.
Removing freshclam systemd script...
Removed symlink /etc/systemd/system/multi-user.target.wants/freshclam.service.
Removing ClamAV configuration file /etc/clamd.conf...
Removing Freshclam configuration file /etc/freshclam.conf...
Disabling ClamAV in exim.conf...
Removing ClamAV Database: /usr/local/share/clamav...
Removing ClamAV symlinks from /usr/bin...
Restarting exim...
ClamAV has been successfully removed.
Installing clamav...
Error: Nothing to do
Error: Nothing to do
grep: /etc/clamd.d/scan.conf: No such file or directory
/usr/local/directadmin/custombuild/build: line 18254: /etc/clamd.d/scan.conf: No such file or directory
grep: /etc/clamd.d/scan.conf: No such file or directory
/usr/local/directadmin/custombuild/build: line 18257: /etc/clamd.d/scan.conf: No such file or directory
grep: /etc/clamd.d/scan.conf: No such file or directory
Can't open /etc/clamd.d/scan.conf: No such file or directory.
grep: /etc/freshclam.conf: No such file or directory
Enabling clamd in systemd...
Failed to execute operation: No such file or directory
Failed to execute operation: No such file or directory
Restarting freshclam.
Failed to restart clamav-freshclam.service: Unit not found.
Restarting clamd.
Failed to restart [email protected]: Unit not found.
Restarting exim.
Done ClamAV.
That's odd, but that would explain the missing services.Installing clamav...
Error: Nothing to do
Error: Nothing to do
yum install clamav
# yum install clamav
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.binaryracks.com
* extras: mirrors.coreix.net
* updates: uk.mirror.nsec.pt
base | 3.6 kB 00:00
extras | 2.9 kB 00:00
updates | 2.9 kB 00:00
vz-base | 951 B 00:00
vz-updates | 951 B 00:00
No package clamav available.
Error: Nothing to do
# yum list available *clam*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.binaryracks.com
* extras: mirrors.coreix.net
* updates: uk.mirror.nsec.pt
Error: No matching Packages to list
# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.binaryracks.com
* extras: mirrors.coreix.net
* updates: uk.mirror.nsec.pt
repo id repo name status
base/7/x86_64 CentOS-7 - Base 9933+139
extras/7/x86_64 CentOS-7 - Extras 515
updates/7/x86_64 CentOS-7 - Updates 4480+58
vz-base vz-base 1
vz-updates vz-updates 4
repolist: 14933
That's the output, including a few checks for extra info. Again, I made no changes whatsoever other than running the updates. The update script uninstalled and then tried to reinstall clamav, so I guess clamav might have been unavailable for longer, but it wasn't noticed.# yum -y install epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.binaryracks.com
* extras: mirrors.coreix.net
* updates: uk.mirror.nsec.pt
Package epel-release-7-11.noarch already installed and latest version
Nothing to do
Aha... I already see what is happening.The other solution I haven't tried yet, because I guess the fact that clamav isn't available probably points in a different direction?
yum clean all
yum --enablerepo=epel makecache
yum install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd
Maybe you can check on one of your CentOS 7 servers if clamav is available to you? Because that would seem like the other obvious explanation (not available, as in: not available).# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base extras updates vz-base vz-updates
Cleaning up list of fastest mirrors
Other repos take up 38 M of disk space (use --verbose for details)
# yum --enablerepo=epel makecache
Loaded plugins: fastestmirror
Determining fastest mirrors
epel/x86_64/metalink | 25 kB 00:00:00
* base: mirrors.coreix.net
* epel: lon.mirror.rackspace.com
* extras: mirrors.binaryracks.com
* updates: mirrors.coreix.net
base | 3.6 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
vz-base | 951 B 00:00:00
vz-updates | 951 B 00:00:00
(1/16): base/7/x86_64/group_gz | 153 kB 00:00:00
(2/16): base/7/x86_64/primary_db | 6.1 MB 00:00:00
(3/16): base/7/x86_64/filelists_db | 7.2 MB 00:00:00
(4/16): base/7/x86_64/other_db | 2.6 MB 00:00:00
(5/16): epel/x86_64/prestodelta | 429 B 00:00:00
(6/16): epel/x86_64/group_gz | 99 kB 00:00:00
(7/16): epel/x86_64/primary_db | 7.0 MB 00:00:00
(8/16): epel/x86_64/updateinfo | 1.0 MB 00:00:00
(9/16): extras/7/x86_64/filelists_db | 276 kB 00:00:00
(10/16): epel/x86_64/other_db | 3.4 MB 00:00:00
(11/16): epel/x86_64/filelists_db | 12 MB 00:00:00
(12/16): extras/7/x86_64/other_db | 149 kB 00:00:00
(13/16): extras/7/x86_64/primary_db | 249 kB 00:00:00
(14/16): updates/7/x86_64/filelists_db | 10 MB 00:00:00
(15/16): updates/7/x86_64/other_db | 1.2 MB 00:00:00
(16/16): updates/7/x86_64/primary_db | 19 MB 00:00:00
(1/6): vz-base/filelists | 326 B 00:00:00
(2/6): vz-base/primary | 723 B 00:00:00
(3/6): vz-base/other | 309 B 00:00:00
(4/6): vz-updates/primary | 1.0 kB 00:00:00
(5/6): vz-updates/filelists | 442 B 00:00:00
(6/6): vz-updates/other | 535 B 00:00:00
vz-base 1/1
vz-base 1/1
vz-base 1/1
vz-updates 4/4
vz-updates 4/4
vz-updates 4/4
Metadata Cache Created
# yum install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.coreix.net
* extras: mirrors.binaryracks.com
* updates: mirrors.coreix.net
No package clamav-server available.
No package clamav-data available.
No package clamav-update available.
No package clamav-filesystem available.
No package clamav available.
No package clamav-scanner-systemd available.
No package clamav-devel available.
No package clamav-lib available.
No package clamav-server-systemd available.
Error: Nothing to do
I already did otherwise I wouldn't have told you that it worked on my servers.Maybe you can check on one of your CentOS 7 servers
yum list clamav
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.one.com
* epel: mirror.23m.com
* extras: mirror.one.com
* updates: mirror.one.com
Installed Packages
clamav.x86_64 0.103.7-1.el7 @epel
yum clean all
yum --disablerepo=* --enablerepo=epel makecache
yum install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd
# hostnamectl
Icon name: computer-container
Chassis: container
Machine ID: f6fc6651e3234579b5ea719df439b299
Boot ID: 39719437df494e5781ac044e0df4277b
Virtualization: openvz
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0
Architecture: x86-64
Then I installed and started clamav via DA and everything is fine again now.wget http://mirrors.ukfast.co.uk/sites/d...86_64/Packages/e/epel-release-7-14.noarch.rpm
yum remove epel-release
yum update
rpm -ivh epel-release-7-14.noarch.rpm
yum update
I follow these steps and now when i execute "yum update" i get:Odd stuff. Seems like the epel repository was somehow... broken. In the end, running the following steps fixed it.
Then I installed and started clamav via DA and everything is fine again now.
Thanks for your assistance - always a huge help to have someone consider possible options.
Error: Failed to synchronize cache for repo 'AppStream'
In my list of steps, there are two incidents of "yum update". Did you get the same error on both occasions?I follow these steps and now when i execute "yum update" i get:
Code:Error: Failed to synchronize cache for repo 'AppStream'
- What am i doing wrong?
- CENTOS 8
Thanks in advance
You're not really doing anything wrong, but the issue is that Centos 8 is EOL and you can't get updates via the normal yum anymore. Appstream is part of the default.- What am i doing wrong?
- CENTOS 8
yum clean all
rm -rf /var/cache/dnf
rm -rf /var/cache/yum
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
Thanks Richard,You're not really doing anything wrong, but the issue is that Centos 8 is EOL and you can't get updates via the normal yum anymore. Appstream is part of the default.
You have to change to the vault repo of Centos 8, which by the way will probably be not updated for very long.
I strongly suggest to convert to a non-eol system like Almalinux 8 or Centos-Stream (I would use stream personally).
You could try to do these steps and see if fixing the cache also fixes your issue. Use at your own risk.
First of all be sure your time and date and timezone are correct. You can check that with timedatectl.
Then try to fix yum.
yum clean all
Then depening on your cache directory, either use:
rm -rf /var/cache/dnf
or
rm -rf /var/cache/yum
Now change to the Centos 8 vault repo to see if you get updates from there:
Code: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
Working now?
yum clean all
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel-testing.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel-testing.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel-testing.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/okay.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/okay.repo; Configuration: OptionBinding with id "failovermethod" does not exist
42 files removed
[root@cloud /]# rm -rf /var/cache/dnf
[root@cloud /]# rm -rf /var/cache/yum
[root@cloud /]# clear
[root@cloud /]# cd /etc/yum.repos.d/
[root@cloud yum.repos.d]# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
[root@cloud yum.repos.d]# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
[root@cloud yum.repos.d]# yum update
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel-testing.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel-testing.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel-testing.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/okay.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/okay.repo; Configuration: OptionBinding with id "failovermethod" does not exist
CentOS Linux 8 - AppStream 1.1 MB/s | 8.4 MB 00:07
CentOS Linux 8 - BaseOS 925 kB/s | 4.6 MB 00:05
CentOS Linux 8 - Extras 39 kB/s | 10 kB 00:00
CentOS Linux 8 - PowerTools 797 kB/s | 2.3 MB 00:02
Extra Packages for Enterprise Linux 7 - x86_64 1.3 MB/s | 16 MB 00:12
Rspamd stable repository 520 B/s | 833 B 00:01
Rspamd stable repository 4.0 kB/s | 3.1 kB 00:00
Importing GPG key 0xBF21E25E:
Userid : "Rspamd Nightly Builds (Rspamd Nightly Builds) <[email protected]>"
Fingerprint: 3FA3 47D5 E599 BE45 95CA 2576 FFA2 32ED BF21 E25E
From : http://rspamd.com/rpm/gpg.key
Is this ok [y/N]: y
Rspamd stable repository 3.9 kB/s | 9.2 kB 00:02
Error:
Problem 1: cannot install the best update candidate for package libidn2-2.2.0-1.el8.x86_64
- nothing provides libunistring.so.0()(64bit) needed by libidn2-2.3.4-1.el7.x86_64
Problem 2: cannot install the best update candidate for package perl-Devel-Size-0.81-2.el8.x86_64
- nothing provides perl(:MODULE_COMPAT_5.16.3) needed by perl-Devel-Size-0.83-1.el7.x86_64
Problem 3: cannot install the best update candidate for package perl-Text-Template-1.51-1.el8.noarch
- nothing provides perl(:MODULE_COMPAT_5.16.3) needed by perl-Text-Template-1.59-2.el7.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Yep I see it. As I stated before (and also smtalk), it's EOL and you had to be lucky if the Vault still provides something.This is what ive got from your code:
1. ALWAYS BACKUPI do not want long downtime.
What care should I take on Backups? what is very important about system?
Like a lot of us, I wouldn't because it's expected to be more beta than Fedora even, so most likely not always very stable. If I'm not mistaken most of us went to Alma because of Cloudlinux support. Others choose for Rocky because it's really open source and one of the devs of Centos is working with it too. They are both as good.upgrade to Centos-Stream