# Logstash service started but not working, command line is working

**URL:** https://discuss.elastic.co/t/logstash-service-started-but-not-working-command-line-is-working/47764
**Category:** Logstash
**Created:** [April 19, 2016, 8:45am UTC](https://discuss.elastic.co/t/logstash-service-started-but-not-working-command-line-is-working/47764 "2016-04-19T08:45:41Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Erik\_Parienty](https://avatars.discourse-cdn.com/v4/letter/e/a587f6/32.png) [@Erik\_Parienty](https://discuss.elastic.co/u/Erik_Parienty)
#### Post date: [April 19, 2016, 8:45am UTC](https://discuss.elastic.co/t/logstash-service-started-but-not-working-command-line-is-working/47764/1 "2016-04-19T08:45:41Z")

</div>

when i run logstash in command line all is working but not as a service  
i get no data  
no logs  
conf is ok  
ps shows:  
logstash 10120 1 1 08:44 pts/0 00:00:00 /usr/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.io.tmpdir=/var/lib/logstash -Xmx500m -Xss2048k -Djffi.boot.library.path=/opt/logstash/vendor/jruby/lib/jni -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.io.tmpdir=/var/lib/logstash -Xbootclasspath/a:/opt/logstash/vendor/jruby/lib/jruby.jar -classpath : -Djruby.home=/opt/logstash/vendor/jruby -Djruby.lib=/opt/logstash/vendor/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh org.jruby.Main --1.9 /opt/logstash/lib/bootstrap/environment.rb logstash/runner.rb agent -f /etc/logstash/conf.d -l /var/log/logstash/logstash.log

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [April 19, 2016, 8:59am UTC](https://discuss.elastic.co/t/logstash-service-started-but-not-working-command-line-is-working/47764/2 "2016-04-19T08:59:39Z")

</div>

Try increasing the logging verbosity by starting Logstash with `--verbose` or even `--debug`. One possible cause could be that the logstash user doesn't have read permission to the log files.

---

<div class="post-metadata">

### Author: ![Erik\_Parienty](https://avatars.discourse-cdn.com/v4/letter/e/a587f6/32.png) [@Erik\_Parienty](https://discuss.elastic.co/u/Erik_Parienty)
#### Post date: [April 19, 2016, 9:06am UTC](https://discuss.elastic.co/t/logstash-service-started-but-not-working-command-line-is-working/47764/3 "2016-04-19T09:06:07Z")

</div>

i see the permissions on var/log/logstash is  
drwxrwxr-x 2 logstash root 4096 Oct 27 18:48 logstash

and after starting the service  
-rw-r--r-- 1 root root 0 Apr 19 09:07 logstash.err  
-rw-r--r-- 1 root root 0 Apr 19 09:07 logstash.stdout

why its root?

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [April 19, 2016, 9:16am UTC](https://discuss.elastic.co/t/logstash-service-started-but-not-working-command-line-is-working/47764/4 "2016-04-19T09:16:35Z")

</div>

Why indeed? This should be changed. How did you install Logstash?

---

<div class="post-metadata">

### Author: ![Erik\_Parienty](https://avatars.discourse-cdn.com/v4/letter/e/a587f6/32.png) [@Erik\_Parienty](https://discuss.elastic.co/u/Erik_Parienty)
#### Post date: [April 19, 2016, 9:18am UTC](https://discuss.elastic.co/t/logstash-service-started-but-not-working-command-line-is-working/47764/5 "2016-04-19T09:18:01Z")

</div>

yum install logstash

repo file:  
[logstash-2.0]  
name=logstash repository for 2.x packages  
baseurl=http://packages.elasticsearch.org/logstash/2.0/centos  
gpgcheck=1  
gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearch  
enabled=1

---

<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 6, 2017, 5:01am UTC](https://discuss.elastic.co/t/logstash-service-started-but-not-working-command-line-is-working/47764/6 "2017-07-06T05:01:37Z")

</div>


