TRANS_TCP: Error create socket

somesh
Posts: 36
Joined: Tue Jun 25, 2019 6:44 am
Location: Pune
Contact:

TRANS_TCP: Error create socket

Postby somesh » 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.
Thanks,
Somesh Burkule

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: TRANS_TCP: Error create socket

Postby Ritesh » 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.
Regards,
Ritesh Prajapati

somesh
Posts: 36
Joined: Tue Jun 25, 2019 6:44 am
Location: Pune
Contact:

Re: TRANS_TCP: Error create socket

Postby somesh » 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?
Thanks,
Somesh Burkule

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: TRANS_TCP: Error create socket

Postby Ritesh » 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
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.
Regards,
Ritesh Prajapati

somesh
Posts: 36
Joined: Tue Jun 25, 2019 6:44 am
Location: Pune
Contact:

Re: TRANS_TCP: Error create socket

Postby somesh » Mon Jul 15, 2019 10:37 am

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.
Thanks,
Somesh Burkule

Who is online

Users browsing this forum: djixon and 126 guests