# Logstash 2.2.0 File Input ignores sincedb\_path option when running as a service

**URL:** <https://discuss.elastic.co/t/logstash-2-2-0-file-input-ignores-sincedb-path-option-when-running-as-a-service/41516>\
**Category:** Logstash\
**Created:** [February 11, 2016, 4:21pm UTC](https://discuss.elastic.co/t/logstash-2-2-0-file-input-ignores-sincedb-path-option-when-running-as-a-service/41516 "2016-02-11T16:21:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_Howard](https://avatars.discourse-cdn.com/v4/letter/e/e95f7d/32.png) [@Eric\_Howard](https://discuss.elastic.co/u/Eric_Howard)\
**Post date:** [February 11, 2016, 4:21pm UTC](https://discuss.elastic.co/t/logstash-2-2-0-file-input-ignores-sincedb-path-option-when-running-as-a-service/41516/1 "2016-02-11T16:21:49Z")

</div>

This is with Logstash 2.2.0

I have the following input in my configuration file:

`input { file { path => /opt/logstash/file.txt start_position => "beginning" sincedb_path => "/opt/logstash/sincedb" } }`

However, when I run it as a service (Centos 6), it still complains about $SINCEDB\_PATH or $HOME not being set. I'd rather not manually set the environment variable in the init script. Why doesn't this work?

---

<div class="post-metadata">

**Author:** ![zhangqz](https://avatars.discourse-cdn.com/v4/letter/z/47e85d/32.png) [@zhangqz](https://discuss.elastic.co/u/zhangqz)\
**Post date:** [February 14, 2016, 3:46am UTC](https://discuss.elastic.co/t/logstash-2-2-0-file-input-ignores-sincedb-path-option-when-running-as-a-service/41516/2 "2016-02-14T03:46:41Z")

</div>

**Please help!**  
**Thank you very much!**

**same problem occurred when I run Logstash 2.2.1 as a service (Centos 7)**

**my configuration file:**  
input {  
file {  
path =\> "/var/log/secure"  
type =\> "system"  
sincedb\_path =\> "/tmp/sincedb"  
start\_position =\> "beginning"  
}  
}

**error messages:**  
Feb 14 09:30:00 elk logstash: {:timestamp=\>"2016-02-14T09:30:00.066000+0800", :message=\>"A plugin had an unrecoverable error. Will restart this plugin.\n Plugin: \<LogStash::Inputs::File path=\>["/var/log/secure"], type=\>"system", sincedb\_path=\>"/tmp/sincedb", start\_position=\>"beginning", codec=\>\<LogStash::Codecs::Plain charset=\>"UTF-8"\>, stat\_interval=\>1, discover\_interval=\>15, sincedb\_write\_interval=\>15, delimiter=\>"\n", ignore\_older=\>86400, close\_older=\>3600\>\n Error: No HOME or SINCEDB\_PATH set in environment. I need one of these set so I can keep track of the files I am following.", :level=\>:error}  
Feb 14 09:30:01 elk logstash: {:timestamp=\>"2016-02-14T09:30:01.069000+0800", :message=\>"A plugin had an unrecoverable error. Will restart this plugin.\n Plugin: \<LogStash::Inputs::File path=\>["/var/log/secure"], type=\>"system", sincedb\_path=\>"/tmp/sincedb", start\_position=\>"beginning", codec=\>\<LogStash::Codecs::Plain charset=\>"UTF-8"\>, stat\_interval=\>1, discover\_interval=\>15, sincedb\_write\_interval=\>15, delimiter=\>"\n", ignore\_older=\>86400, close\_older=\>3600\>\n Error: No HOME or SINCEDB\_PATH set in environment. I need one of these set so I can keep track of the files I am following.", :level=\>:error}  
Feb 14 09:30:02 elk logstash: {:timestamp=\>"2016-02-14T09:30:02.071000+0800", :message=\>"A plugin had an unrecoverable error. Will restart this plugin.\n Plugin: \<LogStash::Inputs::File path=\>["/var/log/secure"], type=\>"system", sincedb\_path=\>"/tmp/sincedb", start\_position=\>"beginning", codec=\>\<LogStash::Codecs::Plain charset=\>"UTF-8"\>, stat\_interval=\>1, discover\_interval=\>15, sincedb\_write\_interval=\>15, delimiter=\>"\n", ignore\_older=\>86400, close\_older=\>3600\>\n Error: No HOME or SINCEDB\_PATH set in environment. I need one of these set so I can keep track of the files I am following.", :level=\>:error}

---

<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:** [February 14, 2016, 11:30am UTC](https://discuss.elastic.co/t/logstash-2-2-0-file-input-ignores-sincedb-path-option-when-running-as-a-service/41516/3 "2016-02-14T11:30:53Z")

</div>

This looks like a bug that's quite easy to reproduce but I can't figure out why it happens. I've filed [https://github.com/logstash-plugins/logstash-input-file/issues/101](https://github.com/logstash-plugins/logstash-input-file/issues/101) to get the matter investigated.

---

<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:11am UTC](https://discuss.elastic.co/t/logstash-2-2-0-file-input-ignores-sincedb-path-option-when-running-as-a-service/41516/4 "2017-07-06T05:11:39Z")

</div>

Closed on July 6, 2017, 5:11am UTC


