nextcloud / groupfolders

📁👩‍👩‍👧‍👦 Admin-configured folders shared by everyone in a group. https://github.com/nextcloud-releases/groupfolders
https://apps.nextcloud.com/apps/groupfolders
279 stars 85 forks source link

GroupFolders and BackgroundJob: Failed to remove item from trashbin #2067

Open MaxiReglisse opened 2 years ago

MaxiReglisse commented 2 years ago

I observe many messages in nextcloud.log which relate to the GroupFolders application during background jobs.

In summary: Failed to remove item from trashbin

More in detail:

{"reqId":"WppLnqNirtynluJextbN","level":3,"time":"2022-08-21T14:30:33+00:00","remoteAddr":"","user":"--",
"app":"core","method":"","url":"--","message":"Error while running background job 
(class: OCA\\GroupFolders\\BackgroundJob\\ExpireGroupTrash, arguments: )","userAgent":"--","version":"24.0.3.2",
"exception":{"Exception":"Exception","Message":"Failed to remove item from trashbin","Code":0,
"Trace":[{"file":"/var/www/owncloud/apps/groupfolders/lib/BackgroundJob/ExpireGroupTrash.php","line":58,
"function":"expire","class":"OCA\\GroupFolders\\Trash\\TrashBackend","type":"->"},
{"file":"/var/www/owncloud/lib/public/BackgroundJob/Job.php","line":79,
"function":"run","class":"OCA\\GroupFolders\\BackgroundJob\\ExpireGroupTrash","type":"->"},
{"file":"/var/www/owncloud/lib/public/BackgroundJob/TimedJob.php","line":95,
"function":"execute","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/owncloud/cron.php",
"line":151,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],
"File":"/var/www/owncloud/apps/groupfolders/lib/Trash/TrashBackend.php","Line":394,"message":
"Error while running background job (class: OCA\\GroupFolders\\BackgroundJob\\ExpireGroupTrash, arguments: )",
"CustomMessage":
"Error while running background job (class: OCA\\GroupFolders\\BackgroundJob\\ExpireGroupTrash, arguments: )"}}

My config:

Nextcloud version: 24.0.3 Group Folders: 12.0.1 Operating system and version: Debian 11 Apache: 2.4.54-1~deb11u1 PHP version: 7.4.30 local storage no encryption

Steps to reproduce

The problem is traced in the logs every hour during background jobs

no error in /var/log/apache2/error.log

I asked the same question on the community forum, but without success... https://help.nextcloud.com/t/groupfolders-and-backgroundjob-failed-to-remove-item-from-trashbin/143737

Thanks in advance for any help.

Ernest.

ClCfe commented 2 years ago

personnally I ve many problems with trashed items of group folders

If it doesn't mind, try to empty the trash of the specific group folder:

sudo -u www-data ./occ groupfolders:trashbin:cleanup <group_folder_id>

you can find the folder id using

sudo -u www-data ./occ groupfolders:list
MaxiReglisse commented 2 years ago

Thank you for your suggestion, it works very well at the command line indeed. so how to explain that the background jobs generate all these error messages?

jngrb commented 2 years ago

In a nextcloud instance that I maintain, we experience the same problem (NC 24.0.2, groupfolders v12.0.1):

The trashbin was not automatically cleaned for file whose retention expired (trashbin_retention_obligation=auto, 30 and versions_retention_obligation=auto, 30). And a manual expiration (occ groupfolders:expire) run into the "Failed to remove item from trashbin" error.

The workaround was to clean any trashbin files (occ groupfolders:trashbin:cleanup). After that "fix" the command occ groupfolders:expire completes again and I would assume that the automatic cleanup after the retention expiration also works again.

Due to the amount of data that got accumulated in our trashbin, we cannot identify the problematic file in retrospective.

I hope the problem can be fixed without such details, as the complete cleanup of the trashbin is a nuisance.

MaxiReglisse commented 2 years ago

I confirm that a manual expiration (occ groupfolders:expire) run into the "Failed to remove item from trashbin" error.

The workaround you proposed to clean any trashbin files (occ groupfolders:trashbin:cleanup) worked perfectly!

And there are no more errors in the logs... thank you very much, Jan.

Emi94 commented 1 year ago

Hi, I'm having the same problem on one instance with NC 24.0.5, GF 12.0.2 and php7.4. When I manually run occ groupfolders:expire, the output message shows like the expiring for groupfolders work (even though no old trash is being deleted), but then it fails on the second to last groupfolder. This is how the last part of the output looks like:

Expiring version in 'Human Resources'
Expiring version in 'Videos'
Expiring version in 'TEST HR Shares'

In TrashBackend.php line 625:

  [Exception]                          
  Failed to remove item from trashbin  

Exception trace:
  at /var/www/nextcloud/apps/groupfolders/lib/Trash/TrashBackend.php:625
 OCA\GroupFolders\Trash\TrashBackend->expire() at /var/www/nextcloud/apps/groupfolders/lib/Command/ExpireGroup/ExpireGroupVersionsTrash.php:56
 OCA\GroupFolders\Command\ExpireGroup\ExpireGroupVersionsTrash->execute() at /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /var/www/nextcloud/core/Command/Base.php:168
 OC\Core\Command\Base->run() at /var/www/nextcloud/3rdparty/symfony/console/Application.php:1009
 Symfony\Component\Console\Application->doRunCommand() at /var/www/nextcloud/3rdparty/symfony/console/Application.php:273
 Symfony\Component\Console\Application->doRun() at /var/www/nextcloud/3rdparty/symfony/console/Application.php:149
 Symfony\Component\Console\Application->run() at /var/www/nextcloud/lib/private/Console/Application.php:211
 OC\Console\Application->run() at /var/www/nextcloud/console.php:100
 require_once() at /var/www/nextcloud/occ:11

groupfolders:expire [--output [OUTPUT]]

I also tried to run occ groupfolders:expire -vvv in the hope it will show more details, but I get the same.

As per the first answer to this issue I tried to run occ groupfolders:trashbin:cleanup <TEST HR Shares id> and the same for the groupfolder that was supposed to come after, as I did not know exactly on which one it failed exactly. NOTE: both groupfolders had no items in the trash before running the cleanup commands. But even after this, occ groupfolders:expire still fails at the same step.

Unfortunately I can't cleanup the trash for all groupfolders as this is a production instance. Anyone got other ideas how to debug/fix the problem?

caguiar commented 1 year ago

Hi, I'm having the same problem on one instance with NC 24.0.7, GF 12.0.2 and php8.1. Not only do I get the error cron job, but I even get the error if I go to Trashbin, select the file that I identified is causing the issue and try to "Delete permanently" that specific file.

FahrJo commented 1 year ago

Hi, I had the same issue (NC 24.0.9, GF12.02, php8.0). It seemed that some files where deleted from filesystem but not from the database. I deleted the database entries manually to make DB and FS consistent again. Now the error is gone. For me it seems that the actual root cause is much older but the errors only started appearing in a newer version.

punkyard commented 10 months ago

hi, #metoo tones of errors like this one in logs for AiO 7.7.1 NC 17.1.4

[groupfolders] Error: Failed to remove item from trashbin: /groupfolders/trash/16/20231001003.jpg.d1696955445 at 2023-12-07T14:02:45+00:00

no user seems able to empty their bins we mainly use groupfolders (about 10 different groups and folders)

just letting you know have a great day

Skammi commented 8 months ago

Ok same issue NC 28.01. I got tired from it and decided to remove Groupfolders. In de admin account I move the data to separated folders and shared those with the groups already created for GF. Then disabled the GroupFolders app. Restarted apache php Error continued.

Then removed the app. Restarted apache php Error continued.

Then listed the background jobs, job is not in that list. Removed the __groupfolders directory from the system and the data from the DB. Restarted apache php Error continued.

Run find and grep for groupfolders on files system and removed traces or disabled files. Restarted system Error continued.

I'm no contemplating to make a new instance with the desired config (without groupfolders) and migrate the data to the new instance.

here the data of the current system.

jac:/var/www/nextcloud$ date
Sat Jan 27 06:45:37 PM CST 2024

jac:/var/www/nextcloud$ sudo -u www-data php --define apc.enable_cli=1 occ config:list groupfolders
{
    "apps": {
        "groupfolders": []
    }
}

jac:/var/www/nextcloud$ sudo -u www-data php --define apc.enable_cli=1 occ background-job:list
+------+-----------------------------------------------------------------+---------------------------+----------+
| id   | class                                                           | last_run                  | argument |
+------+-----------------------------------------------------------------+---------------------------+----------+
| 1    | OCA\NextcloudAnnouncements\Cron\Crawler                         | 2024-01-27T10:00:02+00:00 | null     |
| 2    | OCA\UserStatus\BackgroundJob\ClearOldStatusesBackgroundJob      | 2024-01-28T00:40:01+00:00 | null     |
| 3    | OCA\OAuth2\BackgroundJob\CleanupExpiredAuthorizationCode        | 2023-12-31T01:42:55+00:00 | null     |
| 4    | OCA\ContactsInteraction\BackgroundJob\CleanupJob                | 2024-01-27T16:45:01+00:00 | null     |
| 5    | OCA\Activity\BackgroundJob\EmailNotification                    | 2024-01-28T00:40:01+00:00 | null     |
| 6    | OCA\Activity\BackgroundJob\ExpireActivities                     | 2024-01-27T16:45:01+00:00 | null     |
| 7    | OCA\Activity\BackgroundJob\DigestMail                           | 2024-01-28T00:20:02+00:00 | null     |
| 8    | OCA\Files\BackgroundJob\ScanFiles                               | 2024-01-28T00:40:01+00:00 | null     |
| 9    | OCA\Files\BackgroundJob\DeleteOrphanedItems                     | 2024-01-28T00:20:02+00:00 | null     |
| 10   | OCA\Files\BackgroundJob\CleanupFileLocks                        | 2024-01-28T00:35:01+00:00 | null     |
| 11   | OCA\Files\BackgroundJob\CleanupDirectEditingTokens              | 2024-01-28T00:40:01+00:00 | null     |
| 12   | OCA\Files\BackgroundJob\DeleteExpiredOpenLocalEditor            | 2024-01-27T16:05:01+00:00 | null     |
| 13   | OCA\Support\BackgroundJobs\CheckSubscription                    | 2024-01-28T00:40:01+00:00 | null     |
| 14   | OCA\Notifications\BackgroundJob\GenerateUserSettings            | 2024-01-27T02:40:02+00:00 | null     |
| 15   | OCA\Notifications\BackgroundJob\SendNotificationMails           | 2024-01-28T00:40:01+00:00 | null     |
| 16   | OCA\Files_Trashbin\BackgroundJob\ExpireTrash                    | 2024-01-28T00:35:01+00:00 | null     |
| 17   | OCA\DAV\BackgroundJob\CleanupDirectLinksJob                     | 2024-01-27T02:40:02+00:00 | null     |
| 18   | OCA\DAV\BackgroundJob\UpdateCalendarResourcesRoomsBackgroundJob | 2024-01-28T00:00:02+00:00 | null     |
| 19   | OCA\DAV\BackgroundJob\CleanupInvitationTokenJob                 | 2024-01-27T02:40:02+00:00 | null     |
| 20   | OCA\DAV\BackgroundJob\EventReminderJob                          | 2024-01-28T00:40:01+00:00 | null     |
| 21   | OCA\DAV\BackgroundJob\CalendarRetentionJob                      | 2024-01-27T20:50:02+00:00 | null     |
| 22   | OCA\DAV\BackgroundJob\PruneOutdatedSyncTokensJob                | 2024-01-27T02:25:02+00:00 | null     |
| 23   | OCA\Text\Cron\Cleanup                                           | 2024-01-28T00:40:01+00:00 | null     |
| 24   | OCA\WorkflowEngine\BackgroundJobs\Rotate                        | 2024-01-28T00:15:02+00:00 | null     |
| 25   | OCA\Circles\Cron\Maintenance                                    | 2024-01-28T00:40:01+00:00 | null     |
| 26   | OCA\UpdateNotification\Notification\BackgroundJob               | 2024-01-27T02:30:02+00:00 | null     |
| 27   | OCA\Photos\Jobs\AutomaticPlaceMapperJob                         | 2024-01-27T02:30:30+00:00 | null     |
| 28   | OCA\Files_Sharing\DeleteOrphanedSharesJob                       | 2024-01-28T00:25:03+00:00 | null     |
| 29   | OCA\Files_Sharing\ExpireSharesJob                               | 2024-01-27T02:30:30+00:00 | null     |
| 30   | OCA\Files_Sharing\BackgroundJob\FederatedSharesDiscoverJob      | 2024-01-27T02:30:30+00:00 | null     |
| 31   | OCA\ServerInfo\Jobs\UpdateStorageStats                          | 2024-01-28T00:25:03+00:00 | null     |
| 32   | OCA\Federation\SyncJob                                          | 2024-01-27T02:30:30+00:00 | null     |
| 33   | OCA\Files_Versions\BackgroundJob\ExpireVersions                 | 2024-01-28T00:35:01+00:00 | null     |
| 34   | OCA\FilesReminders\BackgroundJob\CleanUpReminders               | 2024-01-27T02:30:30+00:00 | null     |
| 35   | OCA\FilesReminders\BackgroundJob\ScheduledNotifications         | 2024-01-28T00:40:01+00:00 | null     |
| 36   | OC\Authentication\Token\TokenCleanupJob                         | 2024-01-27T15:15:02+00:00 | null     |
| 37   | OC\Log\Rotate                                                   | 2024-01-28T00:40:01+00:00 | null     |
| 38   | OC\Preview\BackgroundCleanupJob                                 | 2024-01-27T23:55:02+00:00 | null     |
| 39   | OC\TextProcessing\RemoveOldTasksBackgroundJob                   | 2024-01-27T15:15:02+00:00 | null     |
| 49   | OCA\Calendar\BackgroundJob\CleanUpOutdatedBookingsJob           | 2024-01-27T15:10:02+00:00 | null     |
| 50   | OCA\Contacts\Cron\SocialUpdateRegistration                      | 2024-01-27T17:55:02+00:00 | null     |
| 51   | OCA\Mail\BackgroundJob\CleanupJob                               | 2024-01-27T15:10:02+00:00 | null     |
| 52   | OCA\Mail\BackgroundJob\OutboxWorkerJob                          | 2024-01-28T00:35:01+00:00 | null     |
| 53   | OCA\Mail\BackgroundJob\IMipMessageJob                           | 2024-01-28T00:10:02+00:00 | null     |
| 54   | OCA\Mail\BackgroundJob\DraftsJob                                | 2024-01-28T00:35:01+00:00 | null     |
| 55   | OCA\Mail\BackgroundJob\TrashRetentionJob                        | 2024-01-27T15:10:02+00:00 | null     |
| 56   | OCA\Mail\BackgroundJob\WakeJob                                  | 2024-01-28T00:40:01+00:00 | null     |
| 57   | OCA\Richdocuments\Backgroundjobs\ObtainCapabilities             | 2024-01-27T23:40:02+00:00 | null     |
| 58   | OCA\Richdocuments\Backgroundjobs\Cleanup                        | 2024-01-27T23:40:02+00:00 | null     |
| 59   | OCA\Talk\BackgroundJob\CheckHostedSignalingServer               | 2024-01-28T00:05:02+00:00 | null     |
| 60   | OCA\Talk\BackgroundJob\CheckMatterbridges                       | 2024-01-28T00:35:01+00:00 | null     |
| 63   | OCA\Talk\BackgroundJob\ExpireChatMessages                       | 2024-01-28T00:35:01+00:00 | null     |
| 64   | OCA\Talk\BackgroundJob\ExpireSignalingMessage                   | 2024-01-28T00:35:01+00:00 | null     |
| 65   | OCA\Talk\BackgroundJob\Reminder                                 | 2024-01-28T00:40:01+00:00 | null     |
| 66   | OCA\Talk\BackgroundJob\RemoveEmptyRooms                         | 2024-01-28T00:35:01+00:00 | null     |
| 67   | OCA\Talk\BackgroundJob\ResetAssignedSignalingServer             | 2024-01-28T00:35:02+00:00 | null     |
| 8713 | OC\Core\BackgroundJobs\CleanupLoginFlowV2                       | 2024-01-27T23:40:02+00:00 | null     |
| 8714 | OC\Security\Bruteforce\CleanupJob                               | 2024-01-27T15:15:02+00:00 | null     |
| 8716 | OC\TextToImage\RemoveOldTasksBackgroundJob                      | 2024-01-27T15:15:02+00:00 | null     |
+------+-----------------------------------------------------------------+---------------------------+----------+

jac:/var/www/nextcloud$ sudo -u www-data tail -1 /var/data/nextcloud/nextcloud.log
{"reqId":"KhQ3GZBz9VzAPHSCUFJY","level":3,"time":"2024-01-28T00:45:04+00:00","remoteAddr":"","user":"--
","app":"core","method":"","url":"--","message":"Error while running background job (class: 
OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions, arguments: )","userAgent":"--","version":"28.0.1.1","exception":
{"Exception":"OC\\DB\\Exceptions\\DbalException","Message":"An exception occurred while executing a query: 
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '96104-1704228648' for key 
'gf_versions_uniq_index'","Code":1062,"Trace":
[{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":328,"function":"wrap","class":"OC\\DB\\Exceptions\\DbalException","type":"::"},
{"file":"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":137,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},
{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php","line":88,"function":"insert","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},
{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php","line":72,"function":"getVersionsForFile","class":"OCA\\GroupFolders\\Versions\\VersionsBackend","type":"->"},
{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php","line":59,"function":"expireFolder","class":"OCA\\GroupFolders\\Versions\\GroupVersionsExpireManager","type":"->"},
{"file":"/var/www/nextcloud/apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php","line":43,"function":"expireAll","class":"OCA\\GroupFolders\\Versions\\GroupVersionsExpireManager","type":"->"},
{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":81,"function":"run","class":"OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions","type":"->"},
{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},
{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},
{"file":"/var/www/nextcloud/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"-
>"}],"File":"/var/www/nextcloud/lib/private/DB/Exceptions/DbalException.php","Line":71,"Previous":
{"Exception":"Doctrine\\DBAL\\Exception\\UniqueConstraintViolationException","Message":"An exception occurred while 
executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '96104-1704228648' for key 
'gf_versions_uniq_index'","Code":1062,"Trace":
[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1938,"function":"convert","class":"Doctrine\\
DBAL\\Driver\\API\\MySQL\\ExceptionConverter","type":"->"},
{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1880,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1208,"function":"convertExceptionDuringQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":294,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":386,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":326,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":137,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php","line":88,"function":"insert","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php","line":72,"function":"getVersionsForFile","class":"OCA\\GroupFolders\\Versions\\VersionsBackend","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php","line":59,"function":"expireFolder","class":"OCA\\GroupFolders\\Versions\\GroupVersionsExpireManager","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php","line":43,"function":"expireAll","class":"OCA\\GroupFolders\\Versions\\GroupVersionsExpireManager","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":81,"function":"run","class":"OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php","Line":62,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '96104-1704228648' for key 'gf_versions_uniq_index'","Code":1062,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":132,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1202,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":294,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":386,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":326,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":137,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php","line":88,"function":"insert","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php","line":72,"function":"getVersionsForFile","class":"OCA\\GroupFolders\\Versions\\VersionsBackend","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php","line":59,"function":"expireFolder","class":"OCA\\GroupFolders\\Versions\\GroupVersionsExpireManager","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php","line":43,"function":"expireAll","class":"OCA\\GroupFolders\\Versions\\GroupVersionsExpireManager","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":81,"function":"run","class":"OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":28,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '96104-1704228648' for key 'gf_versions_uniq_index'","Code":"23000","Trace":
[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":130,"function":"execute","class":"PDOStatement","type":"->"},
{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1202,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->"},
{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":294,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->"},
{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":386,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->"},
{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},
{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":326,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},
{"file":"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":137,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},
{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php","line":88,"function":"insert","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},
{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php","line":72,"function":"getVersionsForFile","class":"OCA\\GroupFolders\\Versions\\VersionsBackend","type":"->"},
{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php","line":59,"function":"expireFolder","class":"OCA\\GroupFolders\\Versions\\GroupVersionsExpireManager","type":"->"},
{"file":"/var/www/nextcloud/apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php","line":43,"function":"expireAll","class":"OCA\\GroupFolders\\Versions\\GroupVersionsExpireManager","type":"->"},
{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":81,"function":"run","class":"OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions","type":"->"},
{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\Background
Job\\Job","type":"->"},
{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJ
ob\\TimedJob","type":"->"},
{"file":"/var/www/nextcloud/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"-
>"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","Line":130}}},"message":"Error while 
running background job (class: OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions, arguments: )","exception":
{},"CustomMessage":"Error while running background job (class: OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions,
 arguments: )"}}

jac:/var/www/nextcloud$ ls -l ./apps/
total 216
drwxr-xr-x 11 www-data www-data 4096 Dec 21 09:34 activity
drwxr-xr-x  6 www-data www-data 4096 Dec 21 09:34 admin_audit
drwxr-xr-x  9 www-data www-data 4096 Dec 21 09:34 bruteforcesettings
drwxr-xr-x 11 www-data www-data 4096 Jan 26 09:01 calendar
drwxr-xr-x 12 www-data www-data 4096 Dec 21 09:34 circles
drwxr-xr-x  6 www-data www-data 4096 Dec 21 09:34 cloud_federation_api
drwxr-xr-x  7 www-data www-data 4096 Dec 21 09:34 comments
drwxr-xr-x 11 www-data www-data 4096 Jan 13 11:45 contacts
drwxr-xr-x  6 www-data www-data 4096 Dec 21 09:34 contactsinteraction
drwxr-xr-x  9 www-data www-data 4096 Dec 21 09:34 dashboard
drwxr-xr-x  9 www-data www-data 4096 Dec 21 09:34 dav
drwxr-xr-x 10 www-data www-data 4096 Dec 21 09:34 encryption
drwxr-xr-x  9 www-data www-data 4096 Dec 21 09:34 federatedfilesharing
drwxr-xr-x 10 www-data www-data 4096 Dec 21 09:34 federation
drwxr-xr-x 11 www-data www-data 4096 Dec 21 09:34 files
drwxr-xr-x 12 www-data www-data 4096 Dec 21 09:34 files_external
drwxr-xr-x  9 www-data www-data 4096 Dec 21 09:34 files_pdfviewer
drwxr-xr-x  7 www-data www-data 4096 Dec 21 09:34 files_reminders
drwxr-xr-x 10 www-data www-data 4096 Dec 21 09:34 files_sharing
drwxr-xr-x  8 www-data www-data 4096 Dec 21 09:34 files_trashbin
drwxr-xr-x  7 www-data www-data 4096 Dec 21 09:34 files_versions
drwxr-xr-x  9 www-data www-data 4096 Dec 21 09:34 firstrunwizard
drwxr-xr-x 10 www-data www-data 4096 Dec 21 09:34 logreader
drwxr-xr-x  6 www-data www-data 4096 Dec 21 09:29 lookup_server_connector
drwxr-xr-x 12 www-data www-data 4096 Jan 26 09:01 mail
drwxr-xr-x  6 www-data www-data 4096 Dec 21 09:34 nextcloud_announcements
drwxr-xr-x 10 www-data www-data 4096 Dec 30 19:42 notes
drwxr-xr-x 10 www-data www-data 4096 Dec 21 09:34 notifications
drwxr-xr-x  7 www-data www-data 4096 Dec 21 09:34 oauth2
drwxr-xr-x  9 www-data www-data 4096 Dec 21 09:34 password_policy
drwxr-xr-x 11 www-data www-data 4096 Dec 21 09:34 photos
drwxr-xr-x  8 www-data www-data 4096 Dec 21 09:34 privacy
drwxr-xr-x  7 www-data www-data 4096 Dec 21 09:34 provisioning_api
drwxr-xr-x  6 www-data www-data 4096 Dec 21 09:34 recommendations
drwxr-xr-x  8 www-data www-data 4096 Dec 21 09:34 related_resources
drwxr-xr-x 17 www-data www-data 4096 Jan 13 11:45 richdocuments
drwxr-xr-x  9 www-data www-data 4096 Dec 21 09:34 serverinfo
drwxr-xr-x 11 www-data www-data 4096 Dec 21 09:34 settings
drwxr-xr-x  8 www-data www-data 4096 Dec 21 09:34 sharebymail
drwxr-xr-x 12 www-data www-data 4096 Jan 26 09:01 spreed
drwxr-xr-x 10 www-data www-data 4096 Dec 21 09:34 support
drwxr-xr-x  9 www-data www-data 4096 Dec 21 09:34 survey_client
drwxr-xr-x 11 www-data www-data 4096 Dec 21 09:34 suspicious_login
drwxr-xr-x  8 www-data www-data 4096 Dec 21 09:34 systemtags
drwxr-xr-x  9 www-data www-data 4096 Dec 21 09:34 text
drwxr-xr-x 11 www-data www-data 4096 Dec 21 09:34 theming
drwxr-xr-x  8 www-data www-data 4096 Dec 21 09:34 twofactor_backupcodes
drwxr-xr-x 12 www-data www-data 4096 Dec 21 09:34 twofactor_totp
drwxr-xr-x  9 www-data www-data 4096 Dec 21 09:34 updatenotification
drwxr-xr-x 11 www-data www-data 4096 Dec 21 09:34 user_ldap
drwxr-xr-x  8 www-data www-data 4096 Dec 21 09:34 user_status
drwxr-xr-x  8 www-data www-data 4096 Dec 21 09:34 viewer
drwxr-xr-x  7 www-data www-data 4096 Dec 21 09:34 weather_status
drwxr-xr-x  8 www-data www-data 4096 Dec 21 09:34 workflowengine

jac:/var/www/nextcloud$ sudo -u www-data php --define apc.enable_cli=1 occ status
  - installed: true
  - version: 28.0.1.1
  - versionstring: 28.0.1
  - edition: 
  - maintenance: false
  - needsDbUpgrade: false
  - productname: Nextcloud
  - extendedSupport: false

jac:/var/www/nextcloud$ sudo -u www-data php --define apc.enable_cli=1 occ app:list
Enabled:
  - activity: 2.20.0
  - bruteforcesettings: 2.8.0
  - calendar: 4.6.4
  - circles: 28.0.0-dev
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contacts: 5.5.1
  - contactsinteraction: 1.9.0
  - dashboard: 7.8.0
  - dav: 1.29.1
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - mail: 3.5.5
  - nextcloud_announcements: 1.17.0
  - notes: 4.9.2
  - notifications: 2.16.0
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - photos: 2.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - richdocuments: 8.3.1
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - spreed: 18.0.2
  - support: 1.11.0
  - survey_client: 1.16.0
  - systemtags: 1.18.0
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - updatenotification: 1.18.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - admin_audit: 1.18.0
  - encryption: 2.16.0
  - files_external: 1.20.0
  - suspicious_login: 6.0.0
  - twofactor_totp: 10.0.0-beta.2
  - user_ldap: 1.19.0

jac:/var/www/nextcloud$ date
Sat Jan 27 06:53:21 PM CST 2024
punkyard commented 7 months ago

hi, is this issue getting any attention? isn't it a major issue? we have now gigs of files that can't be removed.. could any one helps - or give a work around - to get rid of those files?

thanks a lot :)

Capture d’écran 2024-02-18 à 16 44 38