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

[Filebeat] fails to enroll to centralized management in OS Windows #12797

Closed
yuri-tceretian opened this issue Jul 5, 2019 · 0 comments · Fixed by #12799
Closed

[Filebeat] fails to enroll to centralized management in OS Windows #12797

yuri-tceretian opened this issue Jul 5, 2019 · 0 comments · Fixed by #12799
Labels

Comments

@yuri-tceretian
Copy link

  • Product: Filebeat
  • Version: 7.2.0
  • Operating System: Windows 2008 R2

Description of the bug

Enrolling to centralized management fails while creating a backup of the current configuration. Error message:

Error while enrolling: creating a backup copy of current settings: rename filebeat.yml filebeat.yml.2019-07-05T06:01:52-04:00.bak: The filename, directory name, or volume label syntax is incorrect.

The error is generated by this code (thanks to @adriansr for pointing)

// backup current settings:
backConfigFile := configFile + "." + ts.Format(time.RFC3339) + ".bak"
fmt.Println("Saving a copy of current settings to " + backConfigFile)
err = file.SafeFileRotate(backConfigFile, configFile)
if err != nil {
return errors.Wrap(err, "creating a backup copy of current settings")
}

The name of the backup file is not valid in the Windows ecosystem.

Steps to reproduce

  • Install filebeat using the official documentation
  • Set up Elasticsearch and Kibana
  • Get enrollment token in kibana
  • Run filebeat.exe with the command enroll
adriansr added a commit to adriansr/beats that referenced this issue Jul 5, 2019
Enrolling of a Beat to Central Management was failing under Windows
because the Beat tries to create a configuration backup file that has
a colon character in its name, which is not allowed under Windows.

Fixes elastic#12797
adriansr added a commit that referenced this issue Jul 9, 2019
Enrolling of a Beat to Central Management was failing under Windows
because the Beat tries to create a configuration backup file that has
a colon character in its name, which is not allowed under Windows.

Fixes #12797
adriansr added a commit to adriansr/beats that referenced this issue Jul 9, 2019
Enrolling of a Beat to Central Management was failing under Windows
because the Beat tries to create a configuration backup file that has
a colon character in its name, which is not allowed under Windows.

Fixes elastic#12797

(cherry picked from commit 4eb411b)
adriansr added a commit to adriansr/beats that referenced this issue Jul 9, 2019
Enrolling of a Beat to Central Management was failing under Windows
because the Beat tries to create a configuration backup file that has
a colon character in its name, which is not allowed under Windows.

Fixes elastic#12797

(cherry picked from commit 4eb411b)
adriansr added a commit that referenced this issue Jul 9, 2019
Enrolling of a Beat to Central Management was failing under Windows
because the Beat tries to create a configuration backup file that has
a colon character in its name, which is not allowed under Windows.

Fixes #12797

(cherry picked from commit 4eb411b)
adriansr added a commit that referenced this issue Jul 9, 2019
Enrolling of a Beat to Central Management was failing under Windows
because the Beat tries to create a configuration backup file that has
a colon character in its name, which is not allowed under Windows.

Fixes #12797

(cherry picked from commit 4eb411b)
leweafan pushed a commit to leweafan/beats that referenced this issue Apr 28, 2023
Enrolling of a Beat to Central Management was failing under Windows
because the Beat tries to create a configuration backup file that has
a colon character in its name, which is not allowed under Windows.

Fixes elastic#12797

(cherry picked from commit 8534dbc)
leweafan pushed a commit to leweafan/beats that referenced this issue Apr 28, 2023
Enrolling of a Beat to Central Management was failing under Windows
because the Beat tries to create a configuration backup file that has
a colon character in its name, which is not allowed under Windows.

Fixes elastic#12797

(cherry picked from commit 8534dbc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant