-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Error "failed to copy source directory (C:\Program Files\Elastic-Agent)" in powershell is displayed on installing the agent after enrolling and running it #21744
Comments
Pinging @elastic/ingest-management (Team:Ingest Management) |
@vipulsrivastava-qasource Please review the bug. |
Reviewed and assigned to @EricDavisX |
Based on the reported error seems that you have an Elastic Agent running from inside that directory. At that point it cannot be installed. Ensure that you have no Elastic Agent running in that directory, then run the |
@blakerouse while QA is re-testing this, I would ask if you think its useful to cite a ticket to make 'install' command more flexible or report better in the case it can detect an agent running in this case. Rahul, regardless of the above, I wanted to ask if we can make sure we have a variation on this test case covered somewhere as:
|
Hi @blake Thank you for sharing the feedback. We have tested the above scenario by stopping the elastic-agent(press ctrl+c in powershell) in C:\Program Files\Elastic-Agent and found that user is able to install the elastic-agent from the same directory(C:\Program Files\Elastic-Agent) using below command :- @EricDavisX We have performed the scenario shared and found that agent remains in Enrolling state with no activity logs. |
excellent - with this I think we can close it. Thanks |
Bug Conversion: Testcase already exists for this ticket. |
Kibana version:
Kibana: 7.10.0 BC1 cloud environment with commit 7a9f9132fffd8567ce3b985dde8bea6529e8fa3c
Elasticsearch version:
Elasticsearch: 7.10.0 BC1 cloud environment
Host OS and Browser version:
Windows , All
Original install method (e.g. download page, yum, from source, etc.):
7.10.0 BC1 cloud environment deployed from Staging cloud platform https://staging.found.no
Description
Error "failed to copy source directory (C:\Program Files\Elastic-Agent)" in powershell is displayed on installing the agent after enrolling and running it
Preconditions
Steps to Reproduce
.\elastic-agent enroll https://217abe597a6b48bba2b7bb82bd4aa8bb.us-central1.gcp.foundit.no:9243 TlhCMElYVUJsNGo3WW9rbDJ6clg6UWg2UDlYQUlUOTJNLWQ2QWNKUE5Edw==
.\elastic-agent.exe run
"Error: failed to copy source directory (C:\Program Files\Elastic-Agent) to destination (C:\Program Files\Elastic\Agent):
read C:\Program Files\Elastic-Agent\data\agent.lock: The process cannot access the file because another process has loc
ked a portion of the file."
Test data
N/A
Impacted Test case id
N/A
Actual Result
Error "failed to copy source directory (C:\Program Files\Elastic-Agent)" is displayed in powershell on installing the agent after enrolling and running it
Expected Result
User should be successfully able to install the agent after enrolling and running it.
What's working
What's not working
Screenshot
Logs
agent lock file.zip
The text was updated successfully, but these errors were encountered: