# Logstash not ingesting data to elasticsearch when run as daemon

**URL:** <https://discuss.elastic.co/t/logstash-not-ingesting-data-to-elasticsearch-when-run-as-daemon/170356>\
**Category:** Logstash\
**Created:** [February 28, 2019, 1:38pm UTC](https://discuss.elastic.co/t/logstash-not-ingesting-data-to-elasticsearch-when-run-as-daemon/170356 "2019-02-28T13:38:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![itssameer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itssameer/32/45030_2.png) [@itssameer](https://discuss.elastic.co/u/itssameer)\
**Post date:** [February 28, 2019, 1:38pm UTC](https://discuss.elastic.co/t/logstash-not-ingesting-data-to-elasticsearch-when-run-as-daemon/170356/1 "2019-02-28T13:38:44Z")

</div>

Logstash not ingesting data to elasticsearch when run as daemon and it does show any error as well. But its ingesting data to elasticsearch when ran from terminal as /bin/logstash -f /path/to/conf/file.

Below is the content of /etc/systemd/system/logstash.service :

[Unit]

Description=logstash

[Service]

Type=simple

User=logstash

Group=logstash

# Load env vars from /etc/default/ and /etc/sysconfig/ if they exist.

# Prefixing the path with '-' makes it try to load, but if the file doesn't

# exist, it continues onward.

EnvironmentFile=-/etc/default/logstash

EnvironmentFile=-/etc/sysconfig/logstash

ExecStart=/usr/share/logstash/bin/logstash --path.settings /etc/logstash/

Restart=always

WorkingDirectory=/

Nice=19

LimitNOFILE=16384

[Install]

WantedBy=multi-user.target

---

<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:** [March 28, 2019, 1:38pm UTC](https://discuss.elastic.co/t/logstash-not-ingesting-data-to-elasticsearch-when-run-as-daemon/170356/2 "2019-03-28T13:38:45Z")

</div>

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