# Remove header information added by logstash

**URL:** <https://discuss.elastic.co/t/remove-header-information-added-by-logstash/108892>\
**Category:** Logstash\
**Created:** [November 23, 2017, 1:13pm UTC](https://discuss.elastic.co/t/remove-header-information-added-by-logstash/108892 "2017-11-23T13:13:01Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)\
**Post date:** [November 24, 2017, 12:08pm UTC](https://discuss.elastic.co/t/remove-header-information-added-by-logstash/108892/5 "2017-11-24T12:08:26Z")

</div>

Here is the ruby code that that **warning** log message is coming from:

```ruby
        begin
          client_socket = connect unless client_socket
          r,w,e = IO.select([client_socket], [client_socket], [client_socket], nil)
          # don't expect any reads, but a readable socket might
          # mean the remote end closed, so read it and throw it away.
          # we'll get an EOFError if it happens.
          client_socket.sysread(16384) if r.any?

          # Now send the payload
          client_socket.syswrite(payload) if w.any?
        rescue => e
          @logger.warn("tcp output exception", :host => @host, :port => @port,
                       :exception => e, :backtrace => e.backtrace)
          client_socket.close rescue nil
          client_socket = nil
          sleep @reconnect_interval
          retry
        end

```

This seems to mean that the remote end closed early and we sleep and retry at the default `reconnect_interval` of 10 seconds.  
I suggest that you investigate the network activity, correct the problem and reduce the `reconnect_interval` to 1 second.

---

_[View the full topic](https://discuss.elastic.co/t/remove-header-information-added-by-logstash/108892)._
