Skip to content

Exception during file cache gc if files_external is disabled #21784

Closed

Description

@DeepDiver1975
[Mon Jan 18 15:27:25 2016] Exception when running cache gc: An exception occurred while executing 'SELECT m."mount_id", "mount_point", "storage_backend", "auth_backend", "priority", m."type" FROM "oc_external_mounts" m INNER JOIN "oc_external_applicable" a ON m.mount_id = a.mount_id WHERE (a."type" = ?) AND (a."value" = ?) AND (m."type" = '1')' with params [3, "admin"]:

SQLSTATE[HY000]: General error: 1 no such table: oc_external_mounts

Activity

  1. added this to the milestone on Jan 18, 2016
  2. DeepDiver1975 commented on Jan 18, 2016

    @DeepDiver1975
    ContributorAuthor

    @icewind1991 mind taking a look? THX

  3. DeepDiver1975 commented on Jan 18, 2016

    @DeepDiver1975
    ContributorAuthor
    #0 /home/deepdiver/Development/ownCloud/master-autotest/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(116): Doctrine\DBAL\Driver\AbstractSQLiteDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))
    #1 /home/deepdiver/Development/ownCloud/master-autotest/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(836): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOSqlite\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'SELECT m."mount...', Array)
    #2 /home/deepdiver/Development/ownCloud/master-autotest/lib/private/db/connection.php(182): Doctrine\DBAL\Connection->executeQuery('SELECT m."mount...', Array, Array, NULL)
    #3 /home/deepdiver/Development/ownCloud/master-autotest/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(206): OC\DB\Connection->executeQuery('SELECT m.`mount...', Array, Array)
    #4 /home/deepdiver/Development/ownCloud/master-autotest/lib/private/db/querybuilder/querybuilder.php(124): Doctrine\DBAL\Query\QueryBuilder->execute()
    #5 /home/deepdiver/Development/ownCloud/master-autotest/apps/files_external/service/dbconfigservice.php(309): OC\DB\QueryBuilder\QueryBuilder->execute()
    #6 /home/deepdiver/Development/ownCloud/master-autotest/apps/files_external/service/dbconfigservice.php(123): OCA\Files_External\Service\DBConfigService->getMountsFromQuery(Object(OC\DB\QueryBuilder\QueryBuilder))
    #7 /home/deepdiver/Development/ownCloud/master-autotest/apps/files_external/service/userglobalstoragesservice.php(75): OCA\Files_External\Service\DBConfigService->getAdminMountsFor(3, 'admin')
    #8 /home/deepdiver/Development/ownCloud/master-autotest/apps/files_external/service/storagesservice.php(108): OCA\Files_External\Service\UserGlobalStoragesService->readDBConfig()
    #9 /home/deepdiver/Development/ownCloud/master-autotest/apps/files_external/service/storagesservice.php(158): OCA\Files_external\Service\StoragesService->readConfig()
    #10 /home/deepdiver/Development/ownCloud/master-autotest/apps/files_external/service/storagesservice.php(167): OCA\Files_external\Service\StoragesService->getAllStorages()
    #11 /home/deepdiver/Development/ownCloud/master-autotest/apps/files_external/service/userglobalstoragesservice.php(108): OCA\Files_external\Service\StoragesService->getStorages()
    #12 /home/deepdiver/Development/ownCloud/master-autotest/apps/files_external/lib/config/configadapter.php(124): OCA\Files_External\Service\UserGlobalStoragesService->getUniqueStorages()
    #13 /home/deepdiver/Development/ownCloud/master-autotest/lib/private/files/config/mountprovidercollection.php(61): OCA\Files_External\Config\ConfigAdapter->getMountsForUser(Object(OC\User\User), Object(OC\Files\Storage\StorageFactory))
    #14 [internal function]: OC\Files\Config\MountProviderCollection->OC\Files\Config\{closure}(Object(OCA\Files_External\Config\ConfigAdapter))
    #15 /home/deepdiver/Development/ownCloud/master-autotest/lib/private/files/config/mountprovidercollection.php(62): array_map(Object(Closure), Array)
    #16 /home/deepdiver/Development/ownCloud/master-autotest/lib/private/files/filesystem.php(425): OC\Files\Config\MountProviderCollection->getMountsForUser(Object(OC\User\User))
    #17 /home/deepdiver/Development/ownCloud/master-autotest/lib/private/cache/file.php(52): OC\Files\Filesystem::initMountPoints('admin')
    #18 /home/deepdiver/Development/ownCloud/master-autotest/lib/private/cache/file.php(173): OC\Cache\File->getStorage()
    #19 /home/deepdiver/Development/ownCloud/master-autotest/lib/base.php(723): OC\Cache\File->gc()
    #20 [internal function]: OC::{closure}(Object(OC\User\User), 'admin')
    #21 /home/deepdiver/Development/ownCloud/master-autotest/lib/private/hooks/emittertrait.php(98): call_user_func_array(Object(Closure), Array)
    #22 /home/deepdiver/Development/ownCloud/master-autotest/lib/private/hooks/publicemitter.php(32): OC\Hooks\BasicEmitter->emit('\\OC\\User', 'postLogin', Array)
    #23 /home/deepdiver/Development/ownCloud/master-autotest/lib/private/user/session.php(225): OC\Hooks\PublicEmitter->emit('\\OC\\User', 'postLogin', Array)
    #24 /home/deepdiver/Development/ownCloud/master-autotest/lib/private/user.php(163): OC\User\Session->login('admin', 'admin')
    #25 /home/deepdiver/Development/ownCloud/master-autotest/lib/private/api.php(364): OC_User::login('admin', 'admin')
    #26 /home/deepdiver/Development/ownCloud/master-autotest/lib/private/api.php(321): OC_API::loginUser()
    #27 /home/deepdiver/Development/ownCloud/master-autotest/lib/private/api.php(156): OC_API::isAuthorised(Array)
    #28 [internal function]: OC_API::call(Array)
    #29 /home/deepdiver/Development/ownCloud/master-autotest/lib/private/route/router.php(273): call_user_func(Array, Array)
    #30 /home/deepdiver/Development/ownCloud/master-autotest/ocs/v1.php(51): OC\Route\Router->match('/ocs/cloud/apps')
    #31 /home/deepdiver/Development/ownCloud/master-autotest/ocs/v2.php(22): require_once('/home/deepdiver...')
    #32 {main}
    
  4. changed the title [-]Error in cron job if files_external is disabled[/-] [+]Exception during file cahce gc if files_external is disabled[/+] on Jan 18, 2016
  5. changed the title [-]Exception during file cahce gc if files_external is disabled[/-] [+]Exception during file cache gc if files_external is disabled[/+] on Jan 19, 2016
  6. PVince81 commented on Feb 11, 2016

    @PVince81
    Contributor

    @icewind1991 any update ?

  7. icewind1991 commented on Feb 11, 2016

    @icewind1991
    Contributor

    From the stacktrace it looks like files external is enabled but not properly upgraded

  8. PVince81 commented on Feb 17, 2016

    @PVince81
    Contributor

    That gc routine doesn't need external storages as it operates in the "cache" folder, so maybe just add an if for now to make it work ?

  9. PVince81 commented on Feb 17, 2016

    @PVince81
    Contributor

    (until we get the files_external stuff moved to core)

  10. self-assigned this
    on Feb 19, 2016
  11. PVince81 commented on Feb 19, 2016

    @PVince81
    Contributor

    I can't reproduce this on master.

    The mount provider for external storages is not registered since the app is not enabled, so it shouldn't even try and get those mounts. And if you enabled the app and disabled again, then tables should be created.

    @DeepDiver1975 are you still observing this on master ?

  12. PVince81 commented on Feb 19, 2016

    @PVince81
    Contributor

    This also works for me and delivers the list of apps:

    % curl -D - http://root:admin@localhost/owncloud/ocs/v2.php/cloud/apps
    
  13. DeepDiver1975 commented on Feb 24, 2016

    @DeepDiver1975
    ContributorAuthor

    I cannot reproduce this any more -> close for now

  14. lock commented on Aug 6, 2019

    @lock

    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.

  15. locked as resolved and limited conversation to collaborators on Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions