Can't install apps, cURL error 28: SSL connection timeout | SOLVED

Hello everyone,

I have recently installed Nextcloud 25.0.1 manually. At first I got some errors but I managed to solve them with the help of different tutorials.

I have it all with http, since when using it through a VPN, there is no need to use https. I say this in case it has something to do with the problem that I am going to explain below.

With Nextcloud already installed, running, the cron running fine and everything ok, I had almost claimed victory, until I tried to install an app and saw that there is no way to do it. Every time I try to install (whatever the app is), I get the following error message.

GuzzleHttp\Exception\ConnectException: cURL error 28: SSL connection timeout (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://objects.githubusercontent.com/github-production-release-asset-2e65be/377456681/3ab88a35-ed32-4d92-92d6-97767ee756d7?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20221115%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221115T080857Z&X-Amz-Expires=300&X-Amz-Signature=eae3298e672440c82b49021696dbba5c02559bb4a2fb0b99b771acf648deb137&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=377456681&response-content-disposition=attachment%3B%20filename%3Dcalendar-v4.1.0.tar.gz&response-content-type=application%2Foctet-stream

I have searched many internet sites and have not found any answers that help me.

Any ideas?

Thank you very much.

I have been able to install a couple of applications, but some such as talk or calendar still do not allow me.

I also leave here my config.php file in case you see something wrong.

<?php
$CONFIG = array (
  'instanceid' => 'XXXXXXXXXX',
  'passwordsalt' => 'XXXXXXXXXXXXXXXXXXXX',
  'secret' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
  'trusted_domains' =>
  array (
    0 => '10.X.X.XX',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '25.0.1.1',
  'overwrite.cli.url' => 'http://10.X.X.XX/nextcloud',
  'dbname' => 'XXXXXXXX',
  'dbhost' => 'X',XXXXXXXX
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'XXXXXXXXX',
  'dbpassword' => 'XXXXXXXXXXXX.',
  'installed' => true,
  'default_phone_region' => 'ES',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'XXXXXXXXXX',
  'mail_domain' => 'XXXXX.com',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.XXXXXXX.com',
  'mail_smtpport' => 'XXX',
  'mail_smtpname' => 'XXXXXXXXX@XXXXXXXXX.com',
  'mail_smtppassword' => 'XXXXXXXXXXX',
  'maintenance' => false,
  'updater.release.channel' => 'stable',
);

Hi there, you can try this workaround

edit

sudo -u www-data nano /var/www/nextcloud/lib/private/Http/Client/Client.php

and look for a line like this

RequestOptions::TIMEOUT => 30,

change it to a higher value like

RequestOptions::TIMEOUT => 600,

Look at this page for further information:

Hi, thanks for your response.

Change done, but still giving curl error

Any other ideas?

Thank you

another hint maybe this one (older but …)

they changed the timeout value in /lib/private/Installer.php

I’ve already made this change before :smiling_face_with_tear:

Hmmmh

is it the same, when you try to install the app via command line (OCC Tool)?

e.g. (ubuntu)

sudo -u www-data php /var/www/nextcloud/occ app:install NAME-OF-THE-APP

Same error :frowning_face:

Is it possible that the problem is because I installed the minimum version of Ubuntu Server? I have another Nextcloud working, but with docker, so I rule out the router’s firewall and I don’t know what other configuration files to edit anymore

With the given info it seems to be a networking problem … Docker, Router, … but i am not able to fix this.

Something seems to slow down or block your traffic to outside websites like the nextcloud app store … and maybe more websites.

The both config hints i mentioned above are in many cases the fix for a curl 28 error…

Sorry, i think one of those with higher nexctloud skills should have a look at your prob.
:thinking:

1 Like

It finally turned out to be an incompatibility with the network adapter of the proxmox virtual machine. I switched from virtIO to Intel and now it works perfectly.

Thank you very much @chrissi55 for your interest.

Hi, I’m experiencing the same error. I’ve Nextcloud working on a docker container (linuxserver one), how could I fix this?

❯ sudo docker exec -it nextcloud occ app:install notes
Error: cURL error 28: SSL connection timeout (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://objects.githubusercontent.com/github-production-release-asset-2e65be/71392749/29c232a8-7e5c-4034-b451-8e16e60e1304?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230218%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230218T212236Z&X-Amz-Expires=300&X-Amz-Signature=de2c6d46b9a8c00c3301982683550acd2bb9c4a58640c23af4db0c280bb11bb9&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=71392749&response-content-disposition=attachment%3B%20filename%3Dnotes.tar.gz&response-content-type=application%2Foctet-stream

Thanks!
Marco

I have encountered the error with certain apps with large download on installation, like Recognize.
In the logs, I could see that the timeout happened always after exactly 120 seconds, which helped to find the culprit:

$timeout = $this->isCLI ? 0 : 120; 

in _data/www/nextcloud/lib/private/Installer.php.

Since I could see in the logs what fraction of the download completed before the timeout, I found that I needed to increase the timeout to ca. 600 s. After this, I could install the app without problems.

For anyone looking at the same, ssl - curl hangs after client hello - Unix & Linux Stack Exchange seems also plausible, and setting correct MTU worked for me (running on docker, via wireguard interface)