Not able to update any app in my nextcloud instance

after failing to update from the UI , I tried updating from the command line but that too doesnt seem to work.

I am running single instance on

|Operating System:|Linux 4.4.154-95-rockchip-gd2ab1f26e1b3 aarch64|
PHP Version : Version: 7.4.13
MySql version: 10.6.3
Nextcloud : 21.0.3

# sudo -u www-data /var/www/html/nextcloud/occ -v app:update --all

calendar new version available: 2.3.1

calendar couldn't be updated

bookmarks new version available: 4.4.0

bookmarks couldn't be updated

richdocumentscode new version available: 6.4.1004

richdocumentscode couldn't be updated

contacts new version available: 4.0.1

contacts couldn't be updated

notes new version available: 4.1.1

notes couldn't be updated

mail new version available: 1.10.2

mail couldn't be updated

audioplayer new version available: 3.1.0

audioplayer couldn't be updated

carnet new version available: 0.24.2

carnet couldn't be updated

richdocuments new version available: 4.2.1

richdocuments couldn't be updated

facerecognition new version available: 0.8.3

Have you checked nextcloud.log ?

that’s the most difficult part , as there are so many errors.

from the nextcloud logs I am able to find out one problem :

# curl https://github.com/nextcloud/bookmarks/releases/download/v4.4.0/bookmarks-4.4.0.tar.gz

curl: (7) Failed to connect to github.com port 443: Connection timed out

for some reason I don’t curl to any github url from server does not work. However I am able to curl from my local macbook so I did nslookup to find out of dns is the causing this issue:

here is output on nextcloud server:

# nslookup github.com
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: github.com
Address: 52.64.108.95

here is the result of second server node:

# nslookup github.com
Server: 127.0.0.53
Address: 127.0.0.53#53
Non-authoritative answer:
Name: github.com
Address: 140.82.118.3

and here is the result from my laptop where I can curl without any issue.

# nslookup github.com
Server: 192.168.1.14
Address: 192.168.1.14#53
Non-authoritative answer:
Name: github.com
Address: 140.82.121.4

192.168.1.14 is my own dns server i.e. Pihole

Here is the full nextcloud.log file:

{"reqId":"1dgFnLTZkzIiTDED27pX","level":3,"time":"2021-08-09T20:40:26+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":{"Exception":"OCP\\AppFramework\\QueryException","Message":"Could not resolve db! Class db does not exist","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":126,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/ServerContainer.php","line":162,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":434,"function":"query","class":"OC\\ServerContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":96,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":101,"function":"array_map"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":109,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":126,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":459,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":431,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/apps/audioplayer/appinfo/register_command.php","line":20,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Console/Application.php","line":143,"args":["/var/www/html/nextcloud/apps/audioplayer/appinfo/register_command.php"],"function":"require"},{"file":"/var/www/html/nextcloud/console.php","line":99,"function":"loadCommands","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/occ","line":11,"args":["/var/www/html/nextcloud/console.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","Line":115,"CustomMessage":"--"},"userAgent":"--","version":"21.0.3.1"}
{"reqId":"1dgFnLTZkzIiTDED27pX","level":1,"time":"2021-08-09T20:40:26+00:00","remoteAddr":"","user":"--","app":"passwords","method":"","url":"--","message":"Passwords runs /var/www/html/nextcloud/occ in global mode","userAgent":"--","version":"21.0.3.1"}
root@rockpi:/var/log/nextcloud# cat nextcloud.log 
{"reqId":"1dgFnLTZkzIiTDED27pX","level":3,"time":"2021-08-09T20:40:26+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":{"Exception":"OCP\\AppFramework\\QueryException","Message":"Could not resolve db! Class db does not exist","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":126,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/ServerContainer.php","line":162,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":434,"function":"query","class":"OC\\ServerContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":96,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":101,"function":"array_map"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":109,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":126,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":459,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":431,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/apps/audioplayer/appinfo/register_command.php","line":20,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Console/Application.php","line":143,"args":["/var/www/html/nextcloud/apps/audioplayer/appinfo/register_command.php"],"function":"require"},{"file":"/var/www/html/nextcloud/console.php","line":99,"function":"loadCommands","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/occ","line":11,"args":["/var/www/html/nextcloud/console.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","Line":115,"CustomMessage":"--"},"userAgent":"--","version":"21.0.3.1"}
{"reqId":"1dgFnLTZkzIiTDED27pX","level":1,"time":"2021-08-09T20:40:26+00:00","remoteAddr":"","user":"--","app":"passwords","method":"","url":"--","message":"Passwords runs /var/www/html/nextcloud/occ in global mode","userAgent":"--","version":"21.0.3.1"}
{"reqId":"1dgFnLTZkzIiTDED27pX","level":3,"time":"2021-08-09T20:42:37+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":{"Exception":"GuzzleHttp\\Exception\\ConnectException","Message":"cURL error 7: Failed to connect to github.com port 443: Connection timed out (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://github.com/nextcloud/bookmarks/releases/download/v4.4.0/bookmarks-4.4.0.tar.gz","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":158,"function":"createRejection","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":110,"function":"finishError","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php","line":47,"function":"finish","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php","line":28,"function":"__invoke","class":"GuzzleHttp\\Handler\\CurlHandler","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php","line":48,"function":"GuzzleHttp\\Handler\\{closure}","class":"GuzzleHttp\\Handler\\Proxy","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php","line":35,"function":"GuzzleHttp\\Handler\\{closure}","class":"GuzzleHttp\\Handler\\Proxy","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":31,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php","line":71,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":63,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php","line":75,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":331,"function":"__invoke","class":"GuzzleHttp\\HandlerStack","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":168,"function":"transfer","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":187,"function":"requestAsync","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Http/Client/Client.php","line":236,"function":"request","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Installer.php","line":307,"function":"get","class":"OC\\Http\\Client\\Client","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Installer.php","line":204,"function":"downloadApp","class":"OC\\Installer","type":"->"},{"file":"/var/www/html/nextcloud/core/Command/App/Update.php","line":116,"function":"updateAppstoreApp","class":"OC\\Installer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/apps/mail/vendor/symfony/console/Command/Command.php","line":258,"function":"execute","class":"OC\\Core\\Command\\App\\Update","type":"->"},{"file":"/var/www/html/nextcloud/apps/mail/vendor/symfony/console/Application.php","line":920,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/html/nextcloud/apps/mail/vendor/symfony/console/Application.php","line":266,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/apps/mail/vendor/symfony/console/Application.php","line":142,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Console/Application.php","line":215,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/occ","line":11,"args":["/var/www/html/nextcloud/console.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/3rdpart

With bit of more troubleshooting I was able to solve the problem of curl remote resource but I have now got new error:

# sudo -u www-data /var/www/html/nextcloud/occ -v app:update bookmarks

bookmarks new version available: 4.4.0

Error: An index with name 'primary' was already defined on table 'oc_bookmarks_tags'.

Apparently, the primary key / index on the oc_bookmarks_tags table wants to be created a second time. It may make sense to remove the index from the table and let the app recreate it.

2 posts were split to a new topic: Can’t update apps

I have the same problem here and wonder how you did fix the problem?
I tried to stop the ufw but it didn’t help:

curl https://github.com/nextcloud-releases/contacts/releases/download/v4.0.8/contacts-v4.0.8.tar.gz
curl: (7) Couldn’t connect to server
sudo service ufw stop
curl https://github.com/nextcloud-releases/contacts/releases/download/v4.0.8/contacts-v4.0.8.tar.gz
curl: (7) Couldn’t connect to server

If I use nslookup it seems to work:

nslookup github.com
Server: 127.0.0.53
Address: 127.0.0.53#53

Non-authoritative answer:
Name: github.com
Address: 140.82.121.4

Any ideas what is going wrong?

Do you use or need a http proxy? Then search curl http proxy