# Multiple configuration files not working as expected

**URL:** <https://discuss.elastic.co/t/multiple-configuration-files-not-working-as-expected/36591>\
**Category:** Logstash\
**Created:** [December 8, 2015, 12:53am UTC](https://discuss.elastic.co/t/multiple-configuration-files-not-working-as-expected/36591 "2015-12-08T00:53:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lookingcloudy](https://avatars.discourse-cdn.com/v4/letter/l/43a26b/32.png) [@lookingcloudy](https://discuss.elastic.co/u/lookingcloudy)\
**Post date:** [December 8, 2015, 12:53am UTC](https://discuss.elastic.co/t/multiple-configuration-files-not-working-as-expected/36591/1 "2015-12-08T00:53:24Z")

</div>

I have two configuration files. When I try to run together using `bin/logstash -f config/*.conf` only one of the configuration files runs. Both files have the same .sql but different SQL connection strings (different databases). When I run them one at a time they work as expected.

Any clue as to why this isn't working?

`customer1.conf`

> input {  
> jdbc {  
> type =\> "referrals\_cust1"  
> jdbc\_driver\_library =\> "sqljdbc4.jar"  
> jdbc\_driver\_class =\> "com.microsoft.sqlserver.jdbc.SQLServerDriver"  
> jdbc\_connection\_string =\> "jdbc:sqlserver://...t;"  
> jdbc\_user =\> "..."  
> jdbc\_password =\> "....$"  
> jdbc\_fetch\_size =\> 5000  
> #schedule =\> "\*/2 \* \* \* \*"  
> statement\_filepath =\> "sql/referrals.sql"  
> }  
> }  
> output {  
> #stdout { codec =\> rubydebug }  
> if [type] == "referrals\_cust1" {  
> elasticsearch {  
> protocol =\> http  
> index =\> "cust1"  
> document\_type =\> "referrals"  
> document\_id =\> "%{policyref}"  
> cluster =\> "staging"  
> host =\> "localhost"  
> doc\_as\_upsert =\> true  
> }  
> }  
> }

`customer2.conf`

> input {  
> jdbc {  
> type =\> "referrals\_cust2"  
> jdbc\_driver\_library =\> "sqljdbc4.jar"  
> jdbc\_driver\_class =\> "com.microsoft.sqlserver.jdbc.SQLServerDriver"  
> jdbc\_connection\_string =\> "jdbc:sqlserver://...;"  
> jdbc\_user =\> "..."  
> jdbc\_password =\> "...$"  
> jdbc\_fetch\_size =\> 5000  
> #schedule =\> "\*/2 \* \* \* \*"  
> statement\_filepath =\> "sql/referrals.sql"  
> }  
> }  
> output {  
> #stdout { codec =\> rubydebug }  
> if [type] == "referrals\_cust2" {  
> elasticsearch {  
> protocol =\> http  
> index =\> "cust2"  
> document\_type =\> "referrals"  
> document\_id =\> "%{policyref}"  
> cluster =\> "staging"  
> host =\> "localhost"  
> doc\_as\_upsert =\> true  
> }  
> }  
> }

---

<div class="post-metadata">

**Author:** ![vtst2412](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vtst2412/32/6228_2.png) [@vtst2412](https://discuss.elastic.co/u/vtst2412)\
**Post date:** [December 8, 2015, 1:08am UTC](https://discuss.elastic.co/t/multiple-configuration-files-not-working-as-expected/36591/2 "2015-12-08T01:08:54Z")

</div>

Can you run with the `--debug` flag? It will log conf loading.

---

<div class="post-metadata">

**Author:** ![Architha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/architha/32/92477_2.png) [@Architha](https://discuss.elastic.co/u/Architha)\
**Post date:** [January 22, 2016, 10:29am UTC](https://discuss.elastic.co/t/multiple-configuration-files-not-working-as-expected/36591/3 "2016-01-22T10:29:26Z")

</div>

@lookingcloudy

Hi lookingcloudy , did you find a solution for this ? I have a similar situation where i have to run multiple config files with scheduling involved. Please help 🙂  
Thanks in advance !

---

<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:14am UTC](https://discuss.elastic.co/t/multiple-configuration-files-not-working-as-expected/36591/4 "2017-07-06T05:14:48Z")

</div>

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


