# Logstash ran as service won't read logs only when ran through the command line

**URL:** <https://discuss.elastic.co/t/logstash-ran-as-service-wont-read-logs-only-when-ran-through-the-command-line/349403>\
**Category:** Logstash\
**Created:** [December 15, 2023, 12:19am UTC](https://discuss.elastic.co/t/logstash-ran-as-service-wont-read-logs-only-when-ran-through-the-command-line/349403 "2023-12-15T00:19:45Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ELI\_MA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eli_ma/32/122166_2.png) [@ELI\_MA](https://discuss.elastic.co/u/ELI_MA)\
**Post date:** [December 15, 2023, 3:27pm UTC](https://discuss.elastic.co/t/logstash-ran-as-service-wont-read-logs-only-when-ran-through-the-command-line/349403/5 "2023-12-15T15:27:00Z")

</div>

> [@leandrojmp](#):
>
> What do you mean with that? You removed this from the `logstash.service` file? This is not correct, this is required.

that was one of the suggestions in this post [Pipelines.yml ignored on logstash running as a service](https://discuss.elastic.co/t/pipelines-yml-ignored-on-logstash-running-as-a-service/107828)

to change line below in /etc/systemd/system/logstash.service

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

```

to

```auto
ExecStart=/usr/share/logstash/bin/logstash 

```

But I've reverted the change

---

_[View the full topic](https://discuss.elastic.co/t/logstash-ran-as-service-wont-read-logs-only-when-ran-through-the-command-line/349403)._
