New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Elastic Agent] Agent fails to start when installed through proxy #27114
Comments
Pinging @elastic/agent (Team:Agent) |
@lthach2 I was going to ask, I believe you had cited a case where it WAS working, can you post the details and differences between the 2 scenarios here please? |
@EricDavisX Turns out I spoke too soon when initially reporting it was working. I assumed that since the install showed the agent was successfully enrolled, that everything was functioning, but turns out the agent service fails to start. |
Details about my test environment as it may require more testing in a fully on-prem environment:
|
Quick update after some additional testing on my end. I did another test in an on-prem environment and encountering the same issue with agent failing to start. On-prem environment:
|
In the logs you shared I don't see any error, only that Agent has been stopped. Can you archive and share the complete Agent folder? It looks like enrollment did succeed. Agent write a |
Hi @urso, sure thing. Below is the download link for the Agent folder from my test box. https://upload.elastic.co/d/b70c1816893b40f1ed19dc6a300e0ec7b6956f6cfb948872eeb617787a39ef2f |
The authorization token seems to be wrong. I can't download your files. |
It worked for me yesterday - I've posted them to a shared google drive you, I'll slack you details. |
I think I found the bug. After enrolling the Agent creates/serializes its configuration to
With this serialization bug, proxy support is currently broken. I created an issue: #27187 |
The fix was backported to 7.14.1 yesterday so we can wait a day to be sure the build has picked it up and we can re-test. Thanks @lthach2 . If we have questions about the next 'depth' we can test here, please do raise it to the team. |
@lthach2 thanks so much. I pinged the team via slack, and we can follow up more in the test issue, if this doesn't get more comment in the next day. In that case we can just close it, as the one known issue is fixed - and we'll continue testing, and log separate issues as we find them |
Going to close this issue as the initial proxy problem seems to be resolved in the upcoming 7.14.1. |
Attempting to install Elastic Agent via a proxy results in the agent service being installed, but it fails to start. This results in the host populating in the Fleet web UI but stuck on "Updating." When installing without a proxy, the agent service starts successfully and the host shows as "Healthy" in the Fleet web UI.
Binary: 7.14.0 (build: 331b419 at 2021-07-22 02:24:06 +0000 UTC)
Daemon: 7.14.0 (build: 331b419 at 2021-07-22 02:24:06 +0000 UTC)
Setup a proxy server if one is not available (I setup a simple Squid proxy)
Install the agent using the proxy-url flag and specify the proxy URL
Agent should successfully enroll and appear in the Fleet UI but show as "Updating"
Check whether Elastic Agent service is running. It will show as Stopped.
Attempting to manually start the agent results in this error:
PS C:\Program Files\Elastic\Agent> .\elastic-agent.exe restart Error: Failed trigger restart of daemon: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing open \\\\.\\pipe\\elastic-agent-system: The system cannot find the file specified."
The elastic-agent-json.log located in C:\Program Files\Elastic\Agent\data\elastic-agent-331b41\logs shows:
The text was updated successfully, but these errors were encountered: