# Filebeat config is OK, but Not Started & Not Working

**URL:** <https://discuss.elastic.co/t/filebeat-config-is-ok-but-not-started-not-working/117301>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [January 27, 2018, 12:38pm UTC](https://discuss.elastic.co/t/filebeat-config-is-ok-but-not-started-not-working/117301 "2018-01-27T12:38:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![omid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/omid/32/33595_2.png) [@omid](https://discuss.elastic.co/u/omid)\
**Post date:** [January 27, 2018, 12:38pm UTC](https://discuss.elastic.co/t/filebeat-config-is-ok-but-not-started-not-working/117301/1 "2018-01-27T12:38:39Z")

</div>

im installed a filebeat on server Which is to send nginx log to logstash  
im download filebeat .deb package (x64)  
and install "dpkg --install filebeat ... .deb"  
and successfully install .  
But service filebeat not working ... with error

```
root@storage-a-01:/etc/filebeat# journalctl -xe
Jan 25 17:52:07 storage-a-01 systemd[1]: filebeat.service: Main process exited, code=exited, status=1/FAILURE
Jan 25 17:52:07 storage-a-01 systemd[1]: filebeat.service: Unit entered failed state.
Jan 25 17:52:07 storage-a-01 systemd[1]: filebeat.service: Failed with result 'exit-code'.
Jan 25 17:52:07 storage-a-01 systemd[1]: filebeat.service: Service hold-off time over, scheduling restart.
Jan 25 17:52:07 storage-a-01 systemd[1]: Stopped filebeat.
-- Subject: Unit filebeat.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit filebeat.service has finished shutting down.
Jan 25 17:52:07 storage-a-01 systemd[1]: Started filebeat.
-- Subject: Unit filebeat.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit filebeat.service has finished starting up.
-- 
-- The start-up result is done.
Jan 25 17:52:07 storage-a-01 filebeat[10261]: Exiting: 1 error: invalid config: yaml: line 9: did not find expected key
Jan 25 17:52:07 storage-a-01 systemd[1]: filebeat.service: Main process exited, code=exited, status=1/FAILURE
Jan 25 17:52:07 storage-a-01 systemd[1]: filebeat.service: Unit entered failed state.
Jan 25 17:52:07 storage-a-01 systemd[1]: filebeat.service: Failed with result 'exit-code'.
Jan 25 17:52:08 storage-a-01 systemd[1]: filebeat.service: Service hold-off time over, scheduling restart.
Jan 25 17:52:08 storage-a-01 systemd[1]: Stopped filebeat.
-- Subject: Unit filebeat.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit filebeat.service has finished shutting down.
Jan 25 17:52:08 storage-a-01 systemd[1]: Started filebeat.
-- Subject: Unit filebeat.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit filebeat.service has finished starting up.
-- 
-- The start-up result is done.
Jan 25 17:52:08 storage-a-01 filebeat[10279]: Exiting: 1 error: invalid config: yaml: line 9: did not find expected key
Jan 25 17:52:08 storage-a-01 systemd[1]: filebeat.service: Main process exited, code=exited, status=1/FAILURE
Jan 25 17:52:08 storage-a-01 systemd[1]: filebeat.service: Unit entered failed state.
Jan 25 17:52:08 storage-a-01 systemd[1]: filebeat.service: Failed with result 'exit-code'.
Jan 25 17:52:08 storage-a-01 systemd[1]: filebeat.service: Service hold-off time over, scheduling restart.
Jan 25 17:52:08 storage-a-01 systemd[1]: Stopped filebeat.
-- Subject: Unit filebeat.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit filebeat.service has finished shutting down.
Jan 25 17:52:08 storage-a-01 systemd[1]: Started filebeat.
-- Subject: Unit filebeat.service has finished start-up
-- Defined-By: systemd

```

[im using this command](https://discuss.elastic.co/t/filebeat-fails-to-start-in-ubuntu-16-04/82418/2)  
filebeat -configtest -c filebeat.yml -e  
==\> Result == Config OK

**im result "systemctl status filebeat.service"**  
root@storage-a-01:~# systemctl status filebeat.service  
● filebeat.service - filebeat  
Loaded: loaded (/lib/systemd/system/filebeat.service; disabled; vendor preset: enabled)  
Active: inactive (dead)  
Docs: [https://www.elastic.co/guide/en/beats/filebeat/current/index.html](https://www.elastic.co/guide/en/beats/filebeat/current/index.html)

```
Jan 27 16:07:32 storage-a-01 systemd[1]: Stopped filebeat.
Jan 27 16:07:32 storage-a-01 systemd[1]: Started filebeat.
Jan 27 16:07:32 storage-a-01 filebeat[25950]: Exiting: 1 error: invalid config: yaml: line 9: did not find expected key
Jan 27 16:07:32 storage-a-01 systemd[1]: filebeat.service: Main process exited, code=exited, status=1/FAILURE
Jan 27 16:07:32 storage-a-01 systemd[1]: filebeat.service: Unit entered failed state.
Jan 27 16:07:32 storage-a-01 systemd[1]: filebeat.service: Failed with result 'exit-code'.
Jan 27 16:07:32 storage-a-01 systemd[1]: filebeat.service: Service hold-off time over, scheduling restart.
Jan 27 16:07:32 storage-a-01 systemd[1]: Stopped filebeat.
Jan 27 16:07:32 storage-a-01 systemd[1]: filebeat.service: Start request repeated too quickly.
Jan 27 16:07:32 storage-a-01 systemd[1]: Failed to start filebeat.
```

---

<div class="post-metadata">

**Author:** ![omid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/omid/32/33595_2.png) [@omid](https://discuss.elastic.co/u/omid)\
**Post date:** [January 27, 2018, 1:21pm UTC](https://discuss.elastic.co/t/filebeat-config-is-ok-but-not-started-not-working/117301/2 "2018-01-27T13:21:54Z")

</div>

This filebeat log

```
root@storage-a-01:/usr/share/filebeat/bin# filebeat -c /etc/filebeat/filebeat.yml -e -d "*" 
2018/01/27 13:16:17.981634 beat.go:436: INFO Home path: [/usr/share/filebeat/bin] Config path: [/usr/share/filebeat/bin] Data path: [/usr/share/filebeat/bin/data] Logs path: [/usr/share/filebeat/bin/logs]
2018/01/27 13:16:17.981750 beat.go:463: DBG [beat] Beat metadata path: /usr/share/filebeat/bin/data/meta.json
2018/01/27 13:16:17.981756 metrics.go:23: INFO Metrics logging every 30s
2018/01/27 13:16:17.981943 beat.go:443: INFO Beat UUID: 7e34dac8-310a-468c-92c7-bb44120eb124
2018/01/27 13:16:17.982024 beat.go:203: INFO Setup Beat: filebeat; Version: 6.1.2
2018/01/27 13:16:17.982158 beat.go:215: DBG [beat] Initializing output plugins
2018/01/27 13:16:17.982211 processor.go:49: DBG [processors] Processors: 
2018/01/27 13:16:17.982748 client.go:123: INFO Elasticsearch url: http://localhost:9200
2018/01/27 13:16:17.983570 logger.go:18: DBG [publish] start pipeline event consumer
2018/01/27 13:16:17.983706 module.go:76: INFO Beat name: storage-a-01
2018/01/27 13:16:17.983843 modules.go:95: ERR Not loading modules. Module directory not found: /usr/share/filebeat/bin/module
2018/01/27 13:16:17.984073 beat.go:276: INFO filebeat start running.
2018/01/27 13:16:17.984228 registrar.go:88: INFO Registry file set to: /usr/share/filebeat/bin/data/registry
2018/01/27 13:16:17.984336 registrar.go:108: INFO Loading registrar data from /usr/share/filebeat/bin/data/registry
2018/01/27 13:16:17.984444 registrar.go:119: INFO States Loaded from registrar: 0
2018/01/27 13:16:17.984493 crawler.go:48: INFO Loading Prospectors: 1
2018/01/27 13:16:17.984683 reload.go:95: DBG [cfgfile] Checking module configs from: /usr/share/filebeat/bin/modules.d/*.yml
2018/01/27 13:16:17.984827 reload.go:109: DBG [cfgfile] Number of module configs found: 0
2018/01/27 13:16:17.984878 crawler.go:82: INFO Loading and starting Prospectors completed. Enabled prospectors: 0
2018/01/27 13:16:17.984994 registrar.go:150: INFO Starting Registrar
2018/01/27 13:16:17.985185 reload.go:127: INFO Config reloader started
2018/01/27 13:16:17.985361 reload.go:151: DBG [cfgfile] Scan for new config files
2018/01/27 13:16:17.985457 reload.go:170: DBG [cfgfile] Number of module configs found: 0
2018/01/27 13:16:17.985495 reload.go:219: INFO Loading of config files completed.
2018/01/27 13:16:47.983094 metrics.go:39: INFO Non-zero metrics in the last 30s: beat.info.uptime.ms=30007 beat.memstats.gc_next=4473924 beat.memstats.memory_alloc=2848624 beat.memstats.memory_total=2848624 filebeat.harvester.open_files=0 filebeat.harvester.running=0 libbeat.config.module.running=0 libbeat.config.reloads=1 libbeat.output.type=elasticsearch libbeat.pipeline.clients=0 libbeat.pipeline.events.active=0 registrar.states.current=0
```

---

<div class="post-metadata">

**Author:** ![adrisr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adrisr/32/25423_2.png) [@adrisr](https://discuss.elastic.co/u/adrisr)\
**Post date:** [January 27, 2018, 1:55pm UTC](https://discuss.elastic.co/t/filebeat-config-is-ok-but-not-started-not-working/117301/3 "2018-01-27T13:55:42Z")

</div>

Please share your configuration in `/etc/filebeat/filebeat.yml`.

---

<div class="post-metadata">

**Author:** ![omid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/omid/32/33595_2.png) [@omid](https://discuss.elastic.co/u/omid)\
**Post date:** [January 27, 2018, 2:50pm UTC](https://discuss.elastic.co/t/filebeat-config-is-ok-but-not-started-not-working/117301/4 "2018-01-27T14:50:55Z")

</div>

/etc/filebeat/filebeat.yml ==\>

[https://file.io/3CgvSn](https://file.io/3CgvSn)

---

<div class="post-metadata">

**Author:** ![omid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/omid/32/33595_2.png) [@omid](https://discuss.elastic.co/u/omid)\
**Post date:** [January 27, 2018, 2:57pm UTC](https://discuss.elastic.co/t/filebeat-config-is-ok-but-not-started-not-working/117301/5 "2018-01-27T14:57:51Z")

</div>

im nginx.yml renamed to nginx.yml.disabled .  
and started Filebeat ...  
but not sended log to logstash ...  
my **filebeat.reference.yml** config:  
[https://file.io/dPTU5Q](https://file.io/dPTU5Q)

---

<div class="post-metadata">

**Author:** ![omid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/omid/32/33595_2.png) [@omid](https://discuss.elastic.co/u/omid)\
**Post date:** [January 28, 2018, 8:12am UTC](https://discuss.elastic.co/t/filebeat-config-is-ok-but-not-started-not-working/117301/6 "2018-01-28T08:12:09Z")

</div>

What should I do ?

---

<div class="post-metadata">

**Author:** ![omid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/omid/32/33595_2.png) [@omid](https://discuss.elastic.co/u/omid)\
**Post date:** [January 28, 2018, 12:04pm UTC](https://discuss.elastic.co/t/filebeat-config-is-ok-but-not-started-not-working/117301/8 "2018-01-28T12:04:08Z")

</div>

```
**root@storage-a-01:/etc/filebeat# sudo /etc/init.d/filebeat start**

[ok] Starting filebeat (via systemctl): filebeat.service.

**root@storage-a-01:/etc/filebeat# sudo /etc/init.d/filebeat status**

● filebeat.service - filebeatLoaded: loaded (/lib/systemd/system/filebeat.service; disabled; vendor preset: enabled)Active: inactive (dead)Docs: https://www.elastic.co/guide/en/beats/filebeat/current/index.htmlJan 28 15:31:30 storage-a-01 systemd[1]: Started filebeat.Jan 28 15:31:30 storage-a-01 filebeat[5813]: filebeat2018/01/28 12:01:30.690716 beat.go:635: CRIT Exiting: error loading config file: yaml: block sequence entri...is contextJan 28 15:31:30 storage-a-01 filebeat[5813]: Exiting: error loading config file: yaml: block sequence entries are not allowed in this contextJan 28 15:31:30 storage-a-01 systemd[1]: filebeat.service: Main process exited, code=exited, status=1/FAILUREJan 28 15:31:30 storage-a-01 systemd[1]: filebeat.service: Unit entered failed state.Jan 28 15:31:30 storage-a-01 systemd[1]: filebeat.service: Failed with result 'exit-code'.Jan 28 15:31:30 storage-a-01 systemd[1]: filebeat.service: Service hold-off time over, scheduling restart.Jan 28 15:31:30 storage-a-01 systemd[1]: Stopped filebeat.Jan 28 15:31:30 storage-a-01 systemd[1]: filebeat.service: Start request repeated too quickly.Jan 28 15:31:30 storage-a-01 systemd[1]: Failed to start filebeat.Hint: Some lines were ellipsized, use -l to show in full.root@storage-a-01:/etc/filebeat#
```

---

<div class="post-metadata">

**Author:** ![adrisr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adrisr/32/25423_2.png) [@adrisr](https://discuss.elastic.co/u/adrisr)\
**Post date:** [January 29, 2018, 11:19am UTC](https://discuss.elastic.co/t/filebeat-config-is-ok-but-not-started-not-working/117301/9 "2018-01-29T11:19:31Z")

</div>

The attached file is no longer available. Can you upload it again? Only the `filebeat.yml` is needed.

---

<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:** [February 26, 2018, 11:20am UTC](https://discuss.elastic.co/t/filebeat-config-is-ok-but-not-started-not-working/117301/10 "2018-02-26T11:20:05Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
