Skip to content
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

[Agent] Error 'Failed to rotate backups' displayed on installing Elastic Agent on Windows with install command #21627

Closed
ghost opened this issue Oct 7, 2020 · 10 comments · Fixed by #21772
Assignees

Comments

@ghost
Copy link

ghost commented Oct 7, 2020

Kibana version:
Kibana: 8.0.0-SNAPSHOT cloud environment with commit 6f983728d7f8c2cf065a6d5099157a5cfdc3cd08

Elasticsearch version:
Elasticsearch: 8.0.0-SNAPSHOT cloud environment

Host OS and Browser version:
Windows , All

Original install method (e.g. download page, yum, from source, etc.):
From 8.0.0-SNAPSHOT cloud environment

Description
Error is displayed in powershell on enrolling agent on Windows with install command

Preconditions

  1. 8.0.0-SNAPSHOT latest Kibana cloud environment should be available(commit 6f983728d7f8c2cf065a6d5099157a5cfdc3cd08).
  2. Login to the above environment with elastic superuser.
  3. 8.0.0 windows agent using https://snapshots.elastic.co/8.0.0-af3cda3c/downloads/beats/elastic-agent/elastic-agent-8.0.0-SNAPSHOT-windows-x86_64.zip file should be available.

Steps to Reproduce

  1. RDP to the windows endpoint

  2. Copy the above agent file and extract it under C:/Program Files

  3. Navigate to C:/Program Files/ElasticAgent folder and open powershell as admin

  4. Run the below command:
    ./elastic-agent install

  5. Proceed and provide kibana url and enrollment token.

  6. Observe that agent is enrolled in the UI but error is displayed in powershell.

Test data
N/A

Impacted Test case id
N/A

Actual Result
Error is displayed in powershell on enrolling agent on Windows with install command.

Expected Result
No Error should be displayed in powershell on enrolling agent on Windows with install command

What's working

  • N/A

What's not working

  • N/A

Screenshot
windows_powershell

Logs
Elastic-Agent-logs.zip

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 7, 2020
@ghost ghost added bug and removed needs_team Indicates that the issue/PR needs a Team:* label labels Oct 7, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 7, 2020
@ghost ghost added Team:Ingest Management and removed needs_team Indicates that the issue/PR needs a Team:* label labels Oct 7, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Team:Ingest Management)

@ghost ghost added the impact:high Short-term priority; add to current release, or definitely next. label Oct 7, 2020
@ghost
Copy link
Author

ghost commented Oct 7, 2020

@deepikakeshav-qasource Please review the bug.

@blakerouse
Copy link
Contributor

@rahulgupta-qasource Are you sure that you did not have the log open in Notepad or by another program?

@ghost ghost assigned ghost and unassigned muskangulati-qasource Oct 7, 2020
@ghost
Copy link

ghost commented Oct 7, 2020

Reviewed and assigned to @EricDavisX

@ghost ghost assigned EricDavisX Oct 7, 2020
@EricDavisX EricDavisX changed the title Error is displayed in powershell on enrolling agent on Windows with install command [Agent] Error 'Failed to rotate backups' displayed on installing Elastic Agent on Windows with install command Oct 7, 2020
@EricDavisX EricDavisX assigned ph and blakerouse and unassigned EricDavisX and ghost Oct 7, 2020
@EricDavisX
Copy link
Contributor

Assign Blake / PH to confirm who can work it

@blakerouse
Copy link
Contributor

I am only able to reproduce this with when I have the log file open. The error is expected in that case and it doesn't block the installation or enrollment.

@ph ph removed their assignment Oct 7, 2020
@ph
Copy link
Contributor

ph commented Oct 7, 2020

I think this is a correct behavior here too, @rahulgupta-qasource Can you confirm #21627 (comment) ?

@EricDavisX EricDavisX removed the impact:high Short-term priority; add to current release, or definitely next. label Oct 7, 2020
@EricDavisX
Copy link
Contributor

removing 'high' impact for now, if it doesn't block install. and i don't see this on other vms.

@ghost
Copy link
Author

ghost commented Oct 8, 2020

Hi @blakerouse / @ph

Failed to rotate backups error is still displayed when log file is not open in Notepad or another program on enrolling Windows agent. Windows agent is successfully enrolled under agents tab on 8.0.0-SNAPSHOT Kibana cloud environment (having above commit 6f983728d7f8c2cf065a6d5099157a5cfdc3cd08 and 8.0.0 windows agent using https://snapshots.elastic.co/8.0.0-af3cda3c/downloads/beats/elastic-agent/elastic-agent-8.0.0-SNAPSHOT-windows-x86_64.zip file).

failed to rotate backups

@blakerouse
Copy link
Contributor

I have been able to reproduce this. I think the issue is that enroll tries to rotate the logs while the Elastic Agent daemon is running in the background. I think that enroll should not be writing too that file at all as its a CLI command and not a daemon that should be writing to that file.

Again the error is not critical, but it does look bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants