# Logstash service doesn't output logs, command line does

**URL:** <https://discuss.elastic.co/t/logstash-service-doesnt-output-logs-command-line-does/90294>\
**Category:** Logstash\
**Created:** [June 21, 2017, 1:06pm UTC](https://discuss.elastic.co/t/logstash-service-doesnt-output-logs-command-line-does/90294 "2017-06-21T13:06:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leoponton](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leoponton/32/19354_2.png) [@leoponton](https://discuss.elastic.co/u/leoponton)\
**Post date:** [June 21, 2017, 1:06pm UTC](https://discuss.elastic.co/t/logstash-service-doesnt-output-logs-command-line-does/90294/1 "2017-06-21T13:06:18Z")

</div>

If I start the logstash service using service or systemctl, it starts and reports as running but produces no output that is seen by elasticsearch.

On the other hand, if I run logstash using

`./bin/logstash -f /etc/logstash/conf.d/`

it logs to the console and is picked up by elasticsearch

What am I missing?

---

<div class="post-metadata">

**Author:** ![leoponton](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leoponton/32/19354_2.png) [@leoponton](https://discuss.elastic.co/u/leoponton)\
**Post date:** [June 21, 2017, 3:28pm UTC](https://discuss.elastic.co/t/logstash-service-doesnt-output-logs-command-line-does/90294/2 "2017-06-21T15:28:12Z")

</div>

Okay, I seem to have fixed this. There were a couple or three problems:

1. In `/etc/systemd/system/logstash.service`,  
I had to change  
`ExecStart=/usr/share/logstash/bin/logstash "--path.settings" "/etc/logstash"`  
to  
`ExecStart=/usr/share/logstash/bin/logstash "--path.settings" "/usr/share/logstash/config"`

then  
`sudo systemctl daemon-reload`

1. The logging directory, `/var/log/logstash` was `root:root` and the logs therein were `logstash:root` so I `chown`'d both to `logstash:logstash`

2. Logstash was trying to listen on `514` & `5514` which didn't work as the logstash user (no permission) so I used `iptables` to forward 514 to 5514, viz:

I think that was all.

---

<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:** [July 19, 2017, 3:28pm UTC](https://discuss.elastic.co/t/logstash-service-doesnt-output-logs-command-line-does/90294/3 "2017-07-19T15:28:26Z")

</div>

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