1

I am using curl to send a HTTP request but curl app is not receiving response. I tried to debug it using tcpdump and found that remote server is responding with data (HTTP 302 Found) but my curl application is not getting that data from the linux tcp stack.

My curl request is: curl -v --max-redirs 10 http://8.8.8.8:85 -L

About to connect() to 8.8.8.8 port 85 (#0)
 Trying 8.8.8.8... connected
 Connected to 8.8.8.8 (8.8.8.8) port 85 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 8.8.8.8:85
> Accept: */*
>

It hangs here, awaiting data from server

I have copied the trace file at PCAP File

Please let me know if something is wrong in the data packet or a way to debug TCP stack to know why its dropping the data, although it looks good in wireshark w.r.t checksum and other parameters.

  • 1
    Does this happen with every site, or just with the google dns server? – Mark Plotnick Nov 21 '16 at 18:55
  • It happens randomly with all irrespective of destination IP. Please find the link for one working trace dropbox.com/s/bra9uia2bdo2leu/check1.pcap?dl=0 I tried to compare both working and non-working tcpdump trace and found nothing wrong in the trace where tcp stack is dropping the packets and not sharing with application. – Ravi Nov 21 '16 at 19:40
2

Found the issue by comparing the traces closely. There was a faulty proxy server sitting in between, which was not matching the data length and ack number properly.

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.