Page 1 of 1

TRANS_TCP: Error create socket

Posted: Thu Jul 11, 2019 7:03 am
by somesh
Hello everyone,

I am using esp-idf v3.2. I am using esp_http_client librairy in my code. I am using this librairy to post multiple http requests simultaneously. but some times it gives me an error (TRANS_TCP: Error create socket) and the device cannot recovers until we give it power cycle. how to recover device from this error.

I am using following API's to close connection for each request.
esp_http_client_close(client);
esp_http_client_cleanup(client);

Please help me to solve this issue.

Re: TRANS_TCP: Error create socket

Posted: Sun Jul 14, 2019 4:38 am
by Ritesh
somesh wrote:
Thu Jul 11, 2019 7:03 am
Hello everyone,

I am using esp-idf v3.2. I am using esp_http_client librairy in my code. I am using this librairy to post multiple http requests simultaneously. but some times it gives me an error (TRANS_TCP: Error create socket) and the device cannot recovers until we give it power cycle. how to recover device from this error.

I am using following API's to close connection for each request.
esp_http_client_close(client);
esp_http_client_cleanup(client);

Please help me to solve this issue.
Hello,

Would you please check same issue with Master branch as well?

Also I would like to check socket ID as well in parallel for each connections. It will be good if you can share your example with details output which will be useful to address out issue quickly.

Re: TRANS_TCP: Error create socket

Posted: Mon Jul 15, 2019 7:13 am
by somesh
Ritesh wrote:
Sun Jul 14, 2019 4:38 am
somesh wrote:
Thu Jul 11, 2019 7:03 am
Hello everyone,

I am using esp-idf v3.2. I am using esp_http_client librairy in my code. I am using this librairy to post multiple http requests simultaneously. but some times it gives me an error (TRANS_TCP: Error create socket) and the device cannot recovers until we give it power cycle. how to recover device from this error.

I am using following API's to close connection for each request.
esp_http_client_close(client);
esp_http_client_cleanup(client);

Please help me to solve this issue.
Hello,

Would you please check same issue with Master branch as well?

Also I would like to check socket ID as well in parallel for each connections. It will be good if you can share your example with details output which will be useful to address out issue quickly.
Hi,
Issue resolved. my mistake. I have not used esp_http_client_cleanup() at one point. thank you for your response.
I want to ask one question, is esp softreset( esp_restart() ) clear's all connections and start's with new connections?

Re: TRANS_TCP: Error create socket

Posted: Mon Jul 15, 2019 8:25 am
by Ritesh
somesh wrote:
Mon Jul 15, 2019 7:13 am
Ritesh wrote:
Sun Jul 14, 2019 4:38 am
somesh wrote:
Thu Jul 11, 2019 7:03 am
Hello everyone,

I am using esp-idf v3.2. I am using esp_http_client librairy in my code. I am using this librairy to post multiple http requests simultaneously. but some times it gives me an error (TRANS_TCP: Error create socket) and the device cannot recovers until we give it power cycle. how to recover device from this error.

I am using following API's to close connection for each request.
esp_http_client_close(client);
esp_http_client_cleanup(client);

Please help me to solve this issue.
Hello,

Would you please check same issue with Master branch as well?

Also I would like to check socket ID as well in parallel for each connections. It will be good if you can share your example with details output which will be useful to address out issue quickly.
Hi,
Issue resolved. my mistake. I have not used esp_http_client_cleanup() at one point. thank you for your response.
I want to ask one question, is esp softreset( esp_restart() ) clear's all connections and start's with new connections?
Hello,

Yes. It will clear all connections but better to clear connections from our side before restarting ESP32 using esp_restart for safe side.

Re: TRANS_TCP: Error create socket

Posted: Mon Jul 15, 2019 10:37 am
by somesh
Ritesh wrote:
Mon Jul 15, 2019 8:25 am
somesh wrote:
Mon Jul 15, 2019 7:13 am
Ritesh wrote:
Sun Jul 14, 2019 4:38 am


Hello,

Would you please check same issue with Master branch as well?

Also I would like to check socket ID as well in parallel for each connections. It will be good if you can share your example with details output which will be useful to address out issue quickly.
Hi,
Issue resolved. my mistake. I have not used esp_http_client_cleanup() at one point. thank you for your response.
I want to ask one question, is esp softreset( esp_restart() ) clear's all connections and start's with new connections?
Hello,

Yes. It will clear all connections but better to clear connections from our side before restarting ESP32 using esp_restart for safe side.
Ok. Thanks.