# Logstash service not working?

**URL:** https://discuss.elastic.co/t/logstash-service-not-working/73900
**Category:** Logstash
**Created:** [February 3, 2017, 6:41pm UTC](https://discuss.elastic.co/t/logstash-service-not-working/73900 "2017-02-03T18:41:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![capsno1](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@capsno1](https://discuss.elastic.co/u/capsno1)
#### Post date: [February 3, 2017, 6:41pm UTC](https://discuss.elastic.co/t/logstash-service-not-working/73900/1 "2017-02-03T18:41:42Z")

</div>

Can anyone help me with this error? my logstash service is not opening the requested pots in the config files such as port 514. I don't know if that is related.

root@fgprd-oncommand-elasticlog-app001:/var/log/logstash# cat logstash.log  
{:timestamp=\>"2017-02-03T12:58:35.212000-0500", :message=\>"An unexpected error occurred!", :error=\>#\<Errno::EACCES: Permission denied - bind(2)\>, :class=\>"Errno::EACCES", :backtrace=\>["org/jruby/ext/socket/RubyTCPServer.java:124:in `initialize'", "org/jruby/RubyIO.java:853:in`new'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-tcp-3.0.4/lib/logstash/inputs/tcp.rb:244:in `new_server_socket'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-tcp-3.0.4/lib/logstash/inputs/tcp.rb:79:in`register'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.4-java/lib/logstash/pipeline.rb:322:in `start_inputs'", "org/jruby/RubyArray.java:1613:in`each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.4-java/lib/logstash/pipeline.rb:321:in `start_inputs'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.4-java/lib/logstash/pipeline.rb:172:in`start\_workers'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.4-java/lib/logstash/pipeline.rb:126:in `run'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.4-java/lib/logstash/agent.rb:210:in`execute'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.4-java/lib/logstash/runner.rb:90:in `run'", "org/jruby/RubyProc.java:281:in`call'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.4-java/lib/logstash/runner.rb:95:in `run'", "org/jruby/RubyProc.java:281:in`call'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/task.rb:24:in `initialize'"], :level=\>:warn}

---

<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: [February 5, 2017, 9:24am UTC](https://discuss.elastic.co/t/logstash-service-not-working/73900/2 "2017-02-05T09:24:02Z")

</div>

What version, what does your config look like?

> [@capsno1](#):
>
> Errno::EACCE

Would suggest that it cannot access the port.

---

<div class="post-metadata">

### Author: ![capsno1](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@capsno1](https://discuss.elastic.co/u/capsno1)
#### Post date: [February 6, 2017, 9:13pm UTC](https://discuss.elastic.co/t/logstash-service-not-working/73900/3 "2017-02-06T21:13:13Z")

</div>

I'm not sure if this is a fix or a workaround but I had to set the net\_bind\_service capabilities to the java binary.

setcap cap\_net\_bind\_service=+epi /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

This fixed my issue and logstash is running fine and the ports I named in the config file are now listening.

---

<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: [March 6, 2017, 9:13pm UTC](https://discuss.elastic.co/t/logstash-service-not-working/73900/4 "2017-03-06T21:13:47Z")

</div>

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