Could not connect to appstore: Curl error 28

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 18.0.2): 19
Operating system and version (eg, Ubuntu 20.04): CentOS 7
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.17.10
PHP version (eg, 7.1): 7.4.7

The issue you are facing: Could not connect to appstore. Curl error 28. Out of -1 bytes received.
How’s -1 possible?

Is this the first time you’ve seen this error? (Y/N): N It’s been in the log many times.

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

{"reqId":"pTdj88VgvAtT1H8","level":2,"time":"2020-07-02T23:05:18+00:00","remoteAddr":"9.8.7.6","user":"admin","app":"appstoreFetcher","method":"GET","url":"/settings/apps","message":"Could not connect to appstore: cURL error 28: Operation timed out after 10000 milliseconds with 1384458 out of -1 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)","userAgent":"Mozilla/5.0 (Linux; Android 10; SM-G975F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Mobile Safari/537.36","version":"19.0.0.12"}
{"reqId":"zOSFF1zcp1zGBlA","level":2,"time":"2020-07-03T13:00:15+00:00","remoteAddr":"","user":"--","app":"appstoreFetcher","method":"","url":"--","message":"Could not connect to appstore: cURL error 28: Connection timed out after 10001 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)","userAgent":"--","version":"19.0.0.12"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'oc17.........hj',
  'passwordsalt' => '...............',
  'secret' =>'........ ',
  'trusted_domains' => 
  array (
    0 => 'mydomain.com',
  ),
  'datadirectory' => '/home/nginx/nextcloud/data',
  'log_rotate_size' => 2097152,
  'dbtype' => 'mysql',
  'version' => '19.0.0.12',
  'overwrite.cli.url' => 'https://mydomain.com',
  'enable_previews' => true,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\Movie',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\MP3',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
  ),
  'preview_max_x' => 1024,
  'preview_max_y' => 1024,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'overwriteprotocol' => 'https',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'dbname' => 'dbdata',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'abcqwer',
  'installed' => true,
  'mail_from_address' => 'nimda',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'mydomain.com',
  'maintenance' => false,
  'updater.release.channel' => 'beta',
  'theme' => '',
  'loglevel' => 2,
);

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

I can connect with curl.

 curl -Iv https://apps.nextcloud.com            * About to connect() to apps.nextcloud.com port 443 (#0)                        *   Trying 88.198.160.138...
* Connected to apps.nextcloud.com (88.198.160.138) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate:
* subject: CN=apps.nextcloud.com
* start date: May 19 01:02:18 2020 GMT
* expire date: Aug 17 01:02:18 2020 GMT
* common name: apps.nextcloud.com
* issuer: CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US
> HEAD / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: apps.nextcloud.com
> Accept: */*
> 
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Date: Fri, 03 Jul 2020 15:57:42 GMT
Date: Fri, 03 Jul 2020 15:57:42 GMT
< Server: Apache/2.4.18 (Ubuntu)
Server: Apache/2.4.18 (Ubuntu)
< Strict-Transport-Security: max-age=15768000; includeSubDomains; preload
Strict-Transport-Security: max-age=15768000; includeSubDomains; preload
< Vary: Accept-Language,Cookie,Accept-Encoding
Vary: Accept-Language,Cookie,Accept-Encoding
< X-XSS-Protection: 1; mode=block
X-XSS-Protection: 1; mode=block
< X-Frame-Options: SAMEORIGIN
X-Frame-Options: SAMEORIGIN
< Content-Security-Policy: default-src 'none'; style-src 'self'; form-action 'self'; img-src *; script-src 'self'; font-src 'self'; connect-src 'self'
Content-Security-Policy: default-src 'none'; style-src 'self'; form-action 'self'; img-src *; script-src 'self'; font-src 'self'; connect-src 'self'
< Content-Language: en
Content-Language: en
< X-Content-Type-Options: nosniff
X-Content-Type-Options: nosniff
< Content-Length: 178177
Content-Length: 178177
< Content-Type: text/html; charset=utf-8
Content-Type: text/html; charset=utf-8

< 
* Connection #0 to host apps.nextcloud.com left intact

I think, it is always worse to use the search function of this forum FIRST before opening a new request :wink: This question has already been asked and answered several times, as you can see here:

https://help.nextcloud.com/search?q=cURL%20error%2028

Yes, I searched quite a long time before I wrote the question.