Open PesekLasy opened 5 months ago
Hello, I was fix this issue with reset index and then is possible run again liveindex.
I'm seeing this error on two instances immediately after running occ fulltextsearch:reset and freshly reindexing everything.
Here is the console output:
Memory: 50 MB
┌─ Indexing ────
│ Action: indexing
│ Provider: Files Account: **
│ Document:
│ Info:
│ Title:
│ Content size:
└──
┌─ Results ────
│ Result: 0/0
│ Index:
│ Status:
│ Message:
│
│
└──
┌─ Errors ────
│ Error: 144/144
│ Index: files:9176428
│ Exception: OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException
│ Message: unknown error
│
│
└──
## x:first result ## c/v:prec/next result ## b:last result
## f:first error ## h/j:prec/next error ## d:delete error ## l:last error
## q:quit ## p:pause
An unhandled exception has been thrown:
Error: Typed property OC\FullTextSearch\Model\IndexDocument::$access must not be accessed before initialization in /var/www/nextcloud/lib/private/FullTextSearch/Model/IndexDocument.php:775
Stack trace:
#0 [internal function]: OC\FullTextSearch\Model\IndexDocument->jsonSerialize()
#1 /var/www/nextcloud/apps/files_fulltextsearch/vendor/artificial-owl/my-small-php-tools/lib/Traits/Nextcloud/nc22/TNC22Logger.php(192): json_encode()
#2 /var/www/nextcloud/apps/files_fulltextsearch/vendor/artificial-owl/my-small-php-tools/lib/Traits/Nextcloud/nc22/TNC22Logger.php(177): OCA\Files_FullTextSearch\Provider\FilesProvider->log()
#3 /var/www/nextcloud/apps/files_fulltextsearch/lib/Provider/FilesProvider.php(315): OCA\Files_FullTextSearch\Provider\FilesProvider->debug()
#4 /var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php(409): OCA\Files_FullTextSearch\Provider\FilesProvider->updateDocument()
#5 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Live.php(313): OCA\FullTextSearch\Service\IndexService->updateDocument()
#6 /var/www/nextcloud/apps/fulltextsearch/lib/Command/Live.php(262): OCA\FullTextSearch\Command\Live->liveCycle()
#7 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(298): OCA\FullTextSearch\Command\Live->execute()
#8 /var/www/nextcloud/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run()
#9 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1040): OC\Core\Command\Base->run()
#10 /var/www/nextcloud/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#11 /var/www/nextcloud/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#12 /var/www/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run()
#13 /var/www/nextcloud/console.php(102): OC\Console\Application->run()
#14 /var/www/nextcloud/occ(11): require_once('...')
#15 {main}
yes, same here, but fulltextsearch:index seams to work
Still happening. After a restart of the server I had to reset and recreate the indexes for two of my instances. This seems to affect every NC instance I manage, across multiple servers.
Complete reset and rebuild the index solves the issue at me, including PDF indexing
Complete reset and rebuild the index solves the issue at me, including PDF indexing
Until after a while it fails again. That's what I am experiencing.
I'm also seeing that issue occasionally on one of my instances (NC29.0.7). On this specific instance, there's a lot of work done in groupfolders. Some of them using ACL. My assumption is that this is part of the issue (maybe the the live process fails on files which are restricted for some users/groups!?). If the issue occurs, a reset and index does solve it (at least for a couple of hours or days... depending on the case).
Hello maintainers, what is the root cause of this issue? Is there a stable fix? I applied the code change proposed here https://github.com/nextcloud/fulltextsearch/issues/849#issue-2401253266, but it would be great to have a proper solution. Thanks!
Many months since report and still doesn't fix.
I'm now able to reproduce the issue on NC30.0.2rc2. It would be great if some of you could double check whether you can reproduce it.
Steps:
occ fulltextsearch:stop
occ fulltextsearch:live
Expected behavior: Created file is added to fulltextsearch index.
Actual behavior: Live index fails with error mentioned in original issue report. https://github.com/nextcloud/fulltextsearch_elasticsearch/issues/375#issue-2361529977
Screenshots of config:
Futher details:
Generally, it seems that this is a permission issue.
It seems that updateDocument
(see following link) does not return a valid FilesDocument so that finally json_encode of $document
fails at some point. Whereas the property $access
itself does not seem to be the root cause.
https://github.com/nextcloud/files_fulltextsearch/blob/d3472a4584fef46152a815c17856fad840e316bc/lib/Service/FilesService.php#L582-L590
Example how $document
looks like in case of such an error (without $access
to be able to get that output):
{\"id\":\"2939448\",\"providerId\":\"files\",\"modifiedTime\":0,\"title\":\"\",\"link\":\"\",\"index\":{\"ownerId\":\"Max.Mustermann\",\"providerId\":\"files\",\"collection\":\"local\",\"source\":\"\",\"documentId\":\"2939448\",\"lastIndex\":0,\"errors\":[],\"errorCount\":0,\"status\":60,\"options\":[]},\"source\":\"\",\"info\":[],\"hash\":\"\",\"contentSize\":0,\"tags\":[],\"metatags\":[],\"subtags\":[],\"more\":[],\"excerpts\":[],\"score\":\"\"}"}
Hello, 2 days ago my service for fultextsearch live crash and since this day does not start. When i run occ fulltextsearch:live by hand
./occ fulltextsearch:live
is returning error to stdout:NC version 29.0.2