Closed gbanasiak closed 6 months ago
This seems related to https://github.com/elastic/fleet-server/issues/1672. It should not be possible to have 2 Elasticsearch outputs on a agent policy. By related, I mean, both are adding another ES output, what isn't really supported by fleet-server
Same issue on Windows environment deployment of Elastic Agent and Elastic endpoint security integration.
Step 1. Have an initial Endpoint security integration on an agent Step 2. Apply a different policy that has an Endpoint security integration and notice that the "listen tcp 127.0.0.1:6788: bind: address already in use" error log is recorded. It is almost as if the integration does not fully remove the current endpoint security integration and redeploy it from scratch. (The elastic-endpoint.exe process never stops)
The work around to is deploying a different policy that will remove the Endpoint security integration and then deploying the policy you wish to use.
❗However, if you tried to deploy an Endpoint Security policy to an agent that already has one then this error gets the endpoint stuck where it is in a degraded state and won't take the new policies. So a reboot (or restarting the agent) will be required to have the agent attempt to get a working state and then get the correct policy which is a significant issue.
Update: This is still a problem in 8.4.0.
@AndersonQ can you confirm that this is an Agent side issue and there's nothing in Endpoint that needs to be done to fix this? Based on your comment I think we're in agreement but I'd like to make sure I'm not misinterpreting you.
This issue seems the same as an old one which was marked as fixed in 8.3.0. Was it possibly fixed and the bug has reappeared?
Hello folks, first let me take a step back, weŕe dealing with 2 problems here:
Sorry if I crossed the streams here! I will note that I was switching from a policy with then endpoint security policy with a Logstash output to a nearly identical policy that as an Elasticsearch output.
ok, so to confirm, the steps to reproduce are:
is it correct @nicpenning
That should do it!
I haven't tested in 8.4.1 yet though.
I did some more tests and even a change of output permissions did not cause the problem, it really seem to be related to a change in the whole output
@AndersonQ & @pierrehilbert can this issue be closed? the main API key issues have long been addressed. Let me know if there's anything remaining.
@anderson you mention: "the other issue, indeed most likely is on the elastic-agent. Let me reproduce it to double check and be completely sure." -- not quiet sure what the other issue here is exactly. thanks
I think it was the port collision, I'm not sure anymore. But yes, it seems ok to close it
I think it was the port collision, I'm not sure anymore. But yes, it seems ok to close it
Closing as per @AndersonQ's comment
Version
8.3.2
Operating System
Centos 7 (not verified on other OSes)
Description
It's impossible to apply a policy that changes default Elasticsearch output to non-default output with Endpoint Security present. Endpoint collides on port TCP/6788 with Elastic Agent.
Policy before:
elastic-agent-before.yml.txt
Policy after:
elastic-agent-after.yml.txt
Symptoms
Elastic Agent status:
Tartget policy not applied:
Logs:
What stands out is:
{"file.name":"log/reporter.go","file.line":36},"message":"2022-07-21T16:49:55+02:00 - message: Application: endpoint-security--8.3.2[31e595cb-6fa0-4d62-b5ba-772ec96e796d]: State changed to FAILED: failed to start connection credentials listener: listen tcp 127.0.0.1:6788: bind: address already in use - type: 'ERROR' - sub_type: 'FAILED'","ecs.version":"1.6.0"}
TCP/6788 is used by Elastic Agent:
Steps to Reproduce
That is similar to https://github.com/elastic/elastic-agent/issues/257.