cURL error 28: Operation timed out after XXXXXX milliseconds with XXXXXX out of XXXXXX bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

Hello I just install nextcloud for the first time on a Ubuntu 19.04. I am facing a problem that has appeared in the past many times i.e. i am trying to install apps in my case "contacts"and “caledar”
i am always getting the error mentioned below when i do that

contacts:

“cURL error 28: Operation timed out after 30000 milliseconds with 1235534 out of 2055669 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)”

When i look into the logs i see the following

contacts:

GuzzleHttp\Exception\ConnectException: cURL error 28: Operation timed out after 30000 milliseconds with 1235534 out of 2055669 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

    /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php - line 149:

    GuzzleHttp\Handler\CurlFactory::createRejection(GuzzleHttp\H ... l}, { errno: 28, ... 0})

    /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php - line 102:

    GuzzleHttp\Handler\CurlFactory::finishError(GuzzleHttp\H ... {}, GuzzleHttp\H ... l}, GuzzleHttp\H ... {})

    /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php - line 43:

    GuzzleHttp\Handler\CurlFactory::finish(GuzzleHttp\H ... {}, GuzzleHttp\H ... l}, GuzzleHttp\H ... {})

    /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php - line 28:

    GuzzleHttp\Handler\CurlHandler->__invoke("*** sensiti ... *", "*** sensiti ... *")

    /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php - line 51:

    GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}("*** sensiti ... *")

    /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php - line 37:

    GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}("*** sensiti ... *")

    /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php - line 30:

    GuzzleHttp\PrepareBodyMiddleware->__invoke("*** sensiti ... *", "*** sensiti ... *")

    /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php - line 70:

    GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensiti ... *")

    /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php - line 107:

    GuzzleHttp\RedirectMiddleware->__invoke("*** sensiti ... *", "*** sensiti ... *")

    /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php - line 72:

    GuzzleHttp\RedirectMiddleware->checkRedirect(GuzzleHttp\Psr7\Request {}, "*** sensiti ... *", "*** sensiti ... *")

    /var/www/nextcloud/3rdparty/guzzlehttp/promises/src/FulfilledPromise.php - line 39:

    GuzzleHttp\RedirectMiddleware->GuzzleHttp\{closure}("*** sensiti ... *")

    /var/www/nextcloud/3rdparty/guzzlehttp/promises/src/TaskQueue.php - line 47:

    GuzzleHttp\Promise\FulfilledPromise::GuzzleHttp\Promise\{closure}("*** sensiti ... *")

    /var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php - line 246:

    GuzzleHttp\Promise\TaskQueue->run(true)

    /var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php - line 223:

    GuzzleHttp\Promise\Promise->invokeWaitFn()

    /var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php - line 267:

    GuzzleHttp\Promise\Promise->waitIfPending()

    /var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php - line 225:

    GuzzleHttp\Promise\Promise->invokeWaitList()

    /var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php - line 62:

    GuzzleHttp\Promise\Promise->waitIfPending()

    /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php - line 131:

    GuzzleHttp\Promise\Promise->wait()

    /var/www/nextcloud/lib/private/Http/Client/Client.php - line 144:

    GuzzleHttp\Client->request("get", "https://git ... z", { proxy: nul ... e})

    /var/www/nextcloud/lib/private/Installer.php - line 269:

    OC\Http\Client\Client->get("https://git ... z", { save_to: " ... "})

    /var/www/nextcloud/settings/Controller/AppSettingsController.php - line 444:

    OC\Installer->downloadApp("contacts")

    /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 170:

    OC\Settings\Controller\AppSettingsController->enableApps([ "contacts"], [])

    /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 99:

    OC\AppFramework\Http\Dispatcher->executeController(OC\Settings\ ... {}, "enableApps")

    /var/www/nextcloud/lib/private/AppFramework/App.php - line 126:

    OC\AppFramework\Http\Dispatcher->dispatch(OC\Settings\ ... {}, "enableApps")

    /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:

    OC\AppFramework\App::main("OC\\Setting ... r", "enableApps", OC\AppFramew ... {}, { _route: "s ... "})

    <<closure>>

    OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "s ... "})

    /var/www/nextcloud/lib/private/Route/Router.php - line 297:

    call_user_func(OC\AppFramew ... {}, { _route: "s ... "})

    /var/www/nextcloud/lib/base.php - line 997:

    OC\Route\Router->match("/settings/apps/enable")

    /var/www/nextcloud/index.php - line 42:

    OC::handleRequest()

    indent preformatted text by 4 spaces

calendar:

Error settings GuzzleHttp\Exception\ConnectException: cURL error 28: Operation timed out after 30000 milliseconds with 1200718 out of 1594265 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php - line 149:

GuzzleHttp\Handler\CurlFactory::createRejection(GuzzleHttp\H ... l}, { errno: 28, ... 5})

/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php - line 102:

GuzzleHttp\Handler\CurlFactory::finishError(GuzzleHttp\H ... {}, GuzzleHttp\H ... l}, GuzzleHttp\H ... {})

/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php - line 43:

GuzzleHttp\Handler\CurlFactory::finish(GuzzleHttp\H ... {}, GuzzleHttp\H ... l}, GuzzleHttp\H ... {})

/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php - line 28:

GuzzleHttp\Handler\CurlHandler->__invoke("*** sensiti ... *", "*** sensiti ... *")

/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php - line 51:

GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}("*** sensiti ... *")

/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php - line 37:

GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}("*** sensiti ... *")

/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php - line 30:

GuzzleHttp\PrepareBodyMiddleware->__invoke("*** sensiti ... *", "*** sensiti ... *")

/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php - line 70:

GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensiti ... *")

/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php - line 107:

GuzzleHttp\RedirectMiddleware->__invoke("*** sensiti ... *", "*** sensiti ... *")

/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php - line 72:

GuzzleHttp\RedirectMiddleware->checkRedirect(GuzzleHttp\Psr7\Request {}, "*** sensiti ... *", "*** sensiti ... *")

/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/FulfilledPromise.php - line 39:

GuzzleHttp\RedirectMiddleware->GuzzleHttp\{closure}("*** sensiti ... *")

/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/TaskQueue.php - line 47:

GuzzleHttp\Promise\FulfilledPromise::GuzzleHttp\Promise\{closure}("*** sensiti ... *")

/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php - line 246:

GuzzleHttp\Promise\TaskQueue->run(true)

/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php - line 223:

GuzzleHttp\Promise\Promise->invokeWaitFn()

/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php - line 267:

GuzzleHttp\Promise\Promise->waitIfPending()

/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php - line 225:

GuzzleHttp\Promise\Promise->invokeWaitList()

/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php - line 62:

GuzzleHttp\Promise\Promise->waitIfPending()

/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php - line 131:

GuzzleHttp\Promise\Promise->wait()

/var/www/nextcloud/lib/private/Http/Client/Client.php - line 144:

GuzzleHttp\Client->request("get", "https://git ... z", { proxy: nul ... e})

/var/www/nextcloud/lib/private/Installer.php - line 269:

OC\Http\Client\Client->get("https://git ... z", { save_to: " ... "})

/var/www/nextcloud/settings/Controller/AppSettingsController.php - line 444:

OC\Installer->downloadApp("calendar")

/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 170:

OC\Settings\Controller\AppSettingsController->enableApps([ "calendar"], [])

/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 99:

OC\AppFramework\Http\Dispatcher->executeController(OC\Settings\ ... {}, "enableApps")

/var/www/nextcloud/lib/private/AppFramework/App.php - line 126:

OC\AppFramework\Http\Dispatcher->dispatch(OC\Settings\ ... {}, "enableApps")

/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:

OC\AppFramework\App::main("OC\\Setting ... r", "enableApps", OC\AppFramew ... {}, { _route: "s ... "})

<<closure>>

OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "s ... "})

/var/www/nextcloud/lib/private/Route/Router.php - line 297:

call_user_func(OC\AppFramew ... {}, { _route: "s ... "})

/var/www/nextcloud/lib/base.php - line 997:

OC\Route\Router->match("/settings/apps/enable")

/var/www/nextcloud/index.php - line 42:

OC::handleRequest()

I used this tutuorial to install nectcloud.

here are the exact commds that i used

https://pastebin.com/tBV2kYHb

all is the same as per the manual except the passwords for the database and the user i have changed them of corse.

I also made a tcpdump trace to see and i see nexcloud getting icmp destination unreachable (fragmentation needed) from Detusche telekom 87.137.247.101 as well as bunch of tlsv1.3 streams to amazon. If needed i can provide the trace as well.

My question is is this the same problem that was seen in the past with the appstore? Can someone tell me if they can install apps now, In this case it will mean that this is not the same problem.

many thanks in advanced.

Addition 08 January 2020 . I have just tired a brand new instalation but this time i am using postgresql instead of mysql and i get the same error. Any ideas?

OK I found the answer here


i.e.

"
I’ve solved the Problem by manually Setting the Value for
"RequestOptions::TIMEOUT "
to 120 or a higher value in the following file:
“/path/to/nextcloud/lib/private/Http/Client/Client.php”
"

5 Likes

Cheers. Just tried to install a new app and experienced this problem. A quick search and you’ve not only asked my question, but answered it as well! :slight_smile:

I have the same issue with the Community Document Server of Onlyoffice. I’ve set the timeout in Client.php from 30 to 120, 240 and 3000. Every time without success. I always get the same message. :thinking:

After the update to version 18.0.6 it’s still not downloadable. Now I do not get an error message anymore. Very curious…

A change in the /lib/private/Installer.php file may help
$ timeout = $ this-> isCLI? 0: 120; for example: 300

I can only change in this file helped :slight_smile:

I’m experiencing the same issue with Nextcloud 19.0.1 Snap on Ubuntu Server. However I cannot seem to find the correct path/file mentioned in this thread.
Can anyone point me to where I may be able to change this value in a snap package?