Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Cannot update #42473

Closed
5 of 8 tasks
Serhioromano opened this issue Dec 24, 2023 · 6 comments
Closed
5 of 8 tasks

[Bug]: Cannot update #42473

Serhioromano opened this issue Dec 24, 2023 · 6 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@Serhioromano
Copy link

⚠️ This issue respects the following points: ⚠️

Bug description

After I installed nextcloud for a few month it was ok and I regularly updated in from web UI. Now it is 27.0.1 and suddenly it stopped to be updated. Web UI always shows an error. I tried in CLI and get also an error.

Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:140

So I cannot update. looks like the only way now is reinstall it again in my PVE and configure again. Which is a lot of work actualy and I do not know how to reinstall it with keeping all configurations in takt.

Steps to reproduce

  1. Open CLI
  2. Run cd /var/www/nextcloud/
  3. Run sudo -u www-data php7.4 updater/updater.phar --no-interaction

Expected behavior

Next cloud updated to next version

Installation method

Community Docker image

Nextcloud Server version

27

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Nginx

Database engine version

SQlite

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

An unhandled exception has been thrown:
Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:140
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1531): OC\DB\Connection->connect()
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1029): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /var/www/nextcloud/lib/private/DB/Connection.php(262): Doctrine\DBAL\Connection->executeQuery()
#3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Connection->executeQuery()
#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(280): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /var/www/nextcloud/lib/private/AppConfig.php(418): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /var/www/nextcloud/lib/private/AppConfig.php(184): OC\AppConfig->loadConfigValues()
#7 /var/www/nextcloud/lib/private/AppConfig.php(374): OC\AppConfig->getApps()
#8 /var/www/nextcloud/lib/private/legacy/OC_App.php(803): OC\AppConfig->getValues()
#9 /var/www/nextcloud/lib/private/Server.php(736): OC_App::getAppVersions()
#10 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(171): OC\Server->OC\{closure}()
#11 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#12 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(138): Pimple\Container->offsetGet()
#13 /var/www/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#14 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(65): OC\ServerContainer->query()
#15 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(193): OC\AppFramework\Utility\SimpleContainer->get()
#16 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(171): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#17 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#18 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(138): Pimple\Container->offsetGet()
#19 /var/www/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#20 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(65): OC\ServerContainer->query()
#21 /var/www/nextcloud/lib/private/Server.php(1130): OC\AppFramework\Utility\SimpleContainer->get()
#22 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(171): OC\Server->OC\{closure}()
#23 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#24 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(138): Pimple\Container->offsetGet()
#25 /var/www/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#26 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(65): OC\ServerContainer->query()
#27 /var/www/nextcloud/lib/private/Server.php(2088): OC\AppFramework\Utility\SimpleContainer->get()
#28 /var/www/nextcloud/lib/private/Files/View.php(107): OC\Server->getLockingProvider()
#29 /var/www/nextcloud/lib/private/Server.php(470): OC\Files\View->__construct()
#30 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(171): OC\Server->OC\{closure}()
#31 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#32 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(138): Pimple\Container->offsetGet()
#33 /var/www/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#34 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(65): OC\ServerContainer->query()
#35 /var/www/nextcloud/lib/private/Server.php(1490): OC\AppFramework\Utility\SimpleContainer->get()
#36 /var/www/nextcloud/lib/base.php(635): OC\Server->boot()
#37 /var/www/nextcloud/lib/base.php(1196): OC::init()
#38 /var/www/nextcloud/console.php(48): require_once('...')
#39 /var/www/nextcloud/occ(11): require_once('...')

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

@Serhioromano Serhioromano added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Dec 24, 2023
@joshtrichards
Copy link
Member

joshtrichards commented Dec 24, 2023

Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:140
[...]
After I installed nextcloud for a few month it was ok and I regularly updated in from web UI. Now it is 27.0.1 and suddenly it stopped to be updated. Web UI always shows an error. I tried in CLI and get also an error.
[...]
Community Docker image
[...]
So I cannot update. looks like the only way now is reinstall it again in my PVE and configure again. Which is a lot of work actualy and I do not know how to reinstall it with keeping all configurations in takt.

It sounds like you're using a Docker image; I'm not sure how you ever used the web-based updater since there aren't any Docker images out there that support web-based updates these days that I'm aware of (and ours never have, but LinuxServer.io's did until about a year ago[1] - it no longer does).

Your matter sounds like a configuration matter. Please post over at the Nextcloud Help Forum - https://help.nextcloud.com - for guidance/assistance troubleshooting.

[1] https://info.linuxserver.io/issues/2023-06-25-nextcloud/

@joshtrichards joshtrichards closed this as not planned Won't fix, can't repro, duplicate, stale Dec 24, 2023
@Serhioromano
Copy link
Author

This installation is an LXC on my PVE node. It is not a docker itself, but it is within LCX.

@JAlTad
Copy link

JAlTad commented Jun 15, 2024

@Serhioromano same problem here with LCX running in Proxmox ... How did you solved it?

@joshtrichards
Copy link
Member

The error itself Failed to connect to the database literally just means your database isn't accessible.

If sqlite, the db is a file called owncloud.db. in your data directory. If using another db type, it's the db service you need to check, which is outside of Nextcloud entirely. You'll need to see the process is running, check the logs, etc.

@Serhioromano
Copy link
Author

@Serhioromano same problem here with LCX running in Proxmox ... How did you solved it?

By removing this software completely. It is not reliable. There are always some issue. Instead of working I am fixing this server. I use Syncthing now. It is little bit different but I have managed to make it work as I need.

@JAlTad
Copy link

JAlTad commented Jul 26, 2024

Hi all,
I solved it in my instance, but I don't know if the same problem for all of us.
In my instance, some files didn't belong to user www-data, so I recursively changed it for all files and it worked.

$ chown -R www-data /var/www/nextcloud/

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

3 participants