Error with Ops Agent GCE metadata unauthenticated - google-cloud-platform

Trying to get Ops Agent working and used the following command to install it:
curl -sSO https://dl.google.com/cloudagents/add-google-cloud-ops-agent-repo.sh
sudo bash add-google-cloud-ops-agent-repo.sh --also-install
I see the following error in the logs of journalctl -u google-cloud-ops-agent-opentelemetry-collector -xn
otelopscol[2706]: 2022-02-06T21:50:36.140Z info exporterhelper/queued_retry.go:215 Exporting failed. Will retry the request after interval. {"kind": "exporter", "name": "googlecloud", "error": "[rpc error: code = Unauthenticated desc = transport: per-RPC creds failed due to error: metadata: GCE metadata \"instance/service-accounts/default/token?scopes=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fmonitoring%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fmonitoring.read%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fmonitoring.write\" not defined; rpc error: code = Unauthenticated desc = transport: per-RPC creds failed due to error: metadata: GCE metadata \"instance/service-accounts/default/token?scopes=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fmonitoring%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fmonitoring.read%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fmonitoring.write\" not defined; rpc error: code = Unauthenticated desc = transport: per-RPC creds failed due to error: metadata: GCE metadata \"instance/service-accounts/default/token?scopes=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fmonitoring%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fmonitoring.read%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fmonitoring.write\" not defined]", "interval": "14.115202828s"}
The services otherwise look good and are running but the UI reports that Ops Agent wasn't actually running which I suspect is due to no data being sent back.
Here is the status of running agents:
google-cloud-ops-agent-opentelemetry-collector.service - Google Cloud Ops Agent - Metrics Agent
Loaded: loaded (/lib/systemd/system/google-cloud-ops-agent-opentelemetry-collector.service; static; vendor preset: enabled)
Active: active (running) since Sat 2022-02-05 04:38:41 UTC; 1 day 17h ago
Process: 2690 ExecStartPre=/opt/google-cloud-ops-agent/libexec/google_cloud_ops_agent_engine -service=otel -in /etc/google-clou>
Main PID: 2706 (otelopscol)
Tasks: 9 (limit: 2369)
Memory: 193.6M
CGroup: /system.slice/google-cloud-ops-agent-opentelemetry-collector.service
└─2706 /opt/google-cloud-ops-agent/subagents/opentelemetry-collector/otelopscol --config=/run/google-cloud-ops-agent-o>
Feb 06 21:55:53 mongo-1 otelopscol[2706]: /root/go/pkg/mod/go.opentelemetry.io/collector#v0.42.0/exporter/exporterhelper/qu>
Feb 06 21:55:53 mongo-1 otelopscol[2706]: go.opentelemetry.io/collector/exporter/exporterhelper.(*metricsSenderWithObservability).s>
Feb 06 21:55:53 mongo-1 otelopscol[2706]: /root/go/pkg/mod/go.opentelemetry.io/collector#v0.42.0/exporter/exporterhelper/me>
Feb 06 21:55:53 mongo-1 otelopscol[2706]: go.opentelemetry.io/collector/exporter/exporterhelper.(*queuedRetrySender).start.func1
Feb 06 21:55:53 mongo-1 otelopscol[2706]: /root/go/pkg/mod/go.opentelemetry.io/collector#v0.42.0/exporter/exporterhelper/qu>
Feb 06 21:55:53 mongo-1 otelopscol[2706]: go.opentelemetry.io/collector/exporter/exporterhelper/internal.consumerFunc.consume
Feb 06 21:55:53 mongo-1 otelopscol[2706]: /root/go/pkg/mod/go.opentelemetry.io/collector#v0.42.0/exporter/exporterhelper/in>
Feb 06 21:55:53 mongo-1 otelopscol[2706]: go.opentelemetry.io/collector/exporter/exporterhelper/internal.(*boundedMemoryQueue).Star>
Feb 06 21:55:53 mongo-1 otelopscol[2706]: /root/go/pkg/mod/go.opentelemetry.io/collector#v0.42.0/exporter/exporterhelper/in>
Feb 06 21:55:53 mongo-1 otelopscol[2706]: 2022-02-06T21:55:53.145Z info exporterhelper/queued_retry.go:215 Exp>
● google-cloud-ops-agent.service - Google Cloud Ops Agent
Loaded: loaded (/lib/systemd/system/google-cloud-ops-agent.service; enabled; vendor preset: enabled)
Active: active (exited) since Sat 2022-02-05 04:38:41 UTC; 1 day 17h ago
Process: 2691 ExecStartPre=/opt/google-cloud-ops-agent/libexec/google_cloud_ops_agent_engine -in /etc/google-cloud-ops-agent/co>
Process: 2704 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 2704 (code=exited, status=0/SUCCESS)
Feb 05 04:38:41 mongo-1 systemd[1]: Starting Google Cloud Ops Agent...
Feb 05 04:38:41 mongo-1 systemd[1]: Finished Google Cloud Ops Agent.
● google-cloud-ops-agent-fluent-bit.service - Google Cloud Ops Agent - Logging Agent
Loaded: loaded (/lib/systemd/system/google-cloud-ops-agent-fluent-bit.service; static; vendor preset: enabled)
Active: active (running) since Sun 2022-02-06 15:05:35 UTC; 6h ago
Process: 22138 ExecStartPre=/opt/google-cloud-ops-agent/libexec/google_cloud_ops_agent_engine -service=fluentbit -in /etc/googl>
Main PID: 22144 (fluent-bit)
Tasks: 22 (limit: 2369)
Memory: 29.0M
CGroup: /system.slice/google-cloud-ops-agent-fluent-bit.service
└─22144 /opt/google-cloud-ops-agent/subagents/fluent-bit/bin/fluent-bit --config /run/google-cloud-ops-agent-fluent-bi>
Feb 06 15:05:35 mongo-1 systemd[1]: google-cloud-ops-agent-fluent-bit.service: Scheduled restart job, restart counter is at 7.
Feb 06 15:05:35 mongo-1 systemd[1]: Stopped Google Cloud Ops Agent - Logging Agent.
Feb 06 15:05:35 mongo-1 systemd[1]: Starting Google Cloud Ops Agent - Logging Agent...
Feb 06 15:05:35 mongo-1 systemd[1]: Started Google Cloud Ops Agent - Logging Agent.
Feb 06 15:05:35 mongo-1 fluent-bit[22144]: Fluent Bit v1.8.12
Feb 06 15:05:35 mongo-1 fluent-bit[22144]: * Copyright (C) 2019-2021 The Fluent Bit Authors
Feb 06 15:05:35 mongo-1 fluent-bit[22144]: * Copyright (C) 2015-2018 Treasure Data
Feb 06 15:05:35 mongo-1 fluent-bit[22144]: * Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
Feb 06 15:05:35 mongo-1 fluent-bit[22144]: * https://fluentbit.io

The issue was due to the VM not having a service account. The solution was to do the following:
create a service account
assign the service account Logs Writer and Monitoring Metric Writer roles
Stop the VM, Edit the VM, set the newly created service account, start the VM
Note that by default a VM has a default service account. In my case I created the VM and explicitely didn't enable any service account hence the issue.

Related

Mosquitto MQTT Broker Server Failed Reached Start-Request-Limit

I am unable to open Mosquitto beacause I have reached the start/restart limit over a certain period of time:
$ systemctl status mosquitto.service
● mosquitto.service - Mosquitto MQTT v3.1/v3.1.1 Broker
Loaded: loaded (/usr/lib/systemd/system/mosquitto.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mosquitto.service.d
└─override.conf
Active: failed (Result: start-limit) since Fri 2023-02-03 21:45:41 UTC; 2h 12min ago
Docs: man:mosquitto.conf(5)
man:mosquitto(8)
Main PID: 543 (code=exited, status=1/FAILURE)
Feb 03 21:45:26 ip-172-31-11-142.us-west-1.compute.internal systemd[1]: mosquitto.service: main process exited, ...RE
Feb 03 21:45:26 ip-172-31-11-142.us-west-1.compute.internal systemd[1]: Failed to start Mosquitto MQTT v3.1/v3.1...r.
Feb 03 21:45:26 ip-172-31-11-142.us-west-1.compute.internal systemd[1]: Unit mosquitto.service entered failed state.
Feb 03 21:45:26 ip-172-31-11-142.us-west-1.compute.internal systemd[1]: mosquitto.service failed.
Feb 03 21:45:41 ip-172-31-11-142.us-west-1.compute.internal systemd[1]: mosquitto.service holdoff time over, sch...t.
Feb 03 21:45:41 ip-172-31-11-142.us-west-1.compute.internal systemd[1]: Stopped Mosquitto MQTT v3.1/v3.1.1 Broker.
Feb 03 21:45:41 ip-172-31-11-142.us-west-1.compute.internal systemd[1]: start request repeated too quickly for m...ce
Feb 03 21:45:41 ip-172-31-11-142.us-west-1.compute.internal systemd[1]: Failed to start Mosquitto MQTT v3.1/v3.1...r.
Feb 03 21:45:41 ip-172-31-11-142.us-west-1.compute.internal systemd[1]: Unit mosquitto.service entered failed state.
Feb 03 21:45:41 ip-172-31-11-142.us-west-1.compute.internal systemd[1]: mosquitto.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
I have the method of:
ps -ef | grep mosquito
sudo kill ####
and it still does not work
I have also attempted to do:
systemctl edit /etc/mosquitto
[Service]
Restart=always
RestartSec=15
StartLimitInterval=150
StartLimitBurst=8

Jenkins fails after updating in AWS EC2 machine

I have Jenkins installed in an EC2 machine in AWS. I tried to install the slack plugin and it break the other plugins, so I tried updating Jenkins version to make it work again and now I cannot event start it. I get the following message:
Starting jenkins (via systemctl): Failed to start jenkins.service: Unit is not loaded properly: Invalid argument.
See system logs and 'systemctl status jenkins.service' for details.
[FAILED]
I have also tried to delete Jenkins completely following this guide: to then reinstall it following the Jenkins in AWS guide. But it is still not working. At some point when I did the journalctl -xe I got this error (I cant remember what I did to get there but at least I saved this log trace):
Unit jenkins.service has begun starting up.
Sep 20 16:39:49 ip-10-10-3-149.ec2.internal jenkins[23035]: Sep 20, 2022 4:39:49 PM executable.Main verifyJavaVersion
Sep 20 16:39:49 ip-10-10-3-149.ec2.internal jenkins[23035]: SEVERE: Running with Java class version 52, which is older than
Sep 20 16:39:49 ip-10-10-3-149.ec2.internal jenkins[23035]: java.lang.UnsupportedClassVersionError: 52.0
Sep 20 16:39:49 ip-10-10-3-149.ec2.internal jenkins[23035]: at executable.Main.verifyJavaVersion(Main.java:145)
Sep 20 16:39:49 ip-10-10-3-149.ec2.internal jenkins[23035]: at executable.Main.main(Main.java:109)
Sep 20 16:39:49 ip-10-10-3-149.ec2.internal jenkins[23035]: Jenkins requires Java versions [17, 11] but you are running wit
Sep 20 16:39:49 ip-10-10-3-149.ec2.internal jenkins[23035]: java.lang.UnsupportedClassVersionError: 52.0
Sep 20 16:39:49 ip-10-10-3-149.ec2.internal jenkins[23035]: at executable.Main.verifyJavaVersion(Main.java:145)
Sep 20 16:39:49 ip-10-10-3-149.ec2.internal jenkins[23035]: at executable.Main.main(Main.java:109)
Sep 20 16:39:49 ip-10-10-3-149.ec2.internal systemd[1]: Failed to start Jenkins Continuous Integration Server.
-- Subject: Unit jenkins.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit jenkins.service has failed.
--
So I though I had finally found the error, I checked the java -version and it was saying java1.8. Therefore I changed it with alternatives --config java and set it to:
java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.16.0.8-1.amzn2.0.1.x86_64/bin/java)
I have also added this path to /etc/rc.d/init.d/jenkins. Now when I get the java -version I get this:
openjdk version "11.0.16" 2022-07-19 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.16.0.8-1.amzn2.0.1) (build 11.0.16+8-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.16.0.8-1.amzn2.0.1) (build 11.0.16+8-LTS, mixed mode, sharing)
when I try to get the status of jenkins with systemctl status jenkins.service -l I get:
● jenkins.service
Loaded: error (Reason: Invalid argument)
Drop-In: /etc/systemd/system/jenkins.service.d
└─override.conf
Active: failed (Result: start-limit) since Tue 2022-09-20 16:39:49 UTC; 15h ago
Main PID: 23035 (code=exited, status=0/SUCCESS)
Sep 20 16:57:30 ip-10-10-3-149.ec2.internal systemd[1]: jenkins.service lacks both ExecStart= and ExecStop= setting. Refusing.
Sep 20 16:57:43 ip-10-10-3-149.ec2.internal systemd[1]: jenkins.service lacks both ExecStart= and ExecStop= setting. Refusing.
Sep 21 07:15:59 ip-10-10-3-149.ec2.internal systemd[1]: jenkins.service lacks both ExecStart= and ExecStop= setting. Refusing.
Sep 21 07:20:02 ip-10-10-3-149.ec2.internal systemd[1]: jenkins.service lacks both ExecStart= and ExecStop= setting. Refusing.
Sep 21 07:23:12 ip-10-10-3-149.ec2.internal systemd[1]: jenkins.service lacks both ExecStart= and ExecStop= setting. Refusing.
Sep 21 07:23:20 ip-10-10-3-149.ec2.internal systemd[1]: jenkins.service lacks both ExecStart= and ExecStop= setting. Refusing.
Sep 21 07:24:26 ip-10-10-3-149.ec2.internal systemd[1]: jenkins.service lacks both ExecStart= and ExecStop= setting. Refusing.
Sep 21 07:30:58 ip-10-10-3-149.ec2.internal systemd[1]: jenkins.service lacks both ExecStart= and ExecStop= setting. Refusing.
Sep 21 07:31:06 ip-10-10-3-149.ec2.internal systemd[1]: jenkins.service lacks both ExecStart= and ExecStop= setting. Refusing.
Sep 21 07:48:04 ip-10-10-3-149.ec2.internal systemd[1]: jenkins.service lacks both ExecStart= and ExecStop= setting. Refusing.
and when I use journalctl -xe I get:
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-120.scope has finished starting up.
--
-- The start-up result is done.
Sep 21 07:40:01 ip-10-10-3-149.ec2.internal CROND[842]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Sep 21 07:41:28 ip-10-10-3-149.ec2.internal dhclient[3121]: XMT: Solicit on eth0, interval 131610ms.
Sep 21 07:43:39 ip-10-10-3-149.ec2.internal dhclient[3121]: XMT: Solicit on eth0, interval 118630ms.
Sep 21 07:45:38 ip-10-10-3-149.ec2.internal dhclient[3121]: XMT: Solicit on eth0, interval 121300ms.
Sep 21 07:46:59 ip-10-10-3-149.ec2.internal sshd[3483]: Received disconnect from 92.255.85.69 port 28784:
Sep 21 07:46:59 ip-10-10-3-149.ec2.internal sshd[3483]: Disconnected from 92.255.85.69 port 28784 [preaut
Sep 21 07:47:04 ip-10-10-3-149.ec2.internal dhclient[3075]: DHCPREQUEST on eth0 to 10.10.3.1 port 67 (xid
Sep 21 07:47:04 ip-10-10-3-149.ec2.internal dhclient[3075]: DHCPACK from 10.10.3.1 (xid=0x18dc5aad)
Sep 21 07:47:04 ip-10-10-3-149.ec2.internal NET[3542]: dhclient: Locked /run/dhclient/resolv.lock
Sep 21 07:47:04 ip-10-10-3-149.ec2.internal dhclient[3075]: bound to 10.10.3.149 -- renewal in 1618 secon
Sep 21 07:47:04 ip-10-10-3-149.ec2.internal ec2net[3561]: [get_meta] Querying IMDS for meta-data/network/
Sep 21 07:47:04 ip-10-10-3-149.ec2.internal ec2net[3562]: [get_meta] Getting token for IMDSv2.
Sep 21 07:47:04 ip-10-10-3-149.ec2.internal ec2net[3565]: [get_meta] Trying to get http://169.254.169.254
Sep 21 07:47:04 ip-10-10-3-149.ec2.internal ec2net[3570]: [remove_aliases] Removing aliases of eth0
Sep 21 07:47:39 ip-10-10-3-149.ec2.internal dhclient[3121]: XMT: Solicit on eth0, interval 116180ms.
Sep 21 07:48:03 ip-10-10-3-149.ec2.internal sudo[3947]: root : TTY=pts/0 ; PWD=/root ; USER=root ; CO
Sep 21 07:48:03 ip-10-10-3-149.ec2.internal sudo[3947]: pam_unix(sudo:session): session opened for user r
Sep 21 07:48:03 ip-10-10-3-149.ec2.internal systemd[1]: Reloading.
Sep 21 07:48:04 ip-10-10-3-149.ec2.internal systemd[1]: jenkins.service lacks both ExecStart= and ExecSto
Sep 21 07:48:04 ip-10-10-3-149.ec2.internal sudo[3947]: pam_unix(sudo:session): session closed for user r
Sep 21 07:48:09 ip-10-10-3-149.ec2.internal sudo[4019]: root : TTY=pts/0 ; PWD=/root ; USER=root ; CO
Sep 21 07:48:09 ip-10-10-3-149.ec2.internal sudo[4019]: pam_unix(sudo:session): session opened for user r
Sep 21 07:48:09 ip-10-10-3-149.ec2.internal sudo[4019]: pam_unix(sudo:session): session closed for user r
I have tried also the solution in here. I am not sure what else I can try.
UPDATE: this is how my jenkins unit looks like (systemctl cat jenkins):
# /etc/systemd/system/jenkins.service
[Service]
Environment="JENKINS_PORT=8000"
# /etc/systemd/system/jenkins.service.d/override.conf
[Service]
Environment="JENKINS_PORT=8000"
According to the logs, the unit file is missing start and stop scripts which can be confirmed by
systemctl cat jenkins.
According to Jenkins docs, the systemd file needed changes.Copying and overriding the unit file with the one given in the docs can solve the problem.

Unable to start NFS server on GCE instance mounted on GCS

I want to setup a NFS server on GCP, so used a VM, mounted the GCS bucket on /vol using the gcsfuse. Then installed nfs-kernel-server packages on the VM, created a dir nfs_share under /vol, added the entry in /etc/exports and while restarting the nfs-kernel-server service, ran into the below error:
sudo systemctl status nfs-kernel-server
● nfs-server.service - NFS server and services
Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2022-06-04 15:28:54 UTC; 10s ago
Process: 2139 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS)
Process: 2138 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCESS)
Process: 2137 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=1/FAILURE)
Jun 04 15:28:54 g-non-prod-nfs-test-vm systemd[1]: Starting NFS server and services...
Jun 04 15:28:54 g-non-prod-nfs-test-vm exportfs[2137]: exportfs: /vol/nfs_share requires fsid= for NFS export
Jun 04 15:28:54 g-non-prod-nfs-test-vm systemd[1]: nfs-server.service: Control process exited, code=exited status=1
Jun 04 15:28:54 g-non-prod-nfs-test-vm systemd[1]: nfs-server.service: Failed with result 'exit-code'.
Jun 04 15:28:54 g-non-prod-nfs-test-vm systemd[1]: Stopped NFS server and services.
Filestore a service of GCP (NFS instance) needs to be deployed with 1TB storage as a minimum, thus looking for alternatives. Above approach looks feasible, but unable to get the nfs service up and running.

how to get Jenkins to be assessable from aws ec2 instance

so this is the problem I have installed open jdk 8 for jenkins. jenkins is insalled and running given
● jenkins.service - LSB: Start Jenkins at boot time
Loaded: loaded (/etc/init.d/jenkins; generated)
Active: active (exited) since Thu 2021-10-21 19:22:55 UTC; 20min ago
Docs: man:systemd-sysv-generator(8)
Process: 437 ExecStart=/etc/init.d/jenkins start (code=exited, status=0/SUCCESS)
Oct 21 19:22:52 ip-172-31-30-187 systemd[1]: Starting LSB: Start Jenkins at boot time...
Oct 21 19:22:53 ip-172-31-30-187 jenkins[437]: Correct java version found
Oct 21 19:22:53 ip-172-31-30-187 jenkins[437]: * Starting Jenkins Automation Server jenkins
Oct 21 19:22:54 ip-172-31-30-187 su[619]: (to jenkins) root on none
Oct 21 19:22:54 ip-172-31-30-187 su[619]: pam_unix(su-l:session): session opened for user jenkins by (u>
Oct 21 19:22:54 ip-172-31-30-187 su[619]: pam_unix(su-l:session): session closed for user jenkins
Oct 21 19:22:55 ip-172-31-30-187 jenkins[437]: ...done.
Oct 21 19:22:55 ip-172-31-30-187 systemd[1]: Started LSB: Start Jenkins at boot time.
however, using serverip:8080 brings up nothing
used this tutorial https://www.youtube.com/watch?v=B6K1IF-489M&t=36s
port 8080 is also added to security group
this problem was not solved but making a fresh ec2 instance and installing Jenkins by following that tutorial did the trick

Can't stop Clamav deamon in Linux

I am trying to stop Clamav service in Linux, but I am not able to do that.
I have installed Clamav in a seperate directory.
When running below command:
$ systemctl stop clamav-daemon
I get this error message:
Warning: Stopping clamav-daemon.service, but it can still be activated by:
clamav-daemon.socket
When running:
$ systemctl status clamav-daemon
I get:
clamav-daemon.service - Clam AntiVirus userspace daemon
Loaded: loaded (/usr/lib/systemd/system/clamav-daemon.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2020-04-29 13:23:33 IST; 7s ago
Docs: man:clamd(8)
man:clamd.conf(5)
https://www.clamav.net/documents/
Main PID: 32213 (clamd)
Tasks: 1
CGroup: /system.slice/clamav-daemon.service
└─32213 /usr/local/sbin/clamd --foreground=true
Any help will be appreciated. Thanks.
When you are logged in as a normal user which can be understood by seeing the $ sign in your command, clamav won't stop. You need to perform the following command.
It will stop clamav for only logged-in session
$ sudo systemctl stop clamav-daemon
To see the status
$ sudo systemctl status clamav-daemon
It will return:
● clamav-daemon.service - Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.service; disabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/clamav-daemon.service.d
└─extend.conf
Active: inactive (dead)
Docs: man:clamd(8)
man:clamd.conf(5)
https://www.clamav.net/documents/
Aug 20 08:58:53 machine clamd[808]: Thu Aug 20 08:58:53 2020 -> HTML support enabled.
Aug 20 08:58:53 machine clamd[808]: Thu Aug 20 08:58:53 2020 -> XMLDOCS support enabled.
Aug 20 08:58:53 machine clamd[808]: Thu Aug 20 08:58:53 2020 -> HWP3 support enabled.
Aug 20 08:58:53 machine clamd[808]: Thu Aug 20 08:58:53 2020 -> Self checking every 3600 seconds.
Aug 20 09:58:53 machine clamd[808]: Thu Aug 20 09:58:53 2020 -> SelfCheck: Database status OK.
Aug 20 10:57:51 machine systemd[1]: Stopping Clam AntiVirus userspace daemon...
Aug 20 10:57:52 machine clamd[808]: Thu Aug 20 10:57:52 2020 -> --- Stopped at Thu Aug 20 10:57:52 >
Aug 20 10:57:52 machine clamd[808]: Thu Aug 20 10:57:52 2020 -> Socket file removed.
Aug 20 10:57:52 machine systemd[1]: clamav-daemon.service: Succeeded.
Aug 20 10:57:52 machine systemd[1]: Stopped Clam AntiVirus userspace daemon.
If you have created symbolic link of clamav daemon to start the program automatically when pc boot then you need to remove that link so that clamav shouldn't start automatically
$ sudo systemctl disable clamav-daemon