# Filebeat fails to start with filebeat-god but works with filebeat directly

**URL:** <https://discuss.elastic.co/t/filebeat-fails-to-start-with-filebeat-god-but-works-with-filebeat-directly/60853>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [September 19, 2016, 9:17am UTC](https://discuss.elastic.co/t/filebeat-fails-to-start-with-filebeat-god-but-works-with-filebeat-directly/60853 "2016-09-19T09:17:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stanislav\_Antic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stanislav_antic/32/11971_2.png) [@Stanislav\_Antic](https://discuss.elastic.co/u/Stanislav_Antic)\
**Post date:** [September 19, 2016, 9:17am UTC](https://discuss.elastic.co/t/filebeat-fails-to-start-with-filebeat-god-but-works-with-filebeat-directly/60853/1 "2016-09-19T09:17:29Z")

</div>

I'm using CentOS 6.8 and have installed filebeat (version 1.3.1). My configuration is:

```auto
---
filebeat:
  prospectors: [{"paths": ["/var/log/*.log"], "input_type": "log"}]
  registry_file: /var/lib/filebeat/registry

output:
  {"console": {"pretty": false}}

shipper:

logging:
  to_syslog: false
  to_files: true
  files:
    path: /var/log/beat/
    name: filebeat

    # Configure log file size limit. If limit is reached, log file will be
    # automatically rotated
    rotateeverybytes: 10485760 # = 10MB

    # Number of rotated log files to keep. Oldest files will be deleted first.
    keepfiles: 7

  # Enable debug output for selected components. To enable all selectors use ["*"]
  # Other available selectors are beat, publish, service
  # Multiple selectors can be chained.
  #selectors: []

  # Sets log level. The default log level is error.
  # Available log levels are: critical, error, warning, info, debug
  #level: error

```

When starting with service script it just exits. If I run filebeat-god with '-f' (foreground option) it works:

```auto
filebeat-god -f -r / -n -p /var/run/filebeat.pid -- /usr/bin/filebeat -c /etc/filebeat/filebeat.yml

```

And when I run it with filebeat command directly:

```auto
/usr/bin/filebeat -c /etc/filebeat/filebeat.yml

```

My guess that this is bug.

---

<div class="post-metadata">

**Author:** ![Stanislav\_Antic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stanislav_antic/32/11971_2.png) [@Stanislav\_Antic](https://discuss.elastic.co/u/Stanislav_Antic)\
**Post date:** [September 19, 2016, 12:52pm UTC](https://discuss.elastic.co/t/filebeat-fails-to-start-with-filebeat-god-but-works-with-filebeat-directly/60853/2 "2016-09-19T12:52:40Z")

</div>

Problem here was because 'filebeat-god' ([https://github.com/tsg/go-daemon](https://github.com/tsg/go-daemon)) closes stdin, stdout, stderr. This won't work with console out. Some error message in log would be really usefull in this case.

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [September 19, 2016, 1:22pm UTC](https://discuss.elastic.co/t/filebeat-fails-to-start-with-filebeat-god-but-works-with-filebeat-directly/60853/3 "2016-09-19T13:22:10Z")

</div>

Agree on the error message being helpfull. It has been added to upcoming 5.0 beta1 release.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 10, 2016, 9:17am UTC](https://discuss.elastic.co/t/filebeat-fails-to-start-with-filebeat-god-but-works-with-filebeat-directly/60853/4 "2016-10-10T09:17:28Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
