# Logstash is not pushing log to ES when using it as a service through nssm

**URL:** <https://discuss.elastic.co/t/logstash-is-not-pushing-log-to-es-when-using-it-as-a-service-through-nssm/142042>\
**Category:** Logstash\
**Created:** [July 28, 2018, 5:43pm UTC](https://discuss.elastic.co/t/logstash-is-not-pushing-log-to-es-when-using-it-as-a-service-through-nssm/142042 "2018-07-28T17:43:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HuanW](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/huanw/32/43060_2.png) [@HuanW](https://discuss.elastic.co/u/HuanW)\
**Post date:** [July 28, 2018, 5:43pm UTC](https://discuss.elastic.co/t/logstash-is-not-pushing-log-to-es-when-using-it-as-a-service-through-nssm/142042/1 "2018-07-28T17:43:03Z")

</div>

Hi, I tried with command line as below and it works fine.

> logstash -f C:\ELK\logstash-6.3.0\bin\logstash.conf

But when I use nssm to make Logstash as a Windows service.  
logs are not pushing to Elasticsearch anymore.

![image](https://us1.discourse-cdn.com/elastic/original/3X/3/d/3d5e61b389202f9cf9013ce7e0f4441aec2c82ba.png)

I've tried different argument:

> -f C:\ELK\logstash-6.3.0\bin\

> agent -f C:\ELK\logstash-6.3.0\bin\logstash.conf

but still not working.

Can anyone help me on this? Thanks

---

<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:** [July 28, 2018, 8:47pm UTC](https://discuss.elastic.co/t/logstash-is-not-pushing-log-to-es-when-using-it-as-a-service-through-nssm/142042/2 "2018-07-28T20:47:08Z")

</div>

What's in logstash.conf?

---

<div class="post-metadata">

**Author:** ![HuanW](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/huanw/32/43060_2.png) [@HuanW](https://discuss.elastic.co/u/HuanW)\
**Post date:** [July 29, 2018, 3:02am UTC](https://discuss.elastic.co/t/logstash-is-not-pushing-log-to-es-when-using-it-as-a-service-through-nssm/142042/3 "2018-07-29T03:02:39Z")

</div>

Hi, I found the problem.  
Its related to the account permission.  
I changed to another account to run the service then it works

---

<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:** [August 26, 2018, 3:12am UTC](https://discuss.elastic.co/t/logstash-is-not-pushing-log-to-es-when-using-it-as-a-service-through-nssm/142042/4 "2018-08-26T03:12:01Z")

</div>

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