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

Server exits with unhelpful error when ssl.enabled=true, but cert/key files are unspecified #3908

Closed
axw opened this issue Jun 23, 2020 · 2 comments · Fixed by #3961
Closed

Comments

@axw
Copy link
Member

axw commented Jun 23, 2020

When you configure apm-server with ssl.enabled: true, but don't specify either ssl.certificate or ssl.key, then apm-server will exit with the following error message:

Exiting: open : no such file or directory

The docs say:

certificate
The path to the file containing the certificate for Server authentication. Required if apm-server.ssl.enabled is true.

key
The path to the file containing the Server certificate key. Required if apm-server.ssl.enabled is true.

We should validate these requirements during startup, and exit with a more helpful error message, suggesting what needs to be changed.

@simitt
Copy link
Contributor

simitt commented Jun 23, 2020

It might make sense to make the changes directly in libbeat, as this error message is currently the same for all the beats.

@axw
Copy link
Member Author

axw commented Jul 21, 2020

Verified with BC2. Procedure:

  • Started stack with apm-it
  • Modified docker-compose.yml, adding -E apm-server.ssl.enabled=true to apm-server command
  • Found a moderately more useful error message:

localtesting_7.9.0_apm-server | Exiting: Error processing configuration: certificate file not configured accessing 'apm-server.ssl' (source:'command line flag')

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.

2 participants