Hello,
I’m using the files automated tagging app since a few months now.
App version: 1.6.0
NC Version 16.0.1
For some reason I wanted to rescan all the files contained in the cloud, so I issued sudo -u www-data php occ files:scan --all
. After the process was running for a while, I got following error:
Exception during scan: An exception occurred while executing 'SELECT * FROM "oc_systemtag" WHERE "id" IN (?) ORDER BY "name" ASC, "visibility" ASC, "editable" ASC' with params ["12"]:
SQLSTATE[25P02]: In failed sql transaction: 7 FEHLER: aktuelle Transaktion wurde abgebrochen, Befehle werden bis zum Ende der Transaktion ignoriert
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(184): Doctrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(158): Doctrine\DBAL\DBALException::wrapException(Object(Doctrine\DBAL\Driver\PDOPgSql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'An exception oc...')
#2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(938): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOPgSql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'SELECT * FROM "...', Array)
#3 /var/www/nextcloud/lib/private/DB/Connection.php(195): Doctrine\DBAL\Connection->executeQuery('SELECT * FROM "...', Array, Array, NULL)
#4 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(219): OC\DB\Connection->executeQuery('SELECT * FROM "...', Array, Array)
#5 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(214): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/nextcloud/lib/private/SystemTag/SystemTagManager.php(115): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/nextcloud/apps/systemtags/lib/Activity/Listener.php(161): OC\SystemTag\SystemTagManager->getTagsByIds(Array)
#8 /var/www/nextcloud/apps/systemtags/appinfo/app.php(56): OCA\SystemTags\Activity\Listener->mapperEvent(Object(OCP\SystemTag\MapperEvent))
#9 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(212): OC_App::{closure}(Object(OCP\SystemTag\MapperEvent), 'OCP\\SystemTag\\I...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#10 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(44): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'OCP\\SystemTag\\I...', Object(OCP\SystemTag\MapperEvent))
#11 /var/www/nextcloud/lib/private/SystemTag/SystemTagObjectMapper.php(170): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('OCP\\SystemTag\\I...', Object(OCP\SystemTag\MapperEvent))
#12 /var/www/nextcloud/apps/files_automatedtagging/lib/Operation.php(76): OC\SystemTag\SystemTagObjectMapper->assignTags('94757', 'files', Array)
#13 /var/www/nextcloud/apps/files_automatedtagging/lib/CacheListener.php(45): OCA\FilesAutomatedTagging\Operation->checkOperations(Object(OCA\Files_Trashbin\Storage), 94757, 'files/Dokumente...')
#14 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(212): OCA\FilesAutomatedTagging\CacheListener->onCacheEvent(Object(OCP\Files\Cache\CacheUpdateEvent), 'OCP\\Files\\Cache...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#15 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(44): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'OCP\\Files\\Cache...', Object(OCP\Files\Cache\CacheUpdateEvent))
#16 /var/www/nextcloud/lib/private/Files/Cache/Cache.php(345): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('OCP\\Files\\Cache...', Object(OCP\Files\Cache\CacheUpdateEvent))
#17 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(417): OC\Files\Cache\Cache->update(94757, Array)
#18 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(409): OC\Files\Cache\Scanner->scanChildren('files/Dokumente...', true, 3, 94757, true)
#19 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(409): OC\Files\Cache\Scanner->scanChildren('files/Dokumente...', true, 3, 94752, true)
#20 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(338): OC\Files\Cache\Scanner->scanChildren('files/Dokumente...', true, 3, 346, true)
#21 /var/www/nextcloud/lib/private/Files/Utils/Scanner.php(245): OC\Files\Cache\Scanner->scan('files/Dokumente...', true, 3)
#22 /var/www/nextcloud/apps/files/lib/Command/Scan.php(145): OC\Files\Utils\Scanner->scan('/Jan/files/Doku...', true, NULL)
#23 /var/www/nextcloud/apps/files/lib/Command/Scan.php(201): OCA\Files\Command\Scan->scanFiles('Jan', '/Jan/files/Doku...', Object(Symfony\Component\Console\Output\ConsoleOutput), false, true, false)
#24 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /var/www/nextcloud/core/Command/Base.php(166): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 /var/www/nextcloud/3rdparty/symfony/console/Application.php(901): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#27 /var/www/nextcloud/3rdparty/symfony/console/Application.php(262): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#28 /var/www/nextcloud/3rdparty/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#29 /var/www/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#30 /var/www/nextcloud/console.php(97): OC\Console\Application->run()
#31 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#32 {main}
I’ve tried to figure out the problem. It seems that the files automated tagging app breaks occ:scan command.
My instance is running on PostgreSQL. I set up a new instance with MariaDB and there I wasn’t able to reproduce the problem.
GitHub issue is here, but no response within a few days: https://github.com/nextcloud/files_automatedtagging/issues/75
My question is now if someone can confirm that this is a problem related to PostgreSQL or if it is a general problem.
Thanks in advance!