elastic / elastic-agent

Elastic Agent - single, unified way to add monitoring for logs, metrics, and other types of data to a host.
Other
17 stars 144 forks source link

Unsupported --namespace option results in socket error on Windows #5306

Open renekalff opened 2 months ago

renekalff commented 2 months ago

https://github.com/elastic/elastic-agent/pull/4822 introduced the unsupported option to install multiple agents. When performed on Windows the installation completes but the agent doesn't run properly.

The following error is shown in the elastic-agent log: failed to create npipe listener: failed to listen on the named pipe \\\\.\\pipe\\elastic-agent-system: Access is denied.

It seems that both installed agents try to use the same pipe as a control socket. When the second agent is started manually with an alternative socket path by setting the "path.socket" option it runs as expected.

Tested on stack and agent version 8.15.0.

pierrehilbert commented 2 months ago

Hey @renekalff Running two Agents on the same host is only made for development purpose and not something intended to be run for production environment. That being said, we should probably fix this as we may have folks developing on Windows.

elasticmachine commented 2 months ago

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)