Server: Repair step 'OCA\DAV\Migration\FixBirthdayCalendarComponent' is unknown

Created on 9 Mar 2017  路  6Comments  路  Source: nextcloud/server

Steps to reproduce

  • Install current Owncloud version 9.1.4
  • Update to Nextcloud 10.0.4
  • Update to Nextcloud 11.0.2

Expected behaviour

No error should be existent

Actual behaviour

I upgraded my current Owncloud installation to the current Nextcloud release as stated on https://nextcloud.com/migration/ - Upgrade Path. An error was logged:

Error   migration   Exception: Repair step 'OCA\DAV\Migration\GenerateBirthdays' is unknown

/var/www/owncloud/lib/private/Migration/BackgroundRepair.php - line 91: OC\Repair->addStep('OCA\\DAV\\Migrati...')
/var/www/owncloud/lib/private/BackgroundJob/Job.php - line 53: OC\Migration\BackgroundRepair->run(Array)
/var/www/owncloud/lib/private/BackgroundJob/TimedJob.php - line 54: OC\BackgroundJob\Job->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))
/var/www/owncloud/lib/private/Migration/BackgroundRepair.php - line 64: OC\BackgroundJob\TimedJob->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))
/var/www/owncloud/cron.php - line 128: OC\Migration\BackgroundRepair->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))
{main}

Also the occ repair function throws the error

root@pi:/var/www# sudo -u www-data php owncloud/occ maintenance:repair
Nextcloud is in maintenance mode - no apps have been loaded
Failed to load repair step for dav: Repair step 'OCA\DAV\Migration\FixBirthdayCalendarComponent' is unknown
Failed to load repair step for dav: Repair step 'OCA\DAV\Migration\ValueFixInsert' is unknown
 - Repair MySQL collation
     - Not a mysql database -> nothing to no
 - Repair mime types
 - Repair legacy storages
 - Remove asset cache
     - Asset cache cleared.
 - Generate ETags for file where no ETag is present.
     - ETags have been fixed for 0 files/folders.
 - Clean tags and favorites
     - 0 tags of deleted users have been removed.
     - 0 tags for delete files have been removed.
     - 0 tag entries for deleted tags have been removed.
     - 0 tags with no entries have been removed.
 - Drop old database tables
 31/31 [============================] 100%
 - Drop old background jobs
 - Remove getetag entries in properties table
     - Removed 0 unneeded "{DAV:}getetag" entries from properties table.
 - Repair outdated OCS IDs
 - Repair invalid shares
 - Remove old share propagation app entries
 - Remove old (< 9.0) calendar/contact shares
 4/4 [============================] 100%
 - Fix permissions so avatars can be stored again
 2/2 [============================] 100%
 - Remove shares of a users root folder
 - Repair unmerged shares
 - Move .step file of updater to backup location
 - Add move avatar background job
     - Repair step already executed
 - Add preview cleanup background jobs
 - Fix potential broken mount points
     - No mounts updated

I read about a simliar error here https://github.com/nextcloud/server/issues/2566. Seems I upgraded too fast? I directly upgraded with about one minute between the updates to activate the apps again.

  • How do I get rid of the error?
  • Do I need to perform the update again?

Server configuration

Operating system:
Raspbian (Debian Jessie) on Raspberry Pi 2

Web server:
nginx 1.7.10

Database:
Type: sqlite3
Version: 3.8.7
Size: 3.8 MB

PHP version:
Version: 5.6.29
Memory Limit: 512.0 MB
Max Execution Time: 3600
Upload max size: 511.0 MB

Nextcloud version:
11.0.2

Updated from an older Nextcloud/ownCloud or fresh install:
Yes, update from Owncloud 9.1.4

Where did you install Nextcloud from:
Downloads given here https://nextcloud.com/changelog

Are you using external storage, if yes which one:
no

Are you using encryption:
no

Are you using an external user-backend, if yes which one:
no

dav needs info

Most helpful comment

Ok, now I understood the whole magic and the error log in my original post is clear about it. Nextcloud is in maintenance mode, which means, no apps are loaded. If no apps are loaded, the Repair classes of the Calendar app are not loaded, too. So they can't be found.

The maintenance:repair has to be done, when Nextcloud is not in maintenance (see last three lines):

root@pi:/var/www/owncloud# sudo -u www-data php occ maintenance:repair
 - Repair MySQL collation
     - Not a mysql database -> nothing to no
 - Repair mime types
 - Repair legacy storages
 - Remove asset cache
     - Asset cache cleared.
 - Generate ETags for file where no ETag is present.
     - ETags have been fixed for 0 files/folders.
 - Clean tags and favorites
     - 0 tags of deleted users have been removed.
     - 0 tags for delete files have been removed.
     - 0 tag entries for deleted tags have been removed.
     - 0 tags with no entries have been removed.
 - Drop old database tables
 31/31 [============================] 100%
 - Drop old background jobs
 - Remove getetag entries in properties table
     - Removed 0 unneeded "{DAV:}getetag" entries from properties table.
 - Repair outdated OCS IDs
 - Repair invalid shares
 - Remove old share propagation app entries
 - Remove old (< 9.0) calendar/contact shares
 4/4 [============================] 100%
 - Fix permissions so avatars can be stored again
 2/2 [============================] 100%
 - Remove shares of a users root folder
 - Repair unmerged shares
 - Move .step file of updater to backup location
 - Add move avatar background job
     - Repair step already executed
 - Add preview cleanup background jobs
 - Fix potential broken mount points
     - No mounts updated
 - Fix component of birthday calendars
     - 5 birthday calendars updated.
 - Insert ValueFix background job for each user

All 6 comments

Can you make sure you have the apps/dav/lib/Migration/ folder of the new package uploaded including the 3 files?
Seems like this is not the case

I have the three mentioned files in place within the folder

pi@pi /var/www/owncloud/apps/dav/lib/Migration $ ls -la
total 20
drwxr-xr-x  2 www-data www-data 4096 Feb 26 20:42 .
drwxr-xr-x 13 www-data www-data 4096 Feb 26 20:42 ..
-rw-r--r--  1 www-data www-data 1722 Feb 26 20:42 FixBirthdayCalendarComponent.php
-rw-r--r--  1 www-data www-data 1854 Feb 26 20:42 ValueFixInsert.php
-rw-r--r--  1 www-data www-data 2284 Feb 26 20:42 ValueFix.php

Hello,
can anybody give me an answer to my questions:

How do I get rid of the error?
Do I need to perform the update again?

Regards,

Mario

Well you can get rid of the issue, by removing the row from oc_jobs. But I would recommend to try to find out why it is not found instead.

Ok, now I understood the whole magic and the error log in my original post is clear about it. Nextcloud is in maintenance mode, which means, no apps are loaded. If no apps are loaded, the Repair classes of the Calendar app are not loaded, too. So they can't be found.

The maintenance:repair has to be done, when Nextcloud is not in maintenance (see last three lines):

root@pi:/var/www/owncloud# sudo -u www-data php occ maintenance:repair
 - Repair MySQL collation
     - Not a mysql database -> nothing to no
 - Repair mime types
 - Repair legacy storages
 - Remove asset cache
     - Asset cache cleared.
 - Generate ETags for file where no ETag is present.
     - ETags have been fixed for 0 files/folders.
 - Clean tags and favorites
     - 0 tags of deleted users have been removed.
     - 0 tags for delete files have been removed.
     - 0 tag entries for deleted tags have been removed.
     - 0 tags with no entries have been removed.
 - Drop old database tables
 31/31 [============================] 100%
 - Drop old background jobs
 - Remove getetag entries in properties table
     - Removed 0 unneeded "{DAV:}getetag" entries from properties table.
 - Repair outdated OCS IDs
 - Repair invalid shares
 - Remove old share propagation app entries
 - Remove old (< 9.0) calendar/contact shares
 4/4 [============================] 100%
 - Fix permissions so avatars can be stored again
 2/2 [============================] 100%
 - Remove shares of a users root folder
 - Repair unmerged shares
 - Move .step file of updater to backup location
 - Add move avatar background job
     - Repair step already executed
 - Add preview cleanup background jobs
 - Fix potential broken mount points
     - No mounts updated
 - Fix component of birthday calendars
     - 5 birthday calendars updated.
 - Insert ValueFix background job for each user

Thank you soo much! To execute the occ maintenance:repair without maintenance mode being turned on was the missing information!

Maybe this could be documented when running into this problem? At least a hint, maybe something like:

Repair step ... is unknown.
Hint: make sure, maintenance mode is turned off to repair app data.

What do you think about that?

Was this page helpful?
0 / 5 - 0 ratings