How do I debug HTTPS connection to Elasticsearch with cpprestsdk error 12029?

34 Views Asked by At

I am trying to connect to an Elasticsearch server using HTTPS and the cpprestsdk. I have a program that works in making connections on one thread and on two threads, but when I have it connect on ten threads, some connections fail with the error code 12029.

I have tried using a packet sniffer (Wireshark) to look for the error, but I can't figure out which TCP port is being used that has the error (because some ports succeed while others fail, and because each connection is on a different unpredictable client port but the same server port, 9200).

So my questions are,

  1. Is there a way to get a more specific error than code 12029? Like say a certificate was invalid? server is overloaded? server requested something unexpected in the TLS handshake that client does not support?

  2. Is there a way for cpprestsdk or WinHttp to return the client's TCP port number so that it can be correlated to the packet sniffer output?

  3. Does Elasticsearch server keep track of the requests that it has returned a failure on, and the reasons for the failure?

Thank you.

0

There are 0 best solutions below