I am aware of few related issue for elastic-agent going into defunct , they appear to be for older version and a fix was applied for 8.5
Hello there,
I have installed elastic-agent on a ubuntu-server box and when I list which process is running I get this:
[image]
And then I realized that I got the same on the fleet server:
[image]
This doesn´t look normal.
Elastic version on both servers:
Binary: 8.2.1 (build: 40ea6cb697bcb76375527092a19d7413bfa00f3f at 2022-05-19 19:19:07 +0000 UTC)
Daemon: 8.2.1 (build: 40ea6cb697bcb76375527092a19d7413bfa00f3f at 2022-05-19 19:19:07 +0000 UTC)
Thanks for the attention.
opened 03:21PM - 11 Aug 20 UTC
closed 02:36PM - 09 Mar 22 UTC
bug
good first issue
Team:Elastic-Agent-Control-Plane
## Environment
- Version: 8.0.0-SNAPSHOT (Downloaded from https://snapshots.ela… stic.co/8.0.0-3ce083a1/downloads/beats/elastic-agent/elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm)
- Operating System: Centos 7, dockerised
## Steps to Reproduce
1. Start a Centos:7 docker container: `docker run --name centos centos:7 tail -f /dev/null`
1. Enter the container: `docker exec -ti centos bash`
1. Download the agent RPM package: `curl https://snapshots.elastic.co/8.0.0-3ce083a1/downloads/beats/elastic-agent/elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm -o /elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm`
1. Install systemctl replacement for Docker: `curl https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py -o /usr/bin/systemctl`
1. Install the RPM package with yum: `yum localinstall /elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm -y`
1. Enable service: `systemctl enable elastic-agent`
1. Start service: `systemctl start elastic-agent`
1. Check processes: `top`. There should be only one process for the elastic-agent
1. Restart service: ` systemctl restart elastic-agent`
1. Check processes: `top`
## Behaviours:
### Expected behaviour
After the initial restart, the elastic-agent appears once, not in the Z state.
<img width="693" alt="Screenshot 2020-08-11 at 17 16 34" src="https://user-images.githubusercontent.com/951580/89915273-6f105300-dbf6-11ea-93ac-8a588b9ca6de.png">
### Current behaviour
After the initial restart, the elastic-agent appears twice, one in the Z state, and the other in the S state (as shown in the attachment)
<img width="705" alt="Screenshot 2020-08-11 at 17 15 38" src="https://user-images.githubusercontent.com/951580/89915220-6029a080-dbf6-11ea-9a85-baaa113efe3a.png">
### Other observations
This behavior persists across multiple restarts: the elastic-agent process gets into the zombie state each time is restarted (note that I restarted it three times, so there are 3 zombie processes):
<img width="697" alt="Screenshot 2020-08-11 at 17 18 22" src="https://user-images.githubusercontent.com/951580/89915456-aed73a80-dbf6-11ea-9c81-f84ae026caa0.png">
## One shot script
```shell
docker run -d --name centos centos:7 tail -f /dev/null
docker exec -ti centos bash
```
Inside the container
```shell
curl https://snapshots.elastic.co/8.0.0-3ce083a1/downloads/beats/elastic-agent/elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm -o /elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm
curl https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py -o /usr/bin/systemctl
yum localinstall /elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm -y
systemctl enable elastic-agent
systemctl start elastic-agent
systemctl restart elastic-agent
top
```
We are on version 8.9.1 and still seeing this on Centos 7.x , please advice if this is still a known issue ?
system
(system)
Closed
October 20, 2023, 4:54am
2
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.