Score:0

How to fix cURL error 35 when consulting endpoints in production server?

kg flag

I have a Laravel project consulting various endpoints via get method, and sometimes in random moment return this error:

production.ERROR: GuzzleHttp\Exception\ConnectException: cURL error 35: OpenSSL SSL_connect: Connection reset by peer in connection to "{service name}"

This only occur in production, in dev server and locally is not doing that. The specificactions of productions server are:

MariaDB 10.5.15 Ubuntu 21.10 Laravel version 8.54 Library Guzzle 7.0.1 Nginx 1.18.0 The consult look like this: $response = Http::withHeaders($this->headers)->get($query); $response->throw();

I think maybe an Nginx config or SSL certificate problem on the server, I tried to update the guzzle library and it keeps giving the same error, I also tested on the development server and no error occurred.

Also doing nginx -t result this:

nginx: [warn] "ssl_stapling" ignored, issuer certificate not found for certificate "/etc/ssl/certs/ssl-cert-snakeoil.pem" nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful

I think that SSL certificate is a self-signed, but locally is also a self-signed certificate.

Thanks!

djdomi avatar
za flag
Questions seeking installation, configuration or diagnostic help must include the desired end state, the specific problem or error, sufficient information about the configuration and environment to reproduce it, and attempted solutions. Questions without a clear problem statement are not useful to other readers and are unlikely to get good answers. See [ask]
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.