title: Listening on multiple UDP ports on logstash
body: <p>I have a simple ELK setup to run on a single machine, to read custom-formatted log messages using Logstash and to analyse the data using Elasticsearch/Kibana.</p>
  
  <p>Based off of the config files in one of the replies to <a href="https://stackoverflow.com/questions/20130864/can-logstash-process-multiple-output-simultaneously">this</a> stackoverflow post, I added multiple udp input entries in my conf file, part of which is shown here:</p>
  
  <pre><code>input {
    udp {
      type =&gt; "log_type_1"
      port =&gt; 9999
    }
    udp {
      type =&gt; "log_type_2"
      port =&gt; 9998
    }
    udp {
      type =&gt; "log_type_3"
      port =&gt; 9997
    }
  }
  </code></pre>
  
  <p>When I re-start the logstash service and check the logs under <code>/var/log/logstash/logstash</code>, I see error messages with the message:</p>
  
  <pre><code>{:timestamp=&gt;"2015-02-17T18:15:56.032000-0800", :message=&gt;"UDP listener died", :exception=&gt;#&lt;SocketError: bind: name or service not known&gt;, :backtrace=&gt;["org/jruby/ext/socket/RubyUDPSocket.java:160:in `bind'", "/opt/logstash/lib/logstash/inputs/udp.rb:69:in `udp_listener'", "/opt/logstash/lib/logstash/inputs/udp.rb:50:in `run'", "/opt/logstash/lib/logstash/pipeline.rb:163:in `inputworker'", "/opt/logstash/lib/logstash/pipeline.rb:157:in `start_input'"], :level=&gt;:warn}
  </code></pre>
  
  <p>Any ideas as to what I'm doing wrong over here? I tried running logstash using the <code>--configtest</code> flag and I don't see any problems with my configuration. I'm guessing it checks only for syntax correctness.</p>
  
  <p>Thanks!</p>