# Logstach 2.3.2 hang while run with .conf file

**URL:** <https://discuss.elastic.co/t/logstach-2-3-2-hang-while-run-with-conf-file/49348>\
**Category:** Logstash\
**Created:** [May 5, 2016, 9:33pm UTC](https://discuss.elastic.co/t/logstach-2-3-2-hang-while-run-with-conf-file/49348 "2016-05-05T21:33:02Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhyeem](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dhyeem](https://discuss.elastic.co/u/dhyeem)\
**Post date:** [May 5, 2016, 9:33pm UTC](https://discuss.elastic.co/t/logstach-2-3-2-hang-while-run-with-conf-file/49348/1 "2016-05-05T21:33:02Z")

</div>

Dears ,

there is an issue with the logstash i have , I try to run it with the .conf file i created but it hang after pipeline ,

this is one of the .conf i try to run :

```
`input {
    stdin {}
        file {
                path =>"/run/media/dhyeem/Logstash/cdr/*"
                type => "cucm-cdr"
                start_position => "beginning"
        add_field => { "StandAloneCluster" => "KAAUH_Cluster" }
        }
        file {
                path =>"/run/media/dhyeem/Logstash/cmr*"
                type => "cucm-cmr"
                start_position => "beginning"
        add_field => { "StandAloneCluster" => "KAAUH_Cluster" }
        }

```

also i tried with the simple one , it's giving the same issue :

```
input { stdin { } }
output {
  elasticsearch { hosts => ["localhost:9200"] }
  stdout { codec => rubydebug }
}

```

`  
i only see this result :

```
[root@localhost conf.d]# /opt/logstash/bin/logstash -f ./cucm.conf -v

starting agent {:level=>:info}
starting pipeline {:id=>"main", :level=>:info}
Settings: Default pipeline workers: 2
Registering file input {:path=>["/run/media/dhyeem/Logstash/cdr/*"], :level=>:info}
No sincedb_path set, generating one based on the file path {:sincedb_path=>"/root/.sincedb_97e219595e57bde0712cef7e48bace05", :path=>["/run/media/dhyeem/Logstash/cdr/*"], :level=>:info}
Registering file input {:path=>["/run/media/dhyeem/Logstash/cmr*"], :level=>:info}
No sincedb_path set, generating one based on the file path {:sincedb_path=>"/root/.sincedb_b0d3cd091fb55e4d83add0276a0a91b4", :path=>["/run/media/dhyeem/Logstash/cmr*"], :level=>:info}
Starting pipeline {:id=>"main", :pipeline_workers=>2, :batch_size=>125, :batch_delay=>5, :max_inflight=>250, :level=>:info}
Pipeline main started

```

`

any advice ?

Regards,

---

<div class="post-metadata">

**Author:** ![dhyeem](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dhyeem](https://discuss.elastic.co/u/dhyeem)\
**Post date:** [May 5, 2016, 9:33pm UTC](https://discuss.elastic.co/t/logstach-2-3-2-hang-while-run-with-conf-file/49348/2 "2016-05-05T21:33:39Z")

</div>

here is the logstash.log view :

`[root@localhost bin]# sudo tail /var/log/logstash/logstash.log {:timestamp=>"2016-05-05T08:57:15.979000+0300", :message=>"Pipeline aborted due to error", :exception=>#<LogStash::ConfigurationError: The setting`host`in plugin`elasticsearch`is obsolete and is no longer available. Please use the 'hosts' setting instead. You can specify multiple entries separated by comma in 'host:port' format. If you have any questions about this, you are invited to visit https://discuss.elastic.co/c/logstash and ask.>, :backtrace=>["/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/config/mixin.rb:87:in`config\_init'", "org/jruby/RubyHash.java:1342:in `each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/config/mixin.rb:71:in`config\_init'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/outputs/base.rb:63:in `initialize'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/output_delegator.rb:74:in`register'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/pipeline.rb:181:in `start_workers'", "org/jruby/RubyArray.java:1613:in`each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/pipeline.rb:181:in `start_workers'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/pipeline.rb:136:in`run'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/agent.rb:465:in `start_pipeline'"], :level=>:error} {:timestamp=>"2016-05-05T08:57:18.982000+0300", :message=>"stopping pipeline", :id=>"main"} {:timestamp=>"2016-05-05T22:52:50.847000+0300", :message=>"Pipeline aborted due to error", :exception=>#<LogStash::ConfigurationError: The setting`host`in plugin`elasticsearch`is obsolete and is no longer available. Please use the 'hosts' setting instead. You can specify multiple entries separated by comma in 'host:port' format. If you have any questions about this, you are invited to visit https://discuss.elastic.co/c/logstash and ask.>, :backtrace=>["/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/config/mixin.rb:87:in`config\_init'", "org/jruby/RubyHash.java:1342:in `each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/config/mixin.rb:71:in`config\_init'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/outputs/base.rb:63:in `initialize'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/output_delegator.rb:74:in`register'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/pipeline.rb:181:in `start_workers'", "org/jruby/RubyArray.java:1613:in`each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/pipeline.rb:181:in `start_workers'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/pipeline.rb:136:in`run'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/agent.rb:465:in `start_pipeline'"], :level=>:error} {:timestamp=>"2016-05-05T22:52:53.849000+0300", :message=>"stopping pipeline", :id=>"main"} {:timestamp=>"2016-05-05T23:18:59.906000+0300", :message=>"Pipeline aborted due to error", :exception=>#<LogStash::ConfigurationError: The setting`host`in plugin`elasticsearch`is obsolete and is no longer available. Please use the 'hosts' setting instead. You can specify multiple entries separated by comma in 'host:port' format. If you have any questions about this, you are invited to visit https://discuss.elastic.co/c/logstash and ask.>, :backtrace=>["/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/config/mixin.rb:87:in`config\_init'", "org/jruby/RubyHash.java:1342:in `each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/config/mixin.rb:71:in`config\_init'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/outputs/base.rb:63:in `initialize'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/output_delegator.rb:74:in`register'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/pipeline.rb:181:in `start_workers'", "org/jruby/RubyArray.java:1613:in`each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/pipeline.rb:181:in `start_workers'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/pipeline.rb:136:in`run'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/agent.rb:465:in `start\_pipeline'"], :level=\>:error}  
{:timestamp=\>"2016-05-05T23:19:02.928000+0300", :message=\>"stopping pipeline", :id=\>"main"}  
[root@localhost bin]#

Thanks,

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 5, 2016, 10:23pm UTC](https://discuss.elastic.co/t/logstach-2-3-2-hang-while-run-with-conf-file/49348/3 "2016-05-05T22:23:15Z")

</div>

> [@dhyeem](#):
>
> Pipeline main started

That means it has started and it is waiting for data, it hasn't hung.

---

<div class="post-metadata">

**Author:** ![dhyeem](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dhyeem](https://discuss.elastic.co/u/dhyeem)\
**Post date:** [May 6, 2016, 12:23pm UTC](https://discuss.elastic.co/t/logstach-2-3-2-hang-while-run-with-conf-file/49348/4 "2016-05-06T12:23:53Z")

</div>

When i check from the command line while this is hanging , it's saying  
`[root@localhost logstash]# service logstash status`  
`logstash is not running`

when i go with the Document in Elasticsearch i see this error :

```
[root@localhost logstash]# bin/logstash -e /etc/logstash/conf.d/cucm.conf 
fetched an invalid config {:config=>"/etc/logstash/conf.d/cucm.confinput { stdin { type => stdin } }output { stdout { codec => rubydebug } }", :reason=>"Expected one of #, input, filter, output at line 1, column 1 (byte 1) after ", :level=>:error}

```

after that

```
[root@localhost logstash]# bin/logstash -f /etc/logstash/conf.d/cucm.conf -v

starting agent {:level=>:info}
starting pipeline {:id=>"main", :level=>:info}
Settings: Default pipeline workers: 2
Registering file input {:path=>["/run/media/dhyeem/Logstash/cdr/*"], :level=>:info}
No sincedb_path set, generating one based on the file path {:sincedb_path=>"/root/.sincedb_97e219595e57bde0712cef7e48bace05", :path=>["/run/media/dhyeem/Logstash/cdr/*"], :level=>:info}
Registering file input {:path=>["/run/media/dhyeem/Logstash/cmr*"], :level=>:info}
No sincedb_path set, generating one based on the file path {:sincedb_path=>"/root/.sincedb_b0d3cd091fb55e4d83add0276a0a91b4", :path=>["/run/media/dhyeem/Logstash/cmr*"], :level=>:info}
Starting pipeline {:id=>"main", :pipeline_workers=>2, :batch_size=>125, :batch_delay=>5, :max_inflight=>250, :level=>:info}
Pipeline main started

```

😓

---

<div class="post-metadata">

**Author:** ![mnhan](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@mnhan](https://discuss.elastic.co/u/mnhan)\
**Post date:** [May 6, 2016, 1:07pm UTC](https://discuss.elastic.co/t/logstach-2-3-2-hang-while-run-with-conf-file/49348/5 "2016-05-06T13:07:12Z")

</div>

check your logstash config. The pipe line keeps stopping due to config errors. use the logstash --configtest to check your configuration for logstash.

---

<div class="post-metadata">

**Author:** ![dhyeem](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dhyeem](https://discuss.elastic.co/u/dhyeem)\
**Post date:** [May 6, 2016, 1:47pm UTC](https://discuss.elastic.co/t/logstach-2-3-2-hang-while-run-with-conf-file/49348/6 "2016-05-06T13:47:26Z")

</div>

Dear Michael ,

this is the test i made :

```
[dhyeem@localhost logstash]$ bin/logstash --configtest --config /etc/logstash/conf.d/cucm.conf 

Configuration OK
```

---

<div class="post-metadata">

**Author:** ![dhyeem](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dhyeem](https://discuss.elastic.co/u/dhyeem)\
**Post date:** [May 6, 2016, 1:48pm UTC](https://discuss.elastic.co/t/logstach-2-3-2-hang-while-run-with-conf-file/49348/7 "2016-05-06T13:48:24Z")

</div>

the installation guide i take is this one :

> **[ELK Setup for CUCM CDR](https://damienetwork.wordpress.com/2015/10/09/elk-setup-for-cucm-cdr/)**
>
> This is a basic setup of ELK on Centos 7, in a following post I’ll describe an automated setup with Ansible. Install Java (you can use openjdk for testing, but if you want the best performanc…

Regards,

---

<div class="post-metadata">

**Author:** ![dhyeem](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dhyeem](https://discuss.elastic.co/u/dhyeem)\
**Post date:** [May 6, 2016, 3:20pm UTC](https://discuss.elastic.co/t/logstach-2-3-2-hang-while-run-with-conf-file/49348/8 "2016-05-06T15:20:46Z")

</div>

> [@mnhan](#):
>
> stopping

I tryied with this example and got this result :

```
[dhyeem@localhost logstash]$ bin/logstash agent -f /etc/logstash/conf.d/logstash.simple.conf 
Settings: Default pipeline workers: 2
Pipeline main started

good morning
{
       "message" => "good morning",
      "@version" => "1",
    "@timestamp" => "2016-05-06T15:18:34.592Z",
          "host" => "localhost.localdomain"
}

```

the config file contain this :

```
input { stdin { } }
output {
  elasticsearch { hosts => ["localhost:9200"] }
  stdout { codec => rubydebug }
}

```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 6, 2016, 9:31pm UTC](https://discuss.elastic.co/t/logstach-2-3-2-hang-while-run-with-conf-file/49348/9 "2016-05-06T21:31:59Z")

</div>

When you run the command manually, the service check won't apply. It's a whole different way of managing the process.

---

<div class="post-metadata">

**Author:** ![dhyeem](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dhyeem](https://discuss.elastic.co/u/dhyeem)\
**Post date:** [May 21, 2016, 11:00pm UTC](https://discuss.elastic.co/t/logstach-2-3-2-hang-while-run-with-conf-file/49348/10 "2016-05-21T23:00:54Z")

</div>

Dear , when i check with logstash if i start the service it will stay 10 second then will shut down , when i check the log i see this error :

```
{:timestamp=>"2016-05-22T01:58:16.270000+0300", :message=>"Pipeline aborted due to error", :exception=>#<LogStash::ConfigurationError: The setting `host` in plugin `elasticsearch` is obsolete and is no longer available. Please use the 'hosts' setting instead. You can specify multiple entries separated by comma in 'host:port' format. If you have any questions about this, you are invited to visit https://discuss.elastic.co/c/logstash and ask.>, :backtrace=>["/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/config/mixin.rb:87:in `config_init'", "org/jruby/RubyHash.java:1342:in `each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/config/mixin.rb:71:in `config_init'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/outputs/base.rb:63:in `initialize'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/output_delegator.rb:74:in `register'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/pipeline.rb:181:in `start_workers'", "org/jruby/RubyArray.java:1613:in `each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/pipeline.rb:181:in `start_workers'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/pipeline.rb:136:in `run'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/agent.rb:465:in `start_pipeline'"], :level=>:error}
{:timestamp=>"2016-05-22T01:58:19.275000+0300", :message=>"stopping pipeline", :id=>"main"}

```

regards

---

<div class="post-metadata">

**Author:** ![dhyeem](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dhyeem](https://discuss.elastic.co/u/dhyeem)\
**Post date:** [May 21, 2016, 11:29pm UTC](https://discuss.elastic.co/t/logstach-2-3-2-hang-while-run-with-conf-file/49348/11 "2016-05-21T23:29:23Z")

</div>

Dear , thanks for all the support , i figure it out in one of your replays 😊 , the input plugin was sayig host =\> localhost , it should be hosts =\> localhost like below :

```
output {
    elasticsearch {
        index => "%{type}-%{+dd.MM.YYYY}"

hosts => localhost 
        }    

```

thanks for all the support 😄

---

<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, 4:56am UTC](https://discuss.elastic.co/t/logstach-2-3-2-hang-while-run-with-conf-file/49348/12 "2017-07-06T04:56:47Z")

</div>


