Hi,
Thanks for this issue report, i'm also using heartbeat for HTTPS healthcheck and getting this same error.
I also found articles about this kind of issue in Consul, seems Go is trying to reuse the same socket referring to https://github.com/hashicorp/consul/issues/1287.
So i also tried to adding a check.request.headers: {'Connection':'close'} to prevent keep-alive connection, but didn't work.
and now i have to use, "logstash->filter->ruby->shell->curl->event.set" to get the result, something like this.
filter {
ruby { code => "
ENV['url'] = event.get('[http][url]')
maintenance_result = curl -b -j -s -I -H 'User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36' --no-keepalive -k --connect-timeout 5 --max-time 5 --no-sessionid $url | grep maintenance;echo $?
event.set('[check][maintenance]', maintenance_result)
"}
}
Hope to see the fix in future versions, and also if there's a statement in check.response.body for adding different fields on the result then it can be great.