HEAD no longer works in 5.4.1

Hi all,

Not sure if this is intended behavior, but I've noticed HEAD no longer works since upgrading to 5.4.1. For example, on my 5.3.2 instance, this works:

curl -XHEAD -s -o /dev/null -w %{http_code} localhost:9200/.kibana

On 5.4.1 this just hangs. There's no security on the 5.4.1 instance.

I did a test from an external server so I could grab a tcpdump just in case it helps:

This hangs:

08:49:48.392897 IP source_server.42320 > ES-5.4.1.wap-wsp: Flags [S], seq 4061483896, win 29200, options [mss 1379,sackOK,TS val 1854819303 ecr 0,nop,wscale 7], length 0
08:49:48.392938 IP ES-5.4.1.wap-wsp > source_server.42320: Flags [S.], seq 1670349589, ack 4061483897, win 26847, options [mss 8961,sackOK,TS val 1921447501 ecr 1854819303,nop,wscale 7], length 0
08:49:48.417434 IP source_server.42320 > ES-5.4.1.wap-wsp: Flags [.], ack 1, win 229, options [nop,nop,TS val 1854819327 ecr 1921447501], length 0
08:49:48.417551 IP source_server.42320 > ES-5.4.1.wap-wsp: Flags [P.], seq 1:95, ack 1, win 229, options [nop,nop,TS val 1854819327 ecr 1921447501], length 94
08:49:48.417570 IP ES-5.4.1.wap-wsp > source_server.42320: Flags [.], ack 95, win 210, options [nop,nop,TS val 1921447526 ecr 1854819327], length 0
08:49:48.418932 IP ES-5.4.1.wap-wsp > source_server.42320: Flags [P.], seq 1:89, ack 95, win 210, options [nop,nop,TS val 1921447527 ecr 1854819327], length 88
08:49:48.445049 IP source_server.42320 > ES-5.4.1.wap-wsp: Flags [.], ack 89, win 229, options [nop,nop,TS val 1854819354 ecr 1921447527], length 0

This works:

08:45:24.203015 IP source_server.41862 > ES-5.3.2.wap-wsp: Flags [S], seq 3887748958, win 29200, options [mss 1379,sackOK,TS val 1854390542 ecr 0,nop,wscale 7], length 0
08:45:24.203087 IP ES-5.3.2.wap-wsp > source_server.41862: Flags [S.], seq 41657394, ack 3887748959, win 26847, options [mss 8961,sackOK,TS val 3541047347 ecr 1854390542,nop,wscale 7], length 0
08:45:24.265286 IP source_server.41862 > ES-5.3.2.wap-wsp: Flags [.], ack 1, win 229, options [nop,nop,TS val 1854390604 ecr 3541047347], length 0
08:45:24.265333 IP source_server.41862 > ES-5.3.2.wap-wsp: Flags [P.], seq 1:95, ack 1, win 229, options [nop,nop,TS val 1854390604 ecr 3541047347], length 94
08:45:24.265347 IP ES-5.3.2.wap-wsp > source_server.41862: Flags [.], ack 95, win 210, options [nop,nop,TS val 3541047409 ecr 1854390604], length 0
08:45:24.267156 IP ES-5.3.2.wap-wsp > source_server.41862: Flags [P.], seq 1:80, ack 95, win 210, options [nop,nop,TS val 3541047411 ecr 1854390604], length 79
08:45:24.307676 IP source_server.41862 > ES-5.3.2.wap-wsp: Flags [.], ack 80, win 229, options [nop,nop,TS val 1854390647 ecr 3541047411], length 0
08:45:24.307786 IP source_server.41862 > ES-5.3.2.wap-wsp: Flags [F.], seq 95, ack 80, win 229, options [nop,nop,TS val 1854390647 ecr 3541047411], length 0
08:45:24.307864 IP ES-5.3.2.wap-wsp > source_server.41862: Flags [F.], seq 80, ack 96, win 210, options [nop,nop,TS val 3541047452 ecr 1854390647], length 0
08:45:24.364514 IP source_server.41862 > ES-5.3.2.wap-wsp: Flags [.], ack 81, win 229, options [nop,nop,TS val 1854390703 ecr 3541047452], length 0

Hey,

I remember issues with curl and -X HEAD and connection keep alive when I played with it.. can you try --head instead?

Can you also explain what you mean with "this works" - where is the difference between those two requests when you issued them?

Thanks!

--Alex

Aha! That works! Thank you.

By works, I mean that it returns 200 whereas before it would just hang and return nothing. The first block was to a 5.4.1 instance, the second to 5.3.2. I'll update my scripts to use curl --head

Edit: looking back at the release notes, it seems there were changes to the way HEAD requests are handled which may explain the difference from 5.3.2 > 5.4.1

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