I'm using TCPSampler in Jmeter to do the performance test on fluentd's TCP input plugin.
But it always runs into 500 error:
Thread Name:Thread Group 1-1
Sample Start:2020-06-23 18:21:08 CST
Load time:2372
Connect Time:360
Latency:0
Size in bytes:0
Sent bytes:0
Headers size in bytes:0
Body size in bytes:0
Sample Count:1
Error Count:1
Data type ("text"|"bin"|""):text
Response code:500
Response message:org.apache.jmeter.protocol.tcp.sampler.ReadException: Error reading from server, bytes read: 0
SampleResult fields:
ContentType:
DataEncoding: UTF-8
My setting to TCP Sampler is simple:
Because fluentd returns nothing(0-length response) and there is no EOL can be set. Jmeter will hang up until timeout, then reports 500(verified with another simple TCP server with non-0 response).
How should I handle the 0-length response from the TCP server? Appreciate!
========
Seen from the pcap of tcpdump on fluentd side, the package from jmeter has been 'ACK'-ed immediately.
# tcpdump -i ens160 -n tcp port 20001
reading from file from-jmeter.pcap, link-type EN10MB (Ethernet)
06:12:23.716615 IP BEI-L-00040107.olympus.****.com.50411 > telemetry-analytics.pdsea.****.com.microsan: Flags [S], seq 3419810629, win 65535, options [mss 1304,nop,wscale 6,nop,nop,TS val 1134449538 ecr 0,sackOK,eol], length 0
06:12:23.716709 IP telemetry-analytics.pdsea.****.com.microsan > BEI-L-00040107.olympus.****.com.50411: Flags [S.], seq 1061319631, ack 3419810630, win 28960, options [mss 1460,sackOK,TS val 1980947477 ecr 1134449538,nop,wscale 7], length 0
06:12:23.919891 IP BEI-L-00040107.olympus.****.com.50411 > telemetry-analytics.pdsea.****.com.microsan: Flags [.], ack 1, win 2059, options [nop,nop,TS val 1134449760 ecr 1980947477], length 0
06:12:23.920121 IP BEI-L-00040107.olympus.****.com.50411 > telemetry-analytics.pdsea.****.com.microsan: Flags [P.], seq 1:4, ack 1, win 2059, options [nop,nop,TS val 1134449761 ecr 1980947477], length 3
06:12:23.920147 IP telemetry-analytics.pdsea.****.com.microsan > BEI-L-00040107.olympus.****.com.50411: Flags [.], ack 4, win 227, options [nop,nop,TS val 1980947681 ecr 1134449761], length 0
06:12:25.994011 IP BEI-L-00040107.olympus.****.com.50411 > telemetry-analytics.pdsea.****.com.microsan: Flags [F.], seq 4, ack 1, win 2059, options [nop,nop,TS val 1134451735 ecr 1980947681], length 0
06:12:25.994402 IP telemetry-analytics.pdsea.****.com.microsan > BEI-L-00040107.olympus.****.com.50411: Flags [F.], seq 1, ack 5, win 227, options [nop,nop,TS val 1980949755 ecr 1134451735], length 0
06:12:26.220944 IP BEI-L-00040107.olympus.****.com.50411 > telemetry-analytics.pdsea.****.com.microsan: Flags [.], ack 2, win 2059, options [nop,nop,TS val 1134452013 ecr 1980949755], length 0