Lab 2.1 - Elastic Agent - Adding Nginx Integration/Agent fail

Hello @fabio.iovine

From the error "{"file.name":"cmd/enroll_cmd.go","file.line":806},"message":"Fleet Server - Error - listen tcp 0.0.0.0:8220: bind: address already in use","ecs.version":"1.6.0"}
Error: fleet-server failed: context canceled" it seems the port is in use, could you please check what is the process which is using the port :

sudo lsof -i :8220

If it is related to elastic-agent process of older installation maybe as you have already uninstalled the older agent, you can kill the process :

sudo kill -9 <PID>

Now try to install the agent again & see if you still receive the error.

Thanks!!