# Syslog kills process in logstash

**URL:** https://discuss.elastic.co/t/syslog-kills-process-in-logstash/275319
**Category:** Logstash
**Created:** [June 8, 2021, 4:27pm UTC](https://discuss.elastic.co/t/syslog-kills-process-in-logstash/275319 "2021-06-08T16:27:01Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Juan\_David\_Jaramillo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juan_david_jaramillo/32/76831_2.png) [@Juan\_David\_Jaramillo](https://discuss.elastic.co/u/Juan_David_Jaramillo)
#### Post date: [June 8, 2021, 4:27pm UTC](https://discuss.elastic.co/t/syslog-kills-process-in-logstash/275319/1 "2021-06-08T16:27:01Z")

</div>

Hi Guy's!  
I need your help with this problem, please.  
Means that, syslog is killing the process in logstash, this means that it stops listening to syslog, I don't know why this is happening, the process stops working from one moment to another, it stops listening to syslog and doesn't send anything.

---

<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: [June 9, 2021, 12:30am UTC](https://discuss.elastic.co/t/syslog-kills-process-in-logstash/275319/2 "2021-06-09T00:30:25Z")

</div>

We aren't all guys 🙂

> [@Juan\_David\_Jaramillo](#):
>
> syslog is killing the process in logstash

How do you know this?  
What do your Logstash logs show?

---

<div class="post-metadata">

### Author: ![Juan\_David\_Jaramillo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juan_david_jaramillo/32/76831_2.png) [@Juan\_David\_Jaramillo](https://discuss.elastic.co/u/Juan_David_Jaramillo)
#### Post date: [June 9, 2021, 2:11pm UTC](https://discuss.elastic.co/t/syslog-kills-process-in-logstash/275319/3 "2021-06-09T14:11:21Z")

</div>

Sorry, Hi, everyone C:

my error is this:

```auto
Jun 09 09:56:10 srvefevmmar.efectivo.com.co logstash[136369]: [2021-06-09T09:56:10,686][INFO][logstash.inputs.syslog][main][4d16c94ebf27367b9421ccad9f9f60f26fb87cb2e3d64d503364cc7f1b7f61e0] Starting syslog udp listener {:address=>"0.0.0.0:514"}

Jun 09 09:56:10 srvefevmmar.efectivo.com.co logstash[136369]: [2021-06-09T09:56:10,688][WARN][logstash.inputs.syslog][main][4d16c94ebf27367b9421ccad9f9f60f26fb87cb2e3d64d503364cc7f1b7f61e0] syslog listener died {:protocol=>:udp, :address=>"0.0.0.0:514", :exception=>>#<Errno::EACCES: Permission denied - bind(2) for "0.0.0.0" port 514>, :backtrace=>["org/jruby/ext/socket/RubyUDPSocket.java:216:in `bind'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-syslog-3.5.0/lib/logstash/inputs/syslog.rb:191:in `udp_listener>/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-syslog-3.5.0/lib/logstash/inputs/syslog.rb:172:in `server'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-syslog-3.5.0/lib/logstash/inputs/syslog.rb:152:in `block in run'"]}

```

as you can see in the logstash status syslog tries to listen but then the process dies and comes back and tries to listen but then it kills the process again, I don't know if it's a bug, but when I run it without the (.conf), it works and doesn't stop the process. I don't know what it could be 😕

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [June 9, 2021, 2:20pm UTC](https://discuss.elastic.co/t/syslog-kills-process-in-logstash/275319/4 "2021-06-09T14:20:03Z")

</div>

So, your `syslog` input is not working, and not your syslog server that is killing the logstash process.

Your problem is this: `#<Errno::EACCES: Permission denied - bind(2) for "0.0.0.0" port 514>`

You are trying to bind the syslog input to the port `514`, only the `root` user can run a process that bind to low ports, below 1024, but it is not recommended to run logstash as `root`.

You need to choose a port higher than `514`, try to use `5514` for example.

If you have devices that can only send data to the port `514`, then it is recommended that you use this port in the `rsyslog` server in your machine and redirect it to the logstash listening port.

---

<div class="post-metadata">

### Author: ![Juan\_David\_Jaramillo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juan_david_jaramillo/32/76831_2.png) [@Juan\_David\_Jaramillo](https://discuss.elastic.co/u/Juan_David_Jaramillo)
#### Post date: [June 9, 2021, 2:41pm UTC](https://discuss.elastic.co/t/syslog-kills-process-in-logstash/275319/5 "2021-06-09T14:41:06Z")

</div>

ok, I understand, I will try and let you know, thank you very much.

---

<div class="post-metadata">

### Author: ![Juan\_David\_Jaramillo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juan_david_jaramillo/32/76831_2.png) [@Juan\_David\_Jaramillo](https://discuss.elastic.co/u/Juan_David_Jaramillo)
#### Post date: [June 9, 2021, 3:00pm UTC](https://discuss.elastic.co/t/syslog-kills-process-in-logstash/275319/6 "2021-06-09T15:00:19Z")

</div>

I am looking about rsyslog and I have a question, I have to install the rsyslog agent and configure it with port 514, but how do I make it redirect to logstash in the syslog file that I already have?

---

<div class="post-metadata">

### Author: ![Juan\_David\_Jaramillo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juan_david_jaramillo/32/76831_2.png) [@Juan\_David\_Jaramillo](https://discuss.elastic.co/u/Juan_David_Jaramillo)
#### Post date: [June 9, 2021, 3:38pm UTC](https://discuss.elastic.co/t/syslog-kills-process-in-logstash/275319/7 "2021-06-09T15:38:33Z")

</div>

i have the configuration in the rsyslog.conf so:

```auto
# /etc/rsyslog.conf configuration file for rsyslog
#
# For more information install rsyslog-doc and see
# /usr/share/doc/rsyslog-doc/html/configuration/index.html
#
# Default logging rules can be found in /etc/rsyslog.d/50-default.conf

#################
#### MODULES ####
#################

module(load="imuxsock") # provides support for local system logging
#module(load="immark") # provides --MARK-- message capability

# provides UDP syslog reception
module(load="imudp")
input(type="imudp" port="514")

# provides TCP syslog reception
module(load="imtcp")
input(type="imtcp" port="514")

# provides kernel logging support and enable non-kernel klog messages
module(load="imklog" permitnonkernelfacility="on")

```

---

<div class="post-metadata">

### Author: ![Juan\_David\_Jaramillo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juan_david_jaramillo/32/76831_2.png) [@Juan\_David\_Jaramillo](https://discuss.elastic.co/u/Juan_David_Jaramillo)
#### Post date: [June 9, 2021, 3:40pm UTC](https://discuss.elastic.co/t/syslog-kills-process-in-logstash/275319/8 "2021-06-09T15:40:33Z")

</div>

I have the tcp and udp modules active on port 514, but how do I redirect to logstash in my syslog file?

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [June 9, 2021, 3:50pm UTC](https://discuss.elastic.co/t/syslog-kills-process-in-logstash/275319/9 "2021-06-09T15:50:58Z")

</div>

First you need to check if you really need to use rsyslog, maybe you do not even need it.

What is going to send logs to this syslog input in logstash? Network devices? Servers?

Check if you can configure the port to where the logs would be shipped, if it is possible, just use the port you set in your logstash input.

You would only need to use rsyslog listening in `514` if you have some old device where the syslog port is hardcoded to `514`, if this is the case then you need it and you can redirect the logs to logstash.

This rsyslog question is out of the scope of this forum, I recommend that you read the [rsyslog documentation](https://www.rsyslog.com/sending-messages-to-a-remote-syslog-server/) that explains how to redirect to remote, which in your case would just be the same IP with a different port.

There are plenty of resources about rsyslog in the internet, the documentation is a pretty good start.

---

<div class="post-metadata">

### Author: ![Juan\_David\_Jaramillo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juan_david_jaramillo/32/76831_2.png) [@Juan\_David\_Jaramillo](https://discuss.elastic.co/u/Juan_David_Jaramillo)
#### Post date: [June 9, 2021, 3:58pm UTC](https://discuss.elastic.co/t/syslog-kills-process-in-logstash/275319/10 "2021-06-09T15:58:33Z")

</div>

yes, I am monitoring network devices (SWITCHES), and they go only on port 514 so I need this resource, and send emergency or device error messages.

---

<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 7, 2021, 3:59pm UTC](https://discuss.elastic.co/t/syslog-kills-process-in-logstash/275319/11 "2021-07-07T15:59:01Z")

</div>

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