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

Fulltextindex fail with Exeption #6

Closed
martinpetermichael opened this issue Mar 5, 2018 · 13 comments
Closed

Fulltextindex fail with Exeption #6

martinpetermichael opened this issue Mar 5, 2018 · 13 comments
Labels

Comments

@martinpetermichael
Copy link

martinpetermichael commented Mar 5, 2018

Hello,

I using this fine App with several Servers. On one Server I've got an exeption during:

sudo -u www-data php ./occ fulltextsearch:index

I already tried to use

sudo -u www-data php ./occ fulltextsearch:reset
sudo -u www-data php ./occ fulltextsearch:index

But the exeption comes again:

indexing Files.
 USER: 011DC5EA-4683-4A3C-9443-A7794B86F77C
- RAM: 21.880340576172
An unhandled exception has been thrown:
Error: Call to a member function instanceOfStorage() on null in /var/www/nextcloud/lib/private/Files/View.php:1922
Stack trace:
#0 /var/www/nextcloud/lib/private/Files/View.php(2036): OC\Files\View->lockPath('/749EAE09-58D9-...', 1, false)
#1 /var/www/nextcloud/lib/private/Files/View.php(1134): OC\Files\View->lockFile('/749EAE09-58D9-...', 1)
#2 /var/www/nextcloud/lib/private/Files/View.php(267): OC\Files\View->basicOperation('mkdir', '/749EAE09-58D9-...', Array)
#3 /var/www/nextcloud/lib/private/Files/Node/Folder.php(160): OC\Files\View->mkdir('/749EAE09-58D9-...')
#4 /var/www/nextcloud/lib/private/Files/Node/Root.php(380): OC\Files\Node\Folder->newFolder('/749EAE09-58D9-...')
#5 [internal function]: OC\Files\Node\Root->getUserFolder('749EAE09-58D9-4...')
#6 /var/www/nextcloud/lib/private/Files/Node/LazyRoot.php(64): call_user_func_array(Array, Array)
#7 /var/www/nextcloud/lib/private/Files/Node/LazyRoot.php(281): OC\Files\Node\LazyRoot->__call('getUserFolder', Array)
#8 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(264): OC\Files\Node\LazyRoot->getUserFolder('749EAE09-58D9-4...')
#9 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(735): OCA\Files_FullTextSearch\Service\FilesService->getPathFromViewerId(2300, '749EAE09-58D9-4...')
#10 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(537): OCA\Files_FullTextSearch\Service\FilesService->getShareNamesFromFile(Object(OC\Files\Node\Folder), Object(OCA\FullTextSearch\Model\DocumentAccess))
#11 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(485): OCA\Files_FullTextSearch\Service\FilesService->updateAccessFromFile(Object(OCA\Files_FullTextSearch\Model\FilesDocument), Object(OC\Files\Node\Folder))
#12 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(466): OCA\Files_FullTextSearch\Service\FilesService->updateDocumentFromFile(Object(OCA\Files_FullTextSearch\Model\FilesDocument), Object(OC\Files\Node\Folder))
#13 /var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php(400): OCA\Files_FullTextSearch\Service\FilesService->updateDocumentFromFilesDocument(Object(OCA\Files_FullTextSearch\Model\FilesDocument))
#14 /var/www/nextcloud/apps/files_fulltextsearch/lib/Provider/FilesProvider.php(203): OCA\Files_FullTextSearch\Service\FilesService->generateDocuments(Array)
#15 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(248): OCA\Files_FullTextSearch\Provider\FilesProvider->fillIndexDocuments(Array)
#16 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(218): OCA\FullTextSearch\Service\IndexService->indexChunk(Object(OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), Array)
#17 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(127): OCA\FullTextSearch\Service\IndexService->indexChunks(Object(OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), Array)
#18 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Index.php(146): OCA\FullTextSearch\Service\IndexService->indexProviderContentFromUser(Object(OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), '011DC5EA-4683-4...')
#19 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Index.php(119): OCA\FullTextSearch\Command\Index->indexProvider(Object(OCA\Files_FullTextSearch\Provider\FilesProvider))
#20 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(264): OCA\FullTextSearch\Command\Index->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/nextcloud/core/Command/Base.php(161): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /var/www/nextcloud/3rdparty/symfony/console/Application.php(874): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /var/www/nextcloud/3rdparty/symfony/console/Application.php(228): Symfony\Component\Console\Application->doRunCommand(Object(OCA\FullTextSearch\Command\Index), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /var/www/nextcloud/3rdparty/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /var/www/nextcloud/lib/private/Console/Application.php(173): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 /var/www/nextcloud/console.php(90): OC\Console\Application->run()
#27 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')


@ArtificialOwl
Copy link
Member

Is it still failing with 0.7 ?

@slankes
Copy link

slankes commented May 22, 2018

I am seeing what looks like the exact same issue.

Versions:

-bash-4.2$ php ./occ app:list | grep -i full
  - files_fulltextsearch: 0.7.2
  - fulltextsearch: 0.7.2
  - fulltextsearch_elasticsearch: 0.7.2

This is a very old installation which has been updated from an owncloud.

 USER: 1751587c-a1bd-1036-9f3d-25ccae7cf08e                                                                                                            [18/318]
 USER: 1ea9e6a4-cd5e-1035-8ae9-578993b80f76
An unhandled exception has been thrown:
Error: Call to a member function instanceOfStorage() on null in /var/www/html/nextcloud-13.0.2/lib/private/Files/View.php:1922
Stack trace:
#0 /var/www/html/nextcloud-13.0.2/lib/private/Files/View.php(2036): OC\Files\View->lockPath('/jdoe', 1, false)
#1 /var/www/html/nextcloud-13.0.2/lib/private/Files/View.php(1134): OC\Files\View->lockFile('/jdoe', 1)
#2 /var/www/html/nextcloud-13.0.2/lib/private/Files/View.php(267): OC\Files\View->basicOperation('mkdir', '/jdoe', Array)
#3 /var/www/html/nextcloud-13.0.2/lib/private/Files/Node/Folder.php(160): OC\Files\View->mkdir('/jdoe')
#4 /var/www/html/nextcloud-13.0.2/lib/private/Files/Node/Root.php(380): OC\Files\Node\Folder->newFolder('/jdoe')
#5 [internal function]: OC\Files\Node\Root->getUserFolder('jdoe')
#6 /var/www/html/nextcloud-13.0.2/lib/private/Files/Node/LazyRoot.php(64): call_user_func_array(Array, Array)
#7 /var/www/html/nextcloud-13.0.2/lib/private/Files/Node/LazyRoot.php(281): OC\Files\Node\LazyRoot->__call('getUserFolder', Array)
#8 /var/www/html/nextcloud-13.0.2/apps/files_fulltextsearch/lib/Service/FilesService.php(309): OC\Files\Node\LazyRoot->getUserFolder('jdoe')
#9 /var/www/html/nextcloud-13.0.2/apps/files_fulltextsearch/lib/Service/FilesService.php(636): OCA\Files_FullTextSearch\Service\FilesService->getPathFromViewer
Id(744486, 'jdoe')
#10 /var/www/html/nextcloud-13.0.2/apps/files_fulltextsearch/lib/Service/FilesService.php(580): OCA\Files_FullTextSearch\Service\FilesService->updateShareNames
(Object(OCA\Files_FullTextSearch\Model\FilesDocument), Object(OC\Files\Node\Folder))
#11 /var/www/html/nextcloud-13.0.2/apps/files_fulltextsearch/lib/Service/FilesService.php(556): OCA\Files_FullTextSearch\Service\FilesService->updateDocumentAccess(Object(OCA\Files_FullTextSearch\Model\FilesDocument), Object(OC\Files\Node\Folder))
#12 /var/www/html/nextcloud-13.0.2/apps/files_fulltextsearch/lib/Service/FilesService.php(535): OCA\Files_FullTextSearch\Service\FilesService->updateFilesDocu$entFromFile(Object(OCA\Files_FullTextSearch\Model\FilesDocument), Object(OC\Files\Node\Folder))
#13 /var/www/html/nextcloud-13.0.2/apps/files_fulltextsearch/lib/Service/FilesService.php(430): OCA\Files_FullTextSearch\Service\FilesService->updateFilesDocu$ent(Object(OCA\Files_FullTextSearch\Model\FilesDocument))
#14 /var/www/html/nextcloud-13.0.2/apps/files_fulltextsearch/lib/Provider/FilesProvider.php(240): OCA\Files_FullTextSearch\Service\FilesService->generateDocum$nts(Array)
#15 /var/www/html/nextcloud-13.0.2/apps/fulltextsearch/lib/Service/IndexService.php(248): OCA\Files_FullTextSearch\Provider\FilesProvider->fillIndexDocuments($rray)
#16 /var/www/html/nextcloud-13.0.2/apps/fulltextsearch/lib/Service/IndexService.php(218): OCA\FullTextSearch\Service\IndexService->indexChunk(Object(OCA\FullT$xtSearch_ElasticSearch\Platform\ElasticSearchPlatform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), Array)
#17 /var/www/html/nextcloud-13.0.2/apps/fulltextsearch/lib/Service/IndexService.php(127): OCA\FullTextSearch\Service\IndexService->indexChunks(Object(OCA\Full$extSearch_ElasticSearch\Platform\ElasticSearchPlatform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), Array)
#18 /var/www/html/nextcloud-13.0.2/apps/fulltextsearch/lib/Command/Index.php(148): OCA\FullTextSearch\Service\IndexService->indexProviderContentFromUser(Objec$(OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform), Object(OCA\Files_FullTextSearch\Provider\FilesProvider), '1ea9e6a4-cd5e-1...')
#19 /var/www/html/nextcloud-13.0.2/apps/fulltextsearch/lib/Command/Index.php(119): OCA\FullTextSearch\Command\Index->indexProvider(Object(OCA\Files_FullTextSe$rch\Provider\FilesProvider))
#20 /var/www/html/nextcloud-13.0.2/3rdparty/symfony/console/Command/Command.php(264): OCA\FullTextSearch\Command\Index->execute(Object(Symfony\Component\Conso$e\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/html/nextcloud-13.0.2/core/Command/Base.php(161): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput)
, Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /var/www/html/nextcloud-13.0.2/3rdparty/symfony/console/Application.php(874): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), 
Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /var/www/html/nextcloud-13.0.2/3rdparty/symfony/console/Application.php(228): Symfony\Component\Console\Application->doRunCommand(Object(OCA\FullTextSearch
\Command\Index), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /var/www/html/nextcloud-13.0.2/3rdparty/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console
\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /var/www/html/nextcloud-13.0.2/lib/private/Console/Application.php(173): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\
ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 /var/www/html/nextcloud-13.0.2/console.php(90): OC\Console\Application->run()
#27 /var/www/html/nextcloud-13.0.2/occ(11): require_once('/var/www/html/n...')
#28 {main}-bash-4.2$ 

@ArtificialOwl
Copy link
Member

could it be that that user never logged in your Nextcloud ?

@slankes
Copy link

slankes commented May 23, 2018

Yes - that is possible. Looks like the user(s) where I am hitting this are actually users which are marked by the system as ldap remnants.

@slankes
Copy link

slankes commented May 23, 2018

I have worked around this by changing Line 1922 from View.php to:

if ($storage && $storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {

@ArtificialOwl
Copy link
Member

can you reverse your edit and try this:

5d810c9

@ArtificialOwl
Copy link
Member

Should be fixed in 0.8.0

@ArtificialOwl
Copy link
Member

Please re-open this report if issue is not fixed

@budachst
Copy link

I am still running into this issue on NC 13.0.6(.1) and fulltextsearch_files 0.99.4:

An unhandled exception has been thrown:
Error: Call to a member function instanceOfStorage() on null in /var/www/nextcloud_cloudnine/lib/private/Files/View.php:1920
Stack trace:
#0 /var/www/nextcloud_cloudnine/lib/private/Files/View.php(2034): OC\Files\View->lockPath('/foo.bar...', 1, false)
#1 /var/www/nextcloud_cloudnine/lib/private/Files/View.php(1134): OC\Files\View->lockFile('/dominik.haberm...', 1)
#2 /var/www/nextcloud_cloudnine/lib/private/Files/View.php(267): OC\Files\View->basicOperation('mkdir', '/foo.bar...', Array)
#3 /var/www/nextcloud_cloudnine/lib/private/Files/Node/Folder.php(160): OC\Files\View->mkdir('/foo.bar...')
#4 /var/www/nextcloud_cloudnine/lib/private/Files/Node/Root.php(380): OC\Files\Node\Folder->newFolder('/foo.bar...')
#5 [internal function]: OC\Files\Node\Root->getUserFolder('foo.bar...')

I checked the user account in NC and it states this:

[root@nextcloud nextcloud]# sudo -u nginx php occ user:info foo.bar
  - user_id: foo.bar
  - display_name: Foo Bar
  - email: foor.bar@example.com
  - cloud_id: foo.bar@nextcloud.jvm.de
  - enabled: true
  - groups:
    - ArchiveUIAccess
    - a-12345-test_-12344
    - jvmstaff_2
    - jvmserver-staff_2
    - office-user_3
    - Foo.Bar
    - Domänen-Benutzer
  - quota: 100 GB
  - last_seen: 1970-01-01T00:00:00+00:00
  - user_directory: /mnt/nextcloud/data/foo.bar
  - backend: LDAP

Indexing reliably stops at that account.

@budachst
Copy link

Okay, the issue has been that NC wasn't able to read the user's homedirectory setting from AD. I removed the setting in LDAP/AD config from the advanced preferences and right now, I am giving it another try. I have a gutt-feeling, that this will resolve the issue.

@Draak2011
Copy link

I don't know if it helps, but it resolved my problem. The indexing process stumbled upon users that where not member of AD-goups anymore(ex-employees) but still had shares active in de OC_SHARE table on the database server(I use Mariadb) . I rudely removed those lines from the table using SQL(HeidiSQL) filtering on those usernames and found the indexing process continued successfully.
I'm using NC 14.03 and ElasticSearch.

More detailed explanation is welcome.

@ArtificialOwl
Copy link
Member

I should have a look to the source, but the version of fulltextsearch for nc14 should not crash on Throwable, meaning that even if there is an issue like this during a scan, it should just go on with the next file,

@Draak2011
Copy link

Could it be that although the message as shown in this issue the indexing process still continues but progress indicator is not shown on the console anymore?

Anyhow my initial indexing has finished yesterday after a it ran for several hours and finally works in Nextcloud. So I'm glad it worked out for me.

NC 14.0.3
Full text search 1.1.0
Full text search - Bookmarks 1.0.0
Full text search - Elasticsearch Platform 1.0.2
Full text search - Files 1.1.1
Full text search - Files - Tesseract OCR 1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants