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

The "collector_configuration_directory" option requires an absolute path #309

Closed
bernd opened this issue Nov 14, 2018 · 0 comments
Closed
Milestone

Comments

@bernd
Copy link
Member

bernd commented Nov 14, 2018

Problem description

The value of the collector_configuration_directory config option needs to be an absolute path. I tried to use .cache/config as value. Writing the config file worked but starting the collector didn't because it couldn't find the file.

Filebeat error log:

Exiting: error loading config file: stat .cache/config/filebeat-6.3.0.conf: no such file or directory

Sidecar output:

$ ./build/1.0.0/linux/amd64/graylog-sidecar -c local.yml 
INFO[0000] Using node-id: 1c4a8275-ffeb-4c27-8cfb-cd23ff5a52e8 
INFO[0000] Starting signal distributor                  
INFO[0005] Adding process runner for: filebeat-6.3.0    
INFO[0005] [filebeat-6.3.0] Configuration change detected, rewriting configuration file. 
INFO[0005] [filebeat-6.3.0] Starting (exec driver)      
ERRO[0006] [filebeat-6.3.0] Backend finished unexpectedly, trying to restart 1/3. 
INFO[0006] [filebeat-6.3.0] Starting (exec driver)      
ERRO[0007] [filebeat-6.3.0] Backend finished unexpectedly, trying to restart 2/3. 
INFO[0007] [filebeat-6.3.0] Starting (exec driver)      
ERRO[0008] [filebeat-6.3.0] Backend finished unexpectedly, trying to restart 3/3. 
INFO[0008] [filebeat-6.3.0] Starting (exec driver)      
ERRO[0009] [filebeat-6.3.0] Unable to start collector after 3 tries, giving up! 

I think we should either require an absolute path and warn the user if the path is not absolute or change the code to handle relative paths.

Steps to reproduce the problem

  1. Use relative path for collector_configuration_directory config option
  2. Start sidecar
  3. Assign configuration
  4. Watch collector startup fail

Environment

  • Sidecar Version: 1.0.0-alpha.9
@bernd bernd added the bug label Nov 14, 2018
@bernd bernd added this to the 3.0.0 milestone Nov 14, 2018
mpfz0r added a commit that referenced this issue Nov 16, 2018
Also try to create the directory right away.
It's easier to debug if we fail early.

Fixes #309
mpfz0r added a commit that referenced this issue Nov 16, 2018
Also try to create the directory right away.
It's easier to debug if we fail early.

Fixes #309
mpfz0r added a commit that referenced this issue Nov 19, 2018
Also try to create the directory right away.
It's easier to debug if we fail early.

Fixes #309
mpfz0r added a commit that referenced this issue Nov 19, 2018
Also try to create the directory right away.
It's easier to debug if we fail early.

Fixes #309
bernd pushed a commit that referenced this issue Nov 19, 2018
Also try to create the directory right away.
It's easier to debug if we fail early.

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

No branches or pull requests

2 participants