Uploaded image for project: 'logstash'
  1. LOGSTASH-1335

DNS lookup error when using elasticsearch_http

    Details

      Description

      We use the elasticsearch_http output to send logs to ElasticSearch. Since we upgraded to v1.2.1, we very often see this in Logstash logs :

      {:timestamp=>"2013-09-12T11:23:32.233000+0200", :message=>"Failed 
      to flush outgoing items", :outgoing_count=>10, :exception=>#<SocketError: gethostbyname: name or service not known>, :backtrace=>["org/jruby/ext/socket/RubySocket.java:281:in `gethostbyname'", "jar:file:/opt/logstash/logstash.jar!/ftw/dns/dns.rb:13:in `resolve'", "jar:file:/opt/logstash/logstash.jar!/ftw/dns.rb:38:in `resolve'", "org/jruby/RubyArray.java:1617:in `each'", "org/jruby/RubyEnumerable.java:815:in `inject'", "jar:file:/opt/logstash/logstash.jar!/ftw/dns.rb:37:in `resolve'", "jar:file:/opt/logstash/logstash.jar!/ftw/connection.rb:132:in `connect'", "file:/opt/logstash/logstash.jar!/ftw/agent.rb:394:in `connect'", "org/jruby/RubyProc.java:255:in `call'", "jar:file:/opt/logstash/logstash.jar!/ftw/pool.rb:48:in `fetch'", "file:/opt/logstash/logstash.jar!/ftw/agent.rb:391:in `connect'", "file:/opt/logstash/logstash.jar!/ftw/agent.rb:307:in `execute'", "file:/opt/logstash/logstash.jar!/ftw/agent.rb:205:in `post!'", "file:/opt/logstash/logstash.jar!/logstash/outputs/elasticsearch_http.rb:82:in `post'", "file:/opt/logstash/logstash.jar!/logstash/outputs/elasticsearch_http.rb:77:in `flush'", "file:/opt/logstash/logstash.jar!/stud/buffer.rb:219:in `buffer_flush'", "org/jruby/RubyHash.java:1332:in `each'", "file:/opt/logstash/logstash.jar!/stud/buffer.rb:216:in `buffer_flush'", "file:/opt/logstash/logstash.jar!/stud/buffer.rb:193:in `buffer_flush'", "file:/opt/logstash/logstash.jar!/stud/buffer.rb:159:in `buffer_receive'", "file:/opt/logstash/logstash.jar!/logstash/outputs/elasticsearch_http.rb:59:in `receive'", "(eval):536:in `initialize'", "org/jruby/RubyProc.java:255:in `call'", "file:/opt/logstash/logstash.jar!/logstash/pipeline.rb:247:in `output'", "file:/opt/logstash/logstash.jar!/logstash/pipeline.rb:212:in `outputworker'", "file:/opt/logstash/logstash.jar!/logstash/pipeline.rb:140:in `start_outputs'"], :level=>:warn}
      

      The host is an FQDN in the elasticsearch_http output. Yet, the DNS lookup s seem to work flawlessly on the machine when the issue happens. dnsmasq is used as a local DNS client cache. Logstash didn't throw this error in v1.1.x.
      When using an IP address instead of an FQDN, it seems to work.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                logstash-dev Logstash Developers (Inactive)
                Reporter:
                dav3860 David G
              • Votes:
                2 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: