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

unhandled exception: "Could not resolve CardDavBackend!..." after upgrading to 10.0.3 #29544

Closed
fbassas opened this issue Nov 13, 2017 · 10 comments

Comments

@fbassas
Copy link

fbassas commented Nov 13, 2017

Steps to reproduce

  1. upgrade from 9.1.6 to 10.0.3 using packages
  2. As apache user we issue command: php occ upgrade

Expected behaviour

Correct upgrade to 10.0.3 version

Actual behaviour

Server configuration

Operating system:
ubuntu 16.04
Web server:
apache 2.4
Database:
MariaDB 10
PHP version:
php 7.0
ownCloud version: (see ownCloud admin page)
10.0.3
Updated from an older ownCloud or fresh install:
updated from 9.1.6
Where did you install ownCloud from:
oficial packages
Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.
https://gist.github.com/anonymous/12f295a0a25e2b230ae64cf834470cfe


**The content of config/config.php:**

$ cat config/config.php
<?php
$CONFIG = array (
  'instanceid' => 'ocde02dfcbf8',
  'passwordsalt' => '12ecc3db264455356548e26301263b',
  'datadirectory' => '/var/www/owncloud/data',
  'dbtype' => 'mysql',
  'version' => '10.0.3.3',
  'dbname' => 'owncloud',
  'dbhost' => '172.16.1.35',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'admin',
  'dbpassword' => '********',
  'installed' => true,
  'ldapUserCleanupInterval' => 51,
  'theme' => 'sict',
  'maintenance' => false,
  'trusted_domains' =>
  array (
    0 => 'nuvol.terrassa.upc.edu',
  ),
  'mail_smtpmode' => 'smtp',
  'mail_smtphost' => 'relay-ct.upc.edu',
  'mail_smtpport' => '25',
  'mail_smtptimeout' => 10,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/tmp/redis.sock',
    'port' => 0,
  ),
  'share_folder' => '/Shared',
  'overwritewebroot' => '/owncloud',
  'loglevel' => 3,
  'log_rotate_size' => 104857600,
  'preview_libreoffice_path' => '/usr/bin/libreoffice',
  'mail_from_address' => 'owncloud.terrassa',
  'mail_domain' => 'ct.upc.edu',
  'secret' => 'b76126bb72f1ab011163a2d0eb15ff9f0ac31f82405b1826c4421ebf57cfe0c42c828d5af89374d61b9a942bf911b6e8',
  'overwrite.cli.url' => '/owncloud',
  'trashbin_retention_obligation' => 'auto',
  'activity_expire_days' => '180',
  'updatechecker' => false,
);

Log in to the web-UI with an administrator account and click on
'admin' -> 'Generate Config Report' -> 'Download ownCloud config report'
This report includes the config.php settings, the list of activated apps
and other details in a well sanitized form.

or 

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder
$ php occ config:list system
ownCloud is in maintenance mode - no app have been loaded

{
    "system": {
        "instanceid": "ocde02dfcbf8",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "\/var\/www\/owncloud\/data",
        "dbtype": "mysql",
        "version": "10.0.3.3",
        "dbname": "owncloud",
        "dbhost": "172.16.1.35",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "ldapUserCleanupInterval": 51,
        "theme": "sict",
        "maintenance": true,
        "trusted_domains": [
            "nuvol.terrassa.upc.edu"
        ],
        "mail_smtpmode": "smtp",
        "mail_smtphost": "relay-ct.upc.edu",
        "mail_smtpport": "25",
        "mail_smtptimeout": 10,
        "memcache.local": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": "true",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "\/tmp\/redis.sock",
            "port": 0
        },
        "share_folder": "\/Shared",
        "overwritewebroot": "\/owncloud",
        "loglevel": 3,
        "log_rotate_size": 104857600,
        "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
        "mail_from_address": "owncloud.terrassa",
        "mail_domain": "ct.upc.edu",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "\/owncloud",
        "trashbin_retention_obligation": "auto",
        "activity_expire_days": "180",
        "updatechecker": false
    }
}


**List of activated apps:**

$ php occ app:list
ownCloud is in maintenance mode - no app have been loaded

Enabled:
  - activity: 2.3.6
  - bookmarks: 0.10.2
  - calendar: 1.5.4
  - comments: 0.3.0
  - configreport: 0.1.1
  - contacts: 1.5.3
  - dav: 0.3.0
  - federatedfilesharing: 0.3.1
  - federation: 0.1.0
  - files: 1.5.1
  - files_external: 0.7.1
  - files_pdfviewer: 0.8.2
  - files_sharing: 0.10.1
  - files_texteditor: 2.2.1
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 16.0.2
  - impersonate: 0.1.0
  - market: 0.2.2
  - notifications: 0.3.1
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - tasks: 0.9.3
  - templateeditor: 0.1
  - updatenotification: 0.2.1
  - user_ldap: 0.9.1
Disabled:
  - documents
  - encryption
  - extendedtrash
  - external
  - files_antivirus
  - ocusagecharts
  - search_lucene
  - theme-example
  - user_external


**Are you using external storage, if yes which one:** local/smb/sftp/...
No
**Are you using encryption:** yes/no
No
**Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...
LDAP
#### LDAP configuration (delete this part if not used)

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder

can not do dat because:
$ php occ ldap:show-config
An unhandled exception has been thrown:
OCP\AppFramework\QueryException: Could not resolve CardDavBackend! Class CardDavBackend does not exist in /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php:98
Stack trace:
#0 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(113): OC\AppFramework\Utility\SimpleContainer->resolve('CardDavBackend')
#1 /var/www/owncloud/apps/dav/appinfo/register_command.php(36): OC\AppFramework\Utility\SimpleContainer->query('CardDavBackend')
#2 /var/www/owncloud/lib/private/Console/Application.php(114): require('/var/www/ownclo...')
#3 /var/www/owncloud/console.php(105): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')

@fbassas
Copy link
Author

fbassas commented Nov 13, 2017

As an additional information:
I can log in as admin. Ldap backend seems well configured, but no users are shown in users section.
I can log in as a user, but no shared folders are shown.

@ghost
Copy link

ghost commented Nov 13, 2017

Seems you already have found #29544 where you had posted that info?

@fbassas
Copy link
Author

fbassas commented Nov 13, 2017

I had found a similar old issue #28068 , and I posted there some info.
I don't know if that is what you mean.

@ghost
Copy link

ghost commented Nov 13, 2017

Ok, so i think we can agree that it doesn't help to keep two issues about the same "Could not resolve CardDavBackend" message open until the reason and all of it's side-effects are known.

@ghost
Copy link

ghost commented Nov 13, 2017

Additional side-note to:

I can log in as admin. Ldap backend seems well configured, but no users are shown in users section.

Its worth to check the release notes of the major release, there you can find a note about not showing up LDAP users:

https://doc.owncloud.org/server/10.0/admin_manual/release_notes.html#existing-ldap-users-only-show-up-in-the-user-management-page-and-the-share-dialog-after-being-synced

Maybe this info helps you to get your users showing up.

@fjavimartin
Copy link

Hi, i have same issue and the way to solve it has been very easy:

  • Download Owncloud 10.0.3 version.
  • Descompress on a new folder.
  • Copy your config/config.php file to new installation config folder (set correct permission).
  • Config new installation folder on your web server domain config.
  • Restart WebServer.

This issue could be for an old library not present in 10.0.3 version. That's all.

@ghost
Copy link

ghost commented Nov 21, 2017

@fjavimartin Thanks for posting this additional info. You might want to post it in #28068 as well as that one is still open.

@ghost
Copy link

ghost commented Nov 26, 2017

@fjavimartin Side note to your steps in #29544 (comment) :

You can't move an ownCloud installation to a new folder without doing any manual modifications in the database. Instead delete all files and folder except /data and /config and then extract the 10.0.3 archive into the existing folder.

@gfcittolin
Copy link

Just for the record: we use OwnCloud here under Docker, and I've run into a very similar problem.

After putting OwnCloud in maintenance mode and upgrading the docker image, I've run ./occ upgrade inside the container. I've then hit a DB migration issue (solved with #28695 (comment)), and after that, I hit the issue mentioned here

After reading the thread here I realized the /apps directory of my installation was mount as an external volume in docker, so I could have had old files there. I solve it by doing the following:

  • put OC in maintenance mode again
  • rerun the container without the apps volume mounted, getting access to the "updated apps"
  • move out the old apps, and copying the ones from inside the container to the host volume
  • run the container back with the apps volume
  • run ./occ upgrade again (here it asked to disable some apps manually)
  • take out from maintenance mode

It's (more or less) clear that one should keep only /data and /config when upgrading OC, but this is kind of out of the user's direct control when running under docker. Maybe there could be a warning/instruction with different instructions in this case?

@lock
Copy link

lock bot commented Aug 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 2, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants