-
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
Filebeat init script hangs on configtest #1213
Comments
Didn't noticed that earlier, but |
Marked this as bug, I didn't expect this behavior either. |
To clarify, it looks like we're attempting to connect on I can confirm this as still happens in current master (~5.0.0-alpha1) with elasticsearch and redis outputs at least. Steps to reproduce:
Program only returns after the DNS name is resolved. CC @urso |
Here are the logs from the above:
|
Hey guys,
I've just started filebeat deployment on my local Vagrant machine and it turned out approach to start in init script file is a little bit controversial in my opinion.
Deployment details:
The case is that you guys do a config test before start, which is perfectly fine and absolutely expected, but the options that have been used to execute that may cause some issues.
Here's the relevant code from
/etc/init.d/filebeat
:In my case before start
/usr/bin/filebeat -c /etc/filebeat/filebeat.yml -e -configtest
is executed. The problem is that:-e
means file/syslog logging settings from YML file are completely ignored and all output goes tostderr
, so script won't start in background and will just hang forever (ignore redis warnings for a while, explained in next point)-e
fromtest_args
variable it doesn't really change much (it still hangs, but is just less verbose):My expectation was that
-configtest
flag is quite fast and returns 0 when everything is fine when it comes to config file and non-zero exit code otherwise. By fine I mean not terribly broken (i.e. lack of output, wrong values, etc). I definitely didn't expect that output I defined (Redis in my case) needs to be up and running upfront. It's not ideal approach in my opinion. I'd expect a warning message in log file, but it shouldn't stopfilebeat
daemon from starting, as there's no reason to do so. I create dozens of machines at the same time (terraform + Chef) and have no idea when Redis or Logstash will become available. All I know is that eventually these services will be online.Cheers,
Jakub
The text was updated successfully, but these errors were encountered: