Nextcloud stuck in startup loop
-
Hi we have a Cloudron instance with some apps, including Nextcloud, with their storage location set to an NFS mount volume. Nextcloud has always had issues starting up but it did eventually start. Now it seems to be stuck in an update loop:
Apr 24 20:12:23 ==> update config Apr 24 20:12:24 ==> turning off maintenance mode Apr 24 20:12:24 An unhandled exception has been thrown: Apr 24 20:12:24 Exception: Could not acquire a shared lock on the config file /app/code/config/config.php in /app/code/lib/private/Config.php:225 Apr 24 20:12:24 Stack trace: Apr 24 20:12:24 #0 /app/code/lib/private/Config.php(40): OC\Config->readData() Apr 24 20:12:24 #1 /app/code/lib/base.php(95): OC\Config->__construct() Apr 24 20:12:24 #2 /app/code/lib/base.php(676): OC::initPaths() Apr 24 20:12:24 #3 /app/code/lib/base.php(1288): OC::init() Apr 24 20:12:24 #4 /app/code/console.php(32): require_once('...') Apr 24 20:12:24 #5 /app/code/occ(33): require_once('...') Apr 24 20:12:24 #6 {main} Apr 24 20:12:24 ==> Updating apps Apr 24 20:12:24 ==> Old apps: Apr 24 20:12:24 activity files_sharing sharebymail Apr 24 20:12:24 admin_audit files_trashbin support Apr 24 20:12:24 app_api files_versions survey_client Apr 24 20:12:24 bruteforcesettings firstrunwizard suspicious_login Apr 24 20:12:24 circles logreader systemtags Apr 24 20:12:24 cloud_federation_api lookup_server_connector testing Apr 24 20:12:24 comments nextcloud_announcements text Apr 24 20:12:24 contactsinteraction notifications theming Apr 24 20:12:24 dashboard oauth2 twofactor_backupcodes Apr 24 20:12:24 dav password_policy twofactor_nextcloud_notification Apr 24 20:12:24 encryption photos twofactor_totp Apr 24 20:12:24 federatedfilesharing privacy updatenotification Apr 24 20:12:24 federation profile user_ldap Apr 24 20:12:24 files provisioning_api user_status Apr 24 20:12:24 files_downloadlimit recommendations viewer Apr 24 20:12:24 files_external related_resources weather_status Apr 24 20:12:24 files_pdfviewer serverinfo webhook_listeners Apr 24 20:12:24 files_reminders settings workflowengine Apr 24 20:12:24 accessibility files_rightclick settings Apr 24 20:12:24 activity files_sharing sharebymail Apr 24 20:12:24 admin_audit files_trashbin spreed Apr 24 20:12:24 app_api files_versions support Apr 24 20:12:24 auto_groups files_videoplayer survey_client Apr 24 20:12:24 bruteforcesettings firstrunwizard suspicious_login Apr 24 20:12:24 calendar groupfolders systemtags Apr 24 20:12:24 circles logreader testing Apr 24 20:12:24 cloud_federation_api lookup_server_connector text Apr 24 20:12:24 comments nextcloud_announcements theming Apr 24 20:12:24 contactsinteraction notifications theming_customcss Apr 24 20:12:24 dashboard oauth2 twofactor_backupcodes Apr 24 20:12:24 dav onlyoffice twofactor_nextcloud_notification Apr 24 20:12:24 deck password_policy twofactor_totp Apr 24 20:12:24 drawio photos updatenotification Apr 24 20:12:24 encryption privacy user_ldap Apr 24 20:12:24 federatedfilesharing profile user_oidc Apr 24 20:12:24 federation provisioning_api user_status Apr 24 20:12:24 files recommendations viewer Apr 24 20:12:24 files_downloadlimit related_resources weather_status Apr 24 20:12:24 files_external richdocuments webhook_listeners Apr 24 20:12:24 files_pdfviewer rocketchat_nextcloud workflowengine Apr 24 20:12:24 files_reminders serverinfo Apr 24 20:12:24 ==> Update app: activity Apr 24 20:12:30 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:12:39 ==> Update app: admin_audit Apr 24 20:12:40 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:12:47 ==> Update app: app_api Apr 24 20:12:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:13:00 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:13:02 ==> Update app: bruteforcesettings Apr 24 20:13:10 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:13:12 ==> Update app: circles Apr 24 20:13:20 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:13:30 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:13:40 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:13:41 ==> Update app: cloud_federation_api Apr 24 20:13:47 ==> Update app: comments Apr 24 20:13:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:13:53 ==> Update app: contactsinteraction Apr 24 20:13:59 ==> Update app: dashboard Apr 24 20:14:00 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:14:05 ==> Update app: dav Apr 24 20:14:10 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:14:20 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:14:30 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:14:31 ==> Update app: encryption Apr 24 20:14:40 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:14:40 ==> Update app: federatedfilesharing Apr 24 20:14:46 ==> Update app: federation Apr 24 20:14:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:14:51 ==> Update app: files Apr 24 20:15:00 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:15:01 ==> Update app: files_downloadlimit Apr 24 20:15:10 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:15:10 ==> Update app: files_external Apr 24 20:15:20 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:15:22 ==> Update app: files_pdfviewer Apr 24 20:15:30 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:15:40 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:15:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:15:50 ==> Update app: files_reminders Apr 24 20:15:56 ==> Update app: files_sharing Apr 24 20:16:00 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:16:06 ==> Update app: files_trashbin Apr 24 20:16:10 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:16:14 ==> Update app: files_versions Apr 24 20:16:20 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:16:21 ==> Update app: firstrunwizard Apr 24 20:16:30 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:16:32 ==> Update app: logreader Apr 24 20:16:40 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:16:44 ==> Update app: lookup_server_connector Apr 24 20:16:49 ==> Update app: nextcloud_announcements Apr 24 20:16:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:16:56 ==> Update app: notifications Apr 24 20:17:00 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:17:10 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:17:11 ==> Update app: oauth2 Apr 24 20:17:17 ==> Update app: password_policy Apr 24 20:17:20 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:17:28 ==> Update app: photos Apr 24 20:17:30 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:17:40 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:17:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:17:57 ==> Update app: privacy Apr 24 20:18:00 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:18:05 ==> Update app: profile Apr 24 20:18:10 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:18:10 ==> Update app: provisioning_api Apr 24 20:18:15 ==> Update app: recommendations Apr 24 20:18:20 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:18:22 ==> Update app: related_resources Apr 24 20:18:30 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:18:35 ==> Update app: serverinfo Apr 24 20:18:40 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:18:45 ==> Update app: settings Apr 24 20:18:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:19:00 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:19:00 ==> Update app: sharebymail Apr 24 20:19:06 ==> Update app: support Apr 24 20:19:10 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:19:15 ==> Update app: survey_client Apr 24 20:19:20 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:19:22 ==> Update app: suspicious_login Apr 24 20:19:30 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:19:40 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:19:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:20:00 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:20:10 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:20:20 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:20:30 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:20:40 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:20:49 ==> Update app: systemtags Apr 24 20:20:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:20:55 ==> Update app: testing Apr 24 20:20:58 ==> Update app: text Apr 24 20:21:00 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:21:10 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:21:20 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:21:30 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:21:40 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:21:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:22:00 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:22:10 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:22:20 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:22:30 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:22:40 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:22:43 ==> Update app: theming Apr 24 20:22:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:22:52 ==> Update app: twofactor_backupcodes Apr 24 20:23:00 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:23:01 ==> Update app: twofactor_nextcloud_notification Apr 24 20:23:10 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:23:12 ==> Update app: twofactor_totp Apr 24 20:23:20 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:23:24 ==> Update app: updatenotification Apr 24 20:23:30 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:23:30 ==> Update app: user_ldap Apr 24 20:23:40 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:23:41 ==> Update app: user_status Apr 24 20:23:48 ==> Update app: viewer Apr 24 20:23:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:24:00 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:24:00 ==> Update app: weather_status Apr 24 20:24:06 ==> Update app: webhook_listeners Apr 24 20:24:10 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:24:10 ==> Update app: workflowengine Apr 24 20:24:17 ==> New apps: Apr 24 20:24:17 activity files_sharing sharebymail Apr 24 20:24:17 admin_audit files_trashbin support Apr 24 20:24:17 app_api files_versions survey_client Apr 24 20:24:17 bruteforcesettings firstrunwizard suspicious_login Apr 24 20:24:17 circles logreader systemtags Apr 24 20:24:17 cloud_federation_api lookup_server_connector testing Apr 24 20:24:17 comments nextcloud_announcements text Apr 24 20:24:17 contactsinteraction notifications theming Apr 24 20:24:17 dashboard oauth2 twofactor_backupcodes Apr 24 20:24:17 dav password_policy twofactor_nextcloud_notification Apr 24 20:24:17 encryption photos twofactor_totp Apr 24 20:24:17 federatedfilesharing privacy updatenotification Apr 24 20:24:17 federation profile user_ldap Apr 24 20:24:17 files provisioning_api user_status Apr 24 20:24:17 files_downloadlimit recommendations viewer Apr 24 20:24:17 files_external related_resources weather_status Apr 24 20:24:17 files_pdfviewer serverinfo webhook_listeners Apr 24 20:24:17 files_reminders settings workflowengine Apr 24 20:24:17 accessibility files_rightclick settings Apr 24 20:24:17 activity files_sharing sharebymail Apr 24 20:24:17 admin_audit files_trashbin spreed Apr 24 20:24:17 app_api files_versions support Apr 24 20:24:17 auto_groups files_videoplayer survey_client Apr 24 20:24:17 bruteforcesettings firstrunwizard suspicious_login Apr 24 20:24:17 calendar groupfolders systemtags Apr 24 20:24:17 circles logreader testing Apr 24 20:24:17 cloud_federation_api lookup_server_connector text Apr 24 20:24:17 comments nextcloud_announcements theming Apr 24 20:24:17 contactsinteraction notifications theming_customcss Apr 24 20:24:17 dashboard oauth2 twofactor_backupcodes Apr 24 20:24:17 dav onlyoffice twofactor_nextcloud_notification Apr 24 20:24:17 deck password_policy twofactor_totp Apr 24 20:24:17 drawio photos updatenotification Apr 24 20:24:17 encryption privacy user_ldap Apr 24 20:24:17 federatedfilesharing profile user_oidc Apr 24 20:24:17 federation provisioning_api user_status Apr 24 20:24:17 files recommendations viewer Apr 24 20:24:17 files_downloadlimit related_resources weather_status Apr 24 20:24:17 files_external richdocuments webhook_listeners Apr 24 20:24:17 files_pdfviewer rocketchat_nextcloud workflowengine Apr 24 20:24:17 files_reminders serverinfo Apr 24 20:24:17 ==> Copying htaccess Apr 24 20:24:20 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:24:30 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:24:40 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:24:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:25:00 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:25:10 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:25:20 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:25:30 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:25:40 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:25:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:26:00 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:26:10 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:26:20 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:26:30 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:26:40 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:26:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:27:00 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:27:10 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:27:20 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:27:30 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:27:40 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:27:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:28:00 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:28:10 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:28:20 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:28:30 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:28:40 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:28:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:29:00 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:29:10 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:29:20 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:29:30 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:29:40 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:29:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:30:00 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:30:10 => Healthcheck error: Error: connect ECONNREFUSED 172.18.16.238:80 Apr 24 20:30:13 ==> update config Apr 24 20:30:13 ==> turning off maintenance mode Apr 24 20:30:14 An unhandled exception has been thrown: Apr 24 20:30:14 Exception: Could not acquire a shared lock on the config file /app/code/config/config.php in /app/code/lib/private/Config.php:225 Apr 24 20:30:14 Stack trace: Apr 24 20:30:14 #0 /app/code/lib/private/Config.php(40): OC\Config->readData() Apr 24 20:30:14 #1 /app/code/lib/base.php(95): OC\Config->__construct() Apr 24 20:30:14 #2 /app/code/lib/base.php(676): OC::initPaths() Apr 24 20:30:14 #3 /app/code/lib/base.php(1288): OC::init() Apr 24 20:30:14 #4 /app/code/console.php(32): require_once('...') Apr 24 20:30:14 #5 /app/code/occ(33): require_once('...') Apr 24 20:30:14 #6 {main} Apr 24 20:30:14 ==> Updating apps Apr 24 20:30:14 ==> Old apps: Apr 24 20:30:14 activity files_sharing sharebymail Apr 24 20:30:14 admin_audit files_trashbin support Apr 24 20:30:14 app_api files_versions survey_client Apr 24 20:30:14 bruteforcesettings firstrunwizard suspicious_login Apr 24 20:30:14 circles logreader systemtags Apr 24 20:30:14 cloud_federation_api lookup_server_connector testing Apr 24 20:30:14 comments nextcloud_announcements text Apr 24 20:30:14 contactsinteraction notifications theming Apr 24 20:30:14 dashboard oauth2 twofactor_backupcodes Apr 24 20:30:14 dav password_policy twofactor_nextcloud_notification Apr 24 20:30:14 encryption photos twofactor_totp Apr 24 20:30:14 federatedfilesharing privacy updatenotification ... (repeating the update until it gets the same error, and so on forever)This is happening after an update to v9.1.6 which didn't work due to some network issues (NFS mount was not being recognised and docker containers needed to be rebuilt), and then with help from @james managed to update to v9.1.7 which fixed the issues. All apps then restarted successfully except Nextcloud which is stuck in this loop.
It seems that file locks don't work on NFS. If anyone knows a way to bypass the lock, or any other way to fix this issue any help would be appreciated!
The error is thrown on this line: https://github.com/nextcloud/server/blob/e6b45a68adf9d5e1799600a63cb856e4b3c1f7fc/lib/private/Config.php#L225
I tried editing the file directly but Cloudron wouldn't let me (understandably!)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login