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

OC 6.0.0.14 / 6.0.0a Error while running background job #6876

Closed
MBurchard opened this issue Jan 21, 2014 · 8 comments
Closed

OC 6.0.0.14 / 6.0.0a Error while running background job #6876

MBurchard opened this issue Jan 21, 2014 · 8 comments
Labels

Comments

@MBurchard
Copy link

{"app":"no app in context","message":"Error while running background job: Index doesn't exists in the specified directory.","level":3,"time":"2014-01-19T13:30:01+00:00"}
{"app":"no app in context","message":"Error while running background job: Index doesn't exists in the specified directory.","level":3,"time":"2014-01-19T13:30:01+00:00"}
{"app":"no app in context","message":"Error while running background job: Index doesn't exists in the specified directory.","level":3,"time":"2014-01-19T13:30:01+00:00"}
{"app":"no app in context","message":"Error while running background job: Index doesn't exists in the specified directory.","level":3,"time":"2014-01-19T13:30:01+00:00"}

The Problem is, this error doesn't tell, what's really wrong.
Any ideas?

@PVince81
Copy link
Contributor

@MBurchard we need more infos about your environment, please fill the issue template: https://raw.github.com/owncloud/core/master/issue_template.md

@butonic I grepped the code and found that this message could only be generated by search_lucene/3rdparty/Zend/Search/Lucene.php in the search_lucene app

@butonic
Copy link
Member

butonic commented Jan 22, 2014

The search_lucene app stores its seach index in <userhome>/lucene_index (lib/lucene.php#L44). Looking at the code in search_lucene/3rdparty/Zend/Search/Lucene.php my guess is that the <userhome>/lucene_index folder is readonly.

If <userhome>/lucene_index does not exist the code creates it.

@MBurchard My guess is: it is a permission problem. In that case correct the permissions for <userhome>/lucene_index and make the directory read and writeable for the web server.

If that is not the case please provide additional info as stated by @PVince81.

@alexboss
Copy link

Hello guys,

I don't have the same issue provided by the requester MBurchard, in fact I never managed to get the search feature working (I'm using ownCloud 6.0.1 stable for Debian).

But, reading at this post I understood that the folder /lucene_index had to exist.

So I browsed my folder and noticed that:

  • ownership of my was set to root and not www-data
  • there was no lucene_index folder

So I created the lucene_index folder and set the ownership of my to www-data instead of root.

Now things are getting slightly better, I still can't search full text (ie in the body of documents) but at least I have now a combo list with matches for filenames in Activity, Text and Files.

I'll make a fresh install of the debian package under Linux Mint to check if I can reproduce this issue with ownership / permission and check if the indexing works as expected.

Regards,

Alexandre 8)

@alexboss
Copy link

OK I made further testing on this...
First, it appears that the folder <userhome>/lucene_index does not exist.
Then I put back the ownership of the folder to www-data:www-data because this is how it worked on a fresh install I made on a VM (Linux Mint - see below).
Anyway, the full text indexing is still not working... here is what I did:

  1. Update existing content / create new content. This gives in owncloud.log :
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files' !!! \ncache: Array\n(\n    [fileid] => 2\n    [storage] => home::__myusername__\n    [path] => files\n    [parent] => 1\n    [name] => files\n    [mimetype] => httpd\/unix-directory\n    [mimepart] => httpd\n    [size] => 1492203344\n    [mtime] => 1391097322\n    [storage_mtime] => 1391097322\n    [encrypted] => \n    [unencrypted_size] => 0\n    [etag] => 52eaa5df8f057\n)\n \ndata: Array\n(\n    [mimetype] => httpd\/unix-directory\n    [mtime] => 1391110724\n    [size] => -1\n    [etag] => 52eaaa44907f3\n    [storage_mtime] => 1391110724\n)\n","level":0,"time":"2014-01-30T19:38:44+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files_versions' !!! \ncache: Array\n(\n    [fileid] => 62\n    [storage] => home::__myusername__\n    [path] => files_versions\n    [parent] => 1\n    [name] => files_versions\n    [mimetype] => httpd\/unix-directory\n    [mimepart] => httpd\n    [size] => 789240700\n    [mtime] => 1391109577\n    [storage_mtime] => 1391109577\n    [encrypted] => \n    [unencrypted_size] => 0\n    [etag] => 52eaa5df76d35\n)\n \ndata: Array\n(\n    [mimetype] => httpd\/unix-directory\n    [mtime] => 1391109599\n    [size] => -1\n    [etag] => 52eaaa449ab5a\n    [storage_mtime] => 1391109599\n)\n","level":0,"time":"2014-01-30T19:38:44+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'files\/ipsum.txt.v1391097865' is not readable !!!","level":0,"time":"2014-01-30T19:38:44+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files\/ipsum.txt' !!! \ncache: Array\n(\n    [fileid] => 44388\n    [storage] => home::__myusername__\n    [path] => files\/ipsum.txt\n    [parent] => 2\n    [name] => ipsum.txt\n    [mimetype] => text\/plain\n    [mimepart] => text\n    [size] => 4660\n    [mtime] => 1391110724\n    [storage_mtime] => 1391110724\n    [encrypted] => 1\n    [unencrypted_size] => 3477\n    [etag] => 52eaaa44be6d1\n)\n \ndata: Array\n(\n    [mimetype] => text\/plain\n    [mtime] => 1391110722\n    [size] => 4660\n    [etag] => 52eaaa44beb19\n    [storage_mtime] => 1391110722\n)\n","level":0,"time":"2014-01-30T19:38:44+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files' !!! \ncache: Array\n(\n    [fileid] => 2\n    [storage] => home::__myusername__\n    [path] => files\n    [parent] => 1\n    [name] => files\n    [mimetype] => httpd\/unix-directory\n    [mimepart] => httpd\n    [size] => 1492203380\n    [mtime] => 1391110724\n    [storage_mtime] => 1391110724\n    [encrypted] => \n    [unencrypted_size] => 0\n    [etag] => 52eaaa44c085f\n)\n \ndata: Array\n(\n    [mimetype] => httpd\/unix-directory\n    [mtime] => 1391110737\n    [size] => -1\n    [etag] => 52eaaa5112fe1\n    [storage_mtime] => 1391110737\n)\n","level":0,"time":"2014-01-30T19:38:57+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files_versions' !!! \ncache: Array\n(\n    [fileid] => 62\n    [storage] => home::__myusername__\n    [path] => files_versions\n    [parent] => 1\n    [name] => files_versions\n    [mimetype] => httpd\/unix-directory\n    [mimepart] => httpd\n    [size] => 789236200\n    [mtime] => 1391109599\n    [storage_mtime] => 1391109599\n    [encrypted] => \n    [unencrypted_size] => 0\n    [etag] => 52eaaa449ab5a\n)\n \ndata: Array\n(\n    [mimetype] => httpd\/unix-directory\n    [mtime] => 1391110724\n    [size] => -1\n    [etag] => 52eaaa5117427\n    [storage_mtime] => 1391110724\n)\n","level":0,"time":"2014-01-30T19:38:57+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'files\/lorem.txt.v1391097221' is not readable !!!","level":0,"time":"2014-01-30T19:38:57+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files\/lorem.txt' !!! \ncache: Array\n(\n    [fileid] => 43904\n    [storage] => home::__myusername__\n    [path] => files\/lorem.txt\n    [parent] => 2\n    [name] => lorem.txt\n    [mimetype] => text\/plain\n    [mimepart] => text\n    [size] => 4716\n    [mtime] => 1391110737\n    [storage_mtime] => 1391110737\n    [encrypted] => 1\n    [unencrypted_size] => 3518\n    [etag] => 52eaaa513acde\n)\n \ndata: Array\n(\n    [mimetype] => text\/plain\n    [mtime] => 1391110735\n    [size] => 4716\n    [etag] => 52eaaa513b09e\n    [storage_mtime] => 1391110735\n)\n","level":0,"time":"2014-01-30T19:38:57+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files' !!! \ncache: Array\n(\n    [fileid] => 2\n    [storage] => home::__myusername__\n    [path] => files\n    [parent] => 1\n    [name] => files\n    [mimetype] => httpd\/unix-directory\n    [mimepart] => httpd\n    [size] => 1492203420\n    [mtime] => 1391110737\n    [storage_mtime] => 1391110737\n    [encrypted] => \n    [unencrypted_size] => 0\n    [etag] => 52eaaa513c407\n)\n \ndata: Array\n(\n    [mimetype] => httpd\/unix-directory\n    [mtime] => 1391110747\n    [size] => -1\n    [etag] => 52eaaa5b53cd9\n    [storage_mtime] => 1391110747\n)\n","level":0,"time":"2014-01-30T19:39:07+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'files\/.~lock.New Document.odt#' is not readable !!!","level":0,"time":"2014-01-30T19:39:07+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files\/.~lock.New Document.odt#' !!! \ncache: Array\n(\n    [fileid] => 44559\n    [storage] => home::__myusername__\n    [path] => files\/.~lock.New Document.odt#\n    [parent] => 2\n    [name] => .~lock.New Document.odt#\n    [mimetype] => application\/octet-stream\n    [mimepart] => application\n    [size] => 148\n    [mtime] => 1391110747\n    [storage_mtime] => 1391110747\n    [encrypted] => 1\n    [unencrypted_size] => 91\n    [etag] => 52eaaa5b72deb\n)\n \ndata: Array\n(\n    [mimetype] => application\/octet-stream\n    [mtime] => 1391110745\n    [size] => 148\n    [etag] => 52eaaa5b73240\n    [storage_mtime] => 1391110745\n)\n","level":0,"time":"2014-01-30T19:39:07+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files_versions' !!! \ncache: Array\n(\n    [fileid] => 62\n    [storage] => home::__myusername__\n    [path] => files_versions\n    [parent] => 1\n    [name] => files_versions\n    [mimetype] => httpd\/unix-directory\n    [mimepart] => httpd\n    [size] => 789236068\n    [mtime] => 1391110724\n    [storage_mtime] => 1391110724\n    [encrypted] => \n    [unencrypted_size] => 0\n    [etag] => 52eaaa5117427\n)\n \ndata: Array\n(\n    [mimetype] => httpd\/unix-directory\n    [mtime] => 1391110737\n    [size] => -1\n    [etag] => 52eaaa5bae33c\n    [storage_mtime] => 1391110737\n)\n","level":0,"time":"2014-01-30T19:39:07+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'files\/New Document.odt.v1391097322' is not readable !!!","level":0,"time":"2014-01-30T19:39:07+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files\/New Document.odt' !!! \ncache: Array\n(\n    [fileid] => 44526\n    [storage] => home::__myusername__\n    [path] => files\/New Document.odt\n    [parent] => 2\n    [name] => New Document.odt\n    [mimetype] => application\/vnd.oasis.opendocument.text\n    [mimepart] => application\n    [size] => 13008\n    [mtime] => 1391110747\n    [storage_mtime] => 1391110747\n    [encrypted] => 1\n    [unencrypted_size] => 9718\n    [etag] => 52eaaa5bcaa5e\n)\n \ndata: Array\n(\n    [mimetype] => application\/vnd.oasis.opendocument.text\n    [mtime] => 1391110745\n    [size] => 13008\n    [etag] => 52eaaa5bcae02\n    [storage_mtime] => 1391110745\n)\n","level":0,"time":"2014-01-30T19:39:07+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files_versions' !!! \ncache: Array\n(\n    [fileid] => 62\n    [storage] => home::__myusername__\n    [path] => files_versions\n    [parent] => 1\n    [name] => files_versions\n    [mimetype] => httpd\/unix-directory\n    [mimepart] => httpd\n    [size] => 789236068\n    [mtime] => 1391110737\n    [storage_mtime] => 1391110737\n    [encrypted] => \n    [unencrypted_size] => 0\n    [etag] => 52eaaa5bae33c\n)\n \ndata: Array\n(\n    [mimetype] => httpd\/unix-directory\n    [mtime] => 1391110747\n    [size] => -1\n    [etag] => 52eaaa7d70e46\n    [storage_mtime] => 1391110747\n)\n","level":0,"time":"2014-01-30T19:39:41+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'files\/new-content-to-index.txt' is not readable !!!","level":0,"time":"2014-01-30T19:39:41+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files\/new-content-to-index.txt' !!! \ncache: Array\n(\n    [fileid] => 44561\n    [storage] => home::__myusername__\n    [path] => files\/new-content-to-index.txt\n    [parent] => 2\n    [name] => new-content-to-index.txt\n    [mimetype] => text\/plain\n    [mimepart] => text\n    [size] => 64\n    [mtime] => 1391110781\n    [storage_mtime] => 1391110781\n    [encrypted] => 1\n    [unencrypted_size] => 30\n    [etag] => 52eaaa7dca1fa\n)\n \ndata: Array\n(\n    [mimetype] => text\/plain\n    [mtime] => 1391110779\n    [size] => 64\n    [etag] => 52eaaa7dca5d3\n    [storage_mtime] => 1391110779\n)\n","level":0,"time":"2014-01-30T19:39:41+00:00"}
  1. Check the table oc_jobs
INSERT INTO `oc_jobs` VALUES(549, 'OC\\BackgroundJob\\Legacy\\QueuedJob', '{"app":"search_lucene","klass":"OCA\\\\Search_Lucene\\\\Hooks","method":"doIndexFile","parameters":"{\\"path\\":\\"\\\\\\/ipsum.txt\\",\\"user\\":\\"__myusername__\\"}"}', 0);
INSERT INTO `oc_jobs` VALUES(550, 'OC\\BackgroundJob\\Legacy\\QueuedJob', '{"app":"search_lucene","klass":"OCA\\\\Search_Lucene\\\\Hooks","method":"doIndexFile","parameters":"{\\"path\\":\\"\\\\\\/lorem.txt\\",\\"user\\":\\"__myusername__\\"}"}', 0);
INSERT INTO `oc_jobs` VALUES(551, 'OC\\BackgroundJob\\Legacy\\QueuedJob', '{"app":"search_lucene","klass":"OCA\\\\Search_Lucene\\\\Hooks","method":"doIndexFile","parameters":"{\\"path\\":\\"\\\\\\/.~lock.New Document.odt#\\",\\"user\\":\\"__myusername__\\"}"}', 0);
INSERT INTO `oc_jobs` VALUES(552, 'OC\\BackgroundJob\\Legacy\\QueuedJob', '{"app":"search_lucene","klass":"OCA\\\\Search_Lucene\\\\Hooks","method":"doIndexFile","parameters":"{\\"path\\":\\"\\\\\\/New Document.odt\\",\\"user\\":\\"__myusername__\\"}"}', 0);
INSERT INTO `oc_jobs` VALUES(553, 'OC\\BackgroundJob\\Legacy\\QueuedJob', '{"app":"search_lucene","klass":"OCA\\\\Search_Lucene\\\\Hooks","method":"doDeleteFile","parameters":"{\\"run\\":true,\\"path\\":\\"\\\\\\/.~lock.New Document.odt#\\",\\"user\\":\\"__myusername__\\"}"}', 0);
INSERT INTO `oc_jobs` VALUES(554, 'OC\\BackgroundJob\\Legacy\\QueuedJob', '{"app":"search_lucene","klass":"OCA\\\\Search_Lucene\\\\Hooks","method":"doIndexFile","parameters":"{\\"path\\":\\"\\\\\\/new-content-to-index.txt\\",\\"user\\":\\"__myusername__\\"}"}', 0);
  1. Wait for the cron to execute:
*/15  *  *  *  * www-data /usr/bin/php -f /var/www/owncloud/cron.php
  1. After the cron executes, the Queued jobs are deleted from the table oc_jobs
  2. Check owncloud.log - nothing new
  3. Connect and log-in to owncloud
  4. Check owncloud.log
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files_trashbin\/files' !!! \ncache: Array\n(\n    [fileid] => 24\n    [storage] => home::__myusername__\n    [path] => files_trashbin\/files\n    [parent] => 23\n    [name] => files\n    [mimetype] => httpd\/unix-directory\n    [mimepart] => httpd\n    [size] => 125140448\n    [mtime] => 1391082169\n    [storage_mtime] => 1391082169\n    [encrypted] => \n    [unencrypted_size] => 0\n    [etag] => 52ea5e2124be2\n)\n \ndata: Array\n(\n    [mimetype] => httpd\/unix-directory\n    [mtime] => 1391110781\n    [size] => -1\n    [etag] => 52eaac1b21964\n    [storage_mtime] => 1391110781\n)\n","level":0,"time":"2014-01-30T19:46:35+00:00"}
{"app":"core","message":"Generating preview for \"\/\/ipsum.txt\" with \"OC\\Preview\\TXT\"","level":0,"time":"2014-01-30T19:46:37+00:00"}
{"app":"core","message":"OC_Image->fixOrientation() No readable file path set.","level":0,"time":"2014-01-30T19:46:37+00:00"}
{"app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-01-30T19:46:37+00:00"}
{"app":"core","message":"Generating preview for \"\/\/lorem.txt\" with \"OC\\Preview\\TXT\"","level":0,"time":"2014-01-30T19:46:37+00:00"}
{"app":"core","message":"OC_Image->fixOrientation() No readable file path set.","level":0,"time":"2014-01-30T19:46:37+00:00"}
{"app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-01-30T19:46:37+00:00"}
{"app":"core","message":"Generating preview for \"\/\/new-content-to-index.txt\" with \"OC\\Preview\\TXT\"","level":0,"time":"2014-01-30T19:46:37+00:00"}
{"app":"core","message":"OC_Image->fixOrientation() No readable file path set.","level":0,"time":"2014-01-30T19:46:37+00:00"}
{"app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-01-30T19:46:37+00:00"}

I made a search on keywords provided in the created / updated content, but nothing matches in the Full Text search (sometimes results from Activity are found).

The funny thing is that the table oc_lucene_status is alsways empty.

I installed a similar configuration - latest Debian package owncloud 6.0.1 to a Linux Mint - with a similar configuration, and it works fine on this Linux Mint.

While my main and hosted owncloud instance does not do a full-text indexing.

Don't know if it helps, but just in case the permissions of my lucene index in my personal folder:

root@server:/var/www/owncloud/data/__myusername__# ll lucene_index/
total 120
drwxr-xr-x  2 www-data www-data  4096 Jan 30 17:03 ./
drwxr-xr-x 11 www-data www-data  4096 Jan 30 20:46 ../
-rw-rw-rw-  1 www-data www-data 25018 Jan 30 11:30 _3u.cfs
-rw-rw-rw-  1 www-data www-data   318 Jan 30 11:30 _3u.sti
-rw-rw-rw-  1 www-data www-data    21 Jan 30 12:30 _3u_u.del
-rw-rw-rw-  1 www-data www-data   500 Jan 30 17:00 _86.cfs
-rw-rw-rw-  1 www-data www-data   107 Jan 30 17:00 _86.sti
-rw-rw-rw-  1 www-data www-data   497 Jan 30 17:00 _88.cfs
-rw-rw-rw-  1 www-data www-data   107 Jan 30 17:00 _88.sti
-rw-rw-rw-  1 www-data www-data    18 Jan 30 17:00 _89_2.del
-rw-rw-rw-  1 www-data www-data 17770 Jan 30 17:00 _89.cfs
-rw-rw-rw-  1 www-data www-data   202 Jan 30 17:00 _89.sti
-rw-rw-rw-  1 www-data www-data   711 Jan 30 17:00 _8a.cfs
-rw-rw-rw-  1 www-data www-data   107 Jan 30 17:00 _8a.sti
-rw-rw-rw-  1 www-data www-data   708 Jan 30 17:00 _8b.cfs
-rw-rw-rw-  1 www-data www-data   107 Jan 30 17:00 _8b.sti
-rw-rw-rw-  1 www-data www-data   529 Jan 30 17:00 _8c.cfs
-rw-rw-rw-  1 www-data www-data   107 Jan 30 17:03 _8c.sti
-rw-rw-rw-  1 www-data www-data     0 Jan 30 17:00 optimization.lock.file
-rw-rw-rw-  1 www-data www-data     0 Jan 30 21:38 read.lock.file
-rw-rw-rw-  1 www-data www-data     0 Jan 30 17:00 read-lock-processing.lock.file
-rw-rw-rw-  1 www-data www-data   174 Jan 30 17:00 segments_b8
-rw-rw-rw-  1 www-data www-data    20 Jan 30 17:00 segments.gen
-rw-rw-rw-  1 www-data www-data     0 Jan 30 17:00 write.lock.file

Would you have other ideas on how to investigate or debug this ?

Thanks for your help,

Best regards,

Alexandre

@alexboss
Copy link

OK, made a new round of test... In my case (owncloud 6.0.1 packaged for Debian) it appears problem comes from cronjobs...

Either using an script in /etc/crond.d

*/15  *  *  *  * www-data /usr/bin/php -f /var/www/owncloud/cron.php

or registering in crontab

crontab -u www-data -e
*/15  *  *  *  * /usr/bin/php -f /var/www/owncloud/cron.php

None is working for the full-text indexing.

I switched to the method "Ajax" for the background jobs, an now it's working fine !

I mean, it woks fine provided that the file is edited from the owncloud interface; files added on my desktop and then synced seems a bit buggy, their are not always indexed, unless they are edited in the owncloud interface, then they are indexed.

@butonic + @PVince81 : Shall I open a new bug request for this or is this ticket enough (because my issue now is not related to the initial issue of "Error while running background job: Index doesn't exists in the specified directory." ?

Best regards,

Alexandre 8)

@butonic
Copy link
Member

butonic commented Jan 31, 2014

@alexboss You are correct, I meant lucene_index. Updated the comments to prevent people looking for the wrong folder.

If oc_lucene_status something is definitely wrong. Each index job should add a new row to the table to reflect the outcome of the indexing job: N = new, E = error, I =indexed, S = skipped

The lucene_index folder looks good. If you want do dig deeper there by copying it to your local machine and use luke to look at it: https://code.google.com/p/luke/ It is a java app for examining a lucene index.

That you don't see any debug messages from the search_lucene app seems strage. Did you set loglevel=>0 in config.php?

If you feel adventurous you could try owncloud-archive/apps#1624 which contains a different approach to background jobs and should fix any issue of indexing files via cron.

@alexboss
Copy link

alexboss commented Feb 1, 2014

Thanks @butonic for your answer !

Indeed, I confirm that oc_lucene_status is always empty. Nevertheless, it doesn't prevent full-text indexing to work (provided files are edited through owncloud interface and background job is set to Ajax).

Made a final test:

1/ Edit through owncloud interface a file sonnets-pour-helene.txt
2/ Check owncloud.log

{"app":"core","message":"Generating preview for \"\/sonnets-pour-helene.txt\" with \"OC\\Preview\\TXT\"","level":0,"time":"2014-02-01T12:14:26+00:00"}
{"app":"core","message":"Generating preview for \"\/sonnets-pour-helene.txt\" with \"OC\\Preview\\Unknown\"","level":0,"time":"2014-02-01T12:14:26+00:00"}
{"app":"core","message":"OC_Image->fixOrientation() No readable file path set.","level":0,"time":"2014-02-01T12:14:26+00:00"}
{"app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-02-01T12:14:26+00:00"}

{"app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files_versions' !!! \ncache: Array\n(\n    [fileid] => 62\n    [storage] => home::__myusername__\n    [path] => files_versions\n    [parent] => 1\n    [name] => files_versions\n    [mimetype] => httpd\/unix-directory\n    [mimepart] => httpd\n    [size] => 788771312\n    [mtime] => 1391173721\n    [storage_mtime] => 1391173721\n    [encrypted] => \n    [unencrypted_size] => 0\n    [etag] => 52eba11d90610\n)\n \ndata: Array\n(\n    [mimetype] => httpd\/unix-directory\n    [mtime] => 1391173917\n    [size] => -1\n    [etag] => 52ece53699ddc\n    [storage_mtime] => 1391173917\n)\n","level":0,"time":"2014-02-01T12:14:46+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files_versions\/private' !!! \ncache: Array\n(\n    [fileid] => 2644\n    [storage] => home::__myusername__\n    [path] => files_versions\/private\n    [parent] => 62\n    [name] => private\n    [mimetype] => httpd\/unix-directory\n    [mimepart] => httpd\n    [size] => 279816\n    [mtime] => 1391068141\n    [storage_mtime] => 1391068141\n    [encrypted] => \n    [unencrypted_size] => 0\n    [etag] => 52ea3ab95ff99\n)\n \ndata: Array\n(\n    [mimetype] => httpd\/unix-directory\n    [mtime] => 1391178709\n    [size] => -1\n    [etag] => 52ece5369cb6b\n    [storage_mtime] => 1391178709\n)\n","level":0,"time":"2014-02-01T12:14:46+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files_versions\/coupons' !!! \ncache: Array\n(\n    [fileid] => 15185\n    [storage] => home::__myusername__\n    [path] => files_versions\/coupons\n    [parent] => 62\n    [name] => coupons\n    [mimetype] => httpd\/unix-directory\n    [mimepart] => httpd\n    [size] => 44708\n    [mtime] => 1390314321\n    [storage_mtime] => 1390314321\n    [encrypted] => \n    [unencrypted_size] => 0\n    [etag] => 52dff3d079012\n)\n \ndata: Array\n(\n    [mimetype] => httpd\/unix-directory\n    [mtime] => 1391184970\n    [size] => -1\n    [etag] => 52ece536a1e3f\n    [storage_mtime] => 1391184970\n)\n","level":0,"time":"2014-02-01T12:14:46+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files\/sonnets-pour-helene.txt' !!! \ncache: Array\n(\n    [fileid] => 44729\n    [storage] => home::__myusername__\n    [path] => files\/sonnets-pour-helene.txt\n    [parent] => 2\n    [name] => sonnets-pour-helene.txt\n    [mimetype] => text\/plain\n    [mimepart] => text\n    [size] => 0\n    [mtime] => 1391256865\n    [storage_mtime] => 1391256865\n    [encrypted] => 1\n    [unencrypted_size] => 667\n    [etag] => 52ece521dbe20\n)\n \ndata: Array\n(\n    [mimetype] => text\/plain\n    [mtime] => 1391256886\n    [size] => 916\n    [etag] => 52ece536b3dce\n    [storage_mtime] => 1391256886\n)\n","level":0,"time":"2014-02-01T12:14:46+00:00"}

3/ Check oc_jobs

INSERT INTO `oc_jobs` VALUES(1, 'OC\\Cache\\FileGlobalGC', 'null', 1391256849);
INSERT INTO `oc_jobs` VALUES(2, 'OC\\BackgroundJob\\Legacy\\RegularJob', '["\\\\OC\\\\Files\\\\Cache\\\\BackgroundWatcher","checkNext"]', 1391256840);
INSERT INTO `oc_jobs` VALUES(72, 'OC\\BackgroundJob\\Legacy\\QueuedJob', '{"app":"search_lucene","klass":"OCA\\\\Search_Lucene\\\\Hooks","method":"doIndexFile","parameters":"{\\"run\\":true,\\"path\\":\\"\\\\\\/sonnets-pour-helene.txt\\",\\"user\\":\\"__myusername__\\"}"}', 0);

4/ Go back to owncloud interface - check owncloud.log

{"app":"core","message":"Generating preview for \"\/\/sonnets-pour-helene.txt\" with \"OC\\Preview\\TXT\"","level":0,"time":"2014-02-01T12:15:31+00:00"}
{"app":"core","message":"OC_Image->fixOrientation() No readable file path set.","level":0,"time":"2014-02-01T12:15:31+00:00"}
{"app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-02-01T12:15:31+00:00"}
{"app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'cache\/1041975614' is not readable !!!","level":0,"time":"2014-02-01T12:15:31+00:00"}

5/ Wait for background job to execute and check owncloud.log

{"app":"search_lucene","message":"searching hits for pk:505b5c0044ec7f05b94d289f152cec8c","level":0,"time":"2014-02-01T12:15:41+00:00"}
{"app":"search_lucene","message":"found 0 hits ","level":0,"time":"2014-02-01T12:15:41+00:00"}
{"app":"search_lucene","message":"adding \/sonnets-pour-helene.txt","level":0,"time":"2014-02-01T12:15:41+00:00"}

6/ Table oc_jobs is empty of QueuedJob, content of file sonnets-pour-helene.txt is indexed
7/ Check table oc_lucene_status - empty

Thanks for the project Luke, I checked my index, and indeed I found the content indexed for sonnets-pour-helene.txt

I then ran a second test with a document .odt but it didn't index. Content of owncloud.log:

{"app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'files\/New Document.odt' is not readable !!!","level":0,"time":"2014-02-01T12:19:42+00:00"}
{"app":"PHP","message":"ZipArchive::getFromName(): Invalid or unitialized Zip object at \/var\/www\/owncloud\/apps\/search_lucene\/document\/Odt.php#30","level":2,"time":"2014-02-01T12:20:46+00:00"}
{"app":"PHP","message":"Class 'Zend_Search_Lucene_Exception' not found at \/var\/www\/owncloud\/apps\/search_lucene\/document\/Odt.php#32","level":3,"time":"2014-02-01T12:20:46+00:00"}

... and content of PHP errors:

[01-Feb-2014 12:20:46 UTC] PHP Fatal error:  Class 'Zend_Search_Lucene_Exception' not found in /var/www/owncloud/apps/search_lucene/document/Odt.php on line 32

I confirm that config.php is set with loglevel=>0. I also made a diff between latest owncloud out of the box and the files provided by the Debian package, files are the same.

Does it require to have zend framework installed to work ?

So it's a mystery, I'll check refactoring of the search_lucene (1624) but I hope it won't mess with my debian installation.

Thanks,

Alexandre 8)

@butonic
Copy link
Member

butonic commented Feb 11, 2014

now tracked in owncloud-archive/search_lucene#4

@butonic butonic closed this as completed Feb 11, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Aug 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants