App should be fully installed.
Download fails with:
cURL error 28: Operation timed out after 30000 milliseconds with 73837972 out of 305964280 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
This is especially sad since the advertised "Nextcloud and OnlyOffice are pre-installed / ready-to-go" does not work anymore if you have a weak internet connection.
This might be due to a hard-coded timeout as shown in the (whyever closed) issues below:
Operating system: Linux / Debian
Web server: Apache
Database: MariaDB
PHP version: 7
Nextcloud version: 18.0.0 (see Nextcloud admin page)
Updated from an older Nextcloud/ownCloud or fresh install: Fresh install
Where did you install Nextcloud from: Docker Hub
I can confirm the same Error here
I can confirm the same Error here
This might be due to a hard-coded timeout as shown in the (whyever closed) issues below: #17685
At least I can give you an answer to this question: The issue was closed because it's a duplicate but I referenced the wrong issue number. That's indeed a bit confusing but fixed now.
"cURL error 28: Operation timed out after 30000 milliseconds with 130053548 out of 315860148 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)"
Remove the timeout, it doesn't make sense to assume that every app will install in same timeframe.
Or make each app have it's own value for "maximum install time" and enforce that.
Even inside our datacenter with 1Gbit/s the download via app store crashed with a message like "an error occurred" on the front end. Nothing in the logs.
The app was listed in the app list but nothing worked.
I found this regarding the timeout:
https://github.com/nextcloud/server/pull/18976
Should be fixed by https://github.com/nextcloud/server/pull/19017
I get this error over a Gigabit connection, seems like I should have stayed with it running in separate docker, am now without onlyoffice :(
Simply use the fix posted above.
Sorry, I don't see an actual accessible fix, only a fix in source code, which given it needs to be compiled will not work for me. Nevertheless, I did a manual install and applied it that way. Unfortunately, there are more issues than just this one when it comes to enabling this '1 click' update. So it's a work in progress for me :)
No, you just change the timeout time in config file!
Still an issue with 18.0.1
Ok so your server is too slow for 120s install, which can easily be exceeded on slow connections. I think 2 minutes is too slow for 300MB package download + install, I don't know why they implemented a fixed value for a huge variety of packages. Change the value yourself. This value should be specified by the app creator, only they can know how long their app is supposed to take to install.
120 seconds is just not enough:
Error: cURL error 28: Operation timed out after 120000 milliseconds with 231556380 out of 315849196 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
So. Also ran into this issue today. Can the timeout be adjusted now? Where/how?
So. Also ran into this issue today. Can the timeout be adjusted now? Where/how?
of course. Just edit: lib/private/Installer.php, line 274. Change 120 to 300.
$client->get($app['releases'][0]['download'], ['save_to' => $tempFile, 'timeout' => 300]);
Thanks. Worked like a charm. Is there any one taking care that this workaround (or fix?) makes it into some place that people find it more easily in the future? Like putting this into the settings UI, or at least in the config? It would also be nice if the error would be handled with additional info for the (administrative)user. Right now it is just cURL saying "I timed out". No hint that the timeout can be increased. Thanks for considering this!
There is a suggestech patch SOMEWHERE... to be included in the Nextcloud 19.. as far as I remember.
So with CLI there should be no timeout...
There is a suggestech patch SOMEWHERE... to be included in the Nextcloud 19.. as far as I remember.
So with CLI there should be no timeout...
Nope, even with CLI the timeout happened when running php occ app:install documentserver_community!
Nope, even with CLI the timeout happened when running php occ app:install documentserver_community!
I did mean the future release of course...
For all who ran into this issue and land here : it is no more needed to modify your sources files.
A fix, only valid for CLI mode, was backported into 18: https://github.com/nextcloud/server/pull/19430
So, I've been able to install it with:
sudo -u nextcloud php occ app:install documentserver_community
@b-pfl you should maybe upgrade and try again.
So. Also ran into this issue today. Can the timeout be adjusted now? Where/how?
of course. Just edit: lib/private/Installer.php, line 274. Change 120 to 300.
$client->get($app['releases'][0]['download'], ['save_to' => $tempFile, 'timeout' => 300]);
Hi using nextcloud on my hosted domain.
I have this in installer.php
// Download the release
$tempFile = $this->tempManager->getTemporaryFile('.tar.gz');
$timeout = $this->isCLI ? 0 : 120;
$client = $this->clientService->newClient();
$client->get($app['releases'][0]['download'], ['save_to' => $tempFile, 'timeout' => $timeout]);
After I changed 120 to 500 nothing changed when I tried to download from nextclout. Again timeout after 120000 miliseconds.
Any help on this one?
Thanks!
@brdobrdo which line is it?
@prghix 277
I put in some more hours yesterday... and finally solved it, but I am not sure at which step of all the things I tried. The steps were:
After all these changes, I stopped receiving timeout error from nextcloud app installer. Since the file was big (300M) I had some futher problems due to small hosting disk size (2GB). It takes cpanel (or the thing that does these kind of installations) a lot of time to download, extract and install. I left it cook overnight. This morning the document server package was downloaded and enabled in nextcloud.
thanks @prghix for the tip! It helped.
I cannot follow this step:
- changed installer.php timeout manually to 1200 sec (line 277)
I find in the nextcloud www documentroot, but cannot found any file with name 'installer.php'
Please help me, which location could that installer.php file?
I cannot follow this step:
- changed installer.php timeout manually to 1200 sec (line 277)
I find in the nextcloud www documentroot, but cannot found any file with name 'installer.php'
Please help me, which location could that installer.php file?
installer.php I changed is in public_html/nextcloud/lib/private
But...
I think this way of doing things is not really good because I am not educated enough and when I am changing php files I am just guessing what I am doing.
Better way I found is to download whole package from here and then upload it here: public_html/nextcloud/apps/documentserver_community using your cpanel file manager and then extract in the same folder.
When you log in to http://yourdomain/nextcloud and go to Apps you will see the app there and just enable it.
This is the most fool proof way if you are a noob like me. (maybe not ... I am a noob so I might be completely wrong)
From what I read, this package doesn't download because default settings are made under assumption that everyone has fast internet connection and this is 300 MB download.
Good luck!
This workaround with manual download and extract solved the problem! Thank you!
This is the most clear solution! Don't need to modify timeout parameters in the php or ini files!
Probably the best way is
occ app:install documentserver_community
Because there is no timeout over CLI.
On shared webhosters you can use the occweb app for that:
https://apps.nextcloud.com/apps/occweb
Probably the best way is
occ app:install documentserver_community
Because there is no timeout over CLI.
On shared webhosters you can use the occweb app for that:
https://apps.nextcloud.com/apps/occwebWhen you install like this, is there timeout issue?
There is NO timeout issue when you install it like this, afaik.
Yes its a best way to get to the same curl timeout issue! The best way is what brdobrdo wrote down, Download the package manualy and extract to your nextcloud apps dir my is: /var/www/html/nextcloud/apps
I've found this recommendation on many posts, but it not working at all like any timeout modification tips.
Lets try it, on a clean debian 10 install and a nextcloud on it, u will surely face this problem.
This problem can be experienced with dockler nextcloud image too.
occ uses php and curl to download and extract. That mechanism has some timeout issue. It's not so important, but occ running uses the /etc/php/
Any other things simply not working!
After it can be enabled from nextcloud applications panel.
Just an idea to solve this issue,
The documentserver_community package needed by the ONLYOFFICE package which is the part of basic nextcloud 18 install pack. So it could be the part of preinstalled pakages with onlyoffice.
One more fact near that, it cannot be installed from the apps user panel.
(If the communityserver image would be the part of the nextcloud base install package, then this issue only rises if someone remove it and later try to download it again from the apps panel. I think it no more than a percent of the affected cases. Now everyone facing with it who trying to edit a sheet or document when enable and testing onlyoffice app features.)
i have the same issue with docker instance of NC 19.
I'm having the time out issue with 19.04 right now, trying to install _Collabora Online - Built-in CODE Serve_
cURL error 28: Operation timed out after 120000 milliseconds with 183308627 out of 349048294 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
same. any fix?
Try to upload the installation files to server via CPanel or whatever you use. See my long post above.
Most helpful comment
of course. Just edit: lib/private/Installer.php, line 274. Change 120 to 300.
$client->get($app['releases'][0]['download'], ['save_to' => $tempFile, 'timeout' => 300]);