reindex cannot open xxx.eml

Issue #144 resolved
Former user created an issue

Hi,

Sorry, if this is a duplicate question.

Here's my piler (virtual piler installation) info:

***root@piler:~# piler -v piler 0.1.24-master-branch, build 836, Janos SUTO sj@acts.hu

Build Date: Sun Sep 1 21:35:24 CEST 2013 ldd version: ldd (Debian EGLIBC 2.13-38) 2.13 gcc version: gcc version 4.7.2 (Debian 4.7.2-5) Configure command: ./configure --localstatedir=/var --enable-starttls --enable-tcpwrappers --with-database=mysql

root@piler:~# *

I got my exchange 2013 journal turn on, and piler received the 114 emails, since last night. I added "mydomain.com" to the domain section in piler admin webui. I then add a user with "uid@myadmin.com". However, I do perform search from webui (login with this user), the search returned empty. I then check the indexing, and I think the index does not work properly. Below is what I got from running "reindex -a"

root@piler:~# reindex -a cannot open: 1.eml cannot open: 2.eml cannot open: 3.eml ... cannot open: 114.eml put 0 messages to sph_index table for reindexing

Here's the "indexer --all" output. root@piler:~# indexer --all Sphinx 2.0.4-release (r3135) Copyright (c) 2001-2012, Andrew Aksyonoff Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/etc/sphinxsearch/sphinx.conf'... indexing index 'main1'... FATAL: failed to lock /var/piler/sphinx/main1.spl: Resource temporarily unavailable, will not index. Try --rotate option. root@piler:~#

Please help and let me know what I can do to fix this issue and continue my testing.

Thanks, Andy

Comments (7)

  1. Janos SUTO repo owner

    Hello Andy,

    if you want to reindex, then chdir to a directory where user piler can create files eg. cd /tmp) before running reindex.

    Also make sure you never run the sphinx indexer as root. /var/piler/sphinx files should be owned by user piler. And finally you have to run indexer --all once in a lifetime, ie. when you install piler and sphinx, and create the index files. Never again. However reindex is a troubleshooting tool to recreate corrupted index files. Are you sure that you sphinx data is corrupt? Check if user piler has its cron jobs installed, eg. show me crontab -l -u piler

  2. Andy Vo

    after doing what you suggested, I still encounter the same issue, what else should we check?

    root@piler:~# su - piler $ cd /tmp $ indexer --all Sphinx 2.0.4-release (r3135) Copyright (c) 2001-2012, Andrew Aksyonoff Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)

    using config file '/etc/sphinxsearch/sphinx.conf'... indexing index 'main1'... FATAL: failed to lock /var/piler/sphinx/main1.spl: Resource temporarily unavailable, will not index. Try --rotate option. $ reindex -a failed to add to sph_index table: 1.eml failed to add to sph_index table: 2.eml ... failed to add to sph_index table: 134.eml failed to add to sph_index table: 135.eml failed to add to sph_index table: 136.eml put 0 messages to sph_index table for reindexing

    $ crontab -l -u piler

    PILERSTART

    /5 * * LC_ALL=C mpstat | tail -1 | awk '{print $11}' > /var/piler/stat/cpu.stat 5,35 * * /usr/local/libexec/piler/indexer.delta.sh 30 2 * * /usr/local/libexec/piler/indexer.main.sh /15 * * /usr/bin/indexer --quiet tag1 --rotate /15 * * /usr/bin/indexer --quiet note1 --rotate 30 6 * * * /usr/bin/php /usr/local/libexec/piler/generate_stats.php /var/www/piler.mydomain.com

    PILEREND

    $

  3. Janos SUTO repo owner

    ok, the good news is that the cronjobs are just fine. However I think there must be a confusion:

    indexer: a sphinx utility, normally you shouldn't use it directly

    reindex: a piler utility to recover or salvage a corrupt sphinx index

    the purpose of "indexer --all" is to initialize or reset the sphinx database. It should be run only at install time, and never again, because it clears the sphinx database.

    What you should do now is to run "reindex -a" in /tmp as a regular user (no need to "su" to piler, because it's setuid to piler). When it's done, please show me ls -la /var/piler/sphinx.

  4. Andy Vo

    Below is the output from your request:

    root@piler:/var/piler/sphinx# cd /tmp root@piler:/tmp# reindex -a failed to add to sph_index table: 1.eml failed to add to sph_index table: 2.eml failed to add to sph_index table: 3.eml failed to add to sph_index table: 4.eml failed to add to sph_index table: 5.eml failed to add to sph_index table: 6.eml failed to add to sph_index table: 7.eml failed to add to sph_index table: 8.eml failed to add to sph_index table: 9.eml failed to add to sph_index table: 10.eml failed to add to sph_index table: 11.eml failed to add to sph_index table: 12.eml failed to add to sph_index table: 13.eml failed to add to sph_index table: 14.eml failed to add to sph_index table: 15.eml failed to add to sph_index table: 16.eml failed to add to sph_index table: 17.eml failed to add to sph_index table: 18.eml failed to add to sph_index table: 19.eml failed to add to sph_index table: 20.eml failed to add to sph_index table: 21.eml failed to add to sph_index table: 22.eml failed to add to sph_index table: 23.eml failed to add to sph_index table: 24.eml failed to add to sph_index table: 25.eml failed to add to sph_index table: 26.eml failed to add to sph_index table: 27.eml failed to add to sph_index table: 28.eml failed to add to sph_index table: 29.eml failed to add to sph_index table: 30.eml failed to add to sph_index table: 31.eml failed to add to sph_index table: 32.eml failed to add to sph_index table: 33.eml failed to add to sph_index table: 34.eml failed to add to sph_index table: 35.eml failed to add to sph_index table: 36.eml failed to add to sph_index table: 37.eml failed to add to sph_index table: 38.eml failed to add to sph_index table: 39.eml failed to add to sph_index table: 40.eml failed to add to sph_index table: 41.eml failed to add to sph_index table: 42.eml failed to add to sph_index table: 43.eml failed to add to sph_index table: 44.eml failed to add to sph_index table: 45.eml failed to add to sph_index table: 46.eml failed to add to sph_index table: 47.eml failed to add to sph_index table: 48.eml failed to add to sph_index table: 49.eml failed to add to sph_index table: 50.eml failed to add to sph_index table: 51.eml failed to add to sph_index table: 52.eml failed to add to sph_index table: 53.eml failed to add to sph_index table: 54.eml failed to add to sph_index table: 55.eml failed to add to sph_index table: 56.eml failed to add to sph_index table: 57.eml failed to add to sph_index table: 58.eml failed to add to sph_index table: 59.eml failed to add to sph_index table: 60.eml failed to add to sph_index table: 61.eml failed to add to sph_index table: 62.eml failed to add to sph_index table: 63.eml failed to add to sph_index table: 64.eml failed to add to sph_index table: 65.eml failed to add to sph_index table: 66.eml failed to add to sph_index table: 67.eml failed to add to sph_index table: 68.eml failed to add to sph_index table: 69.eml failed to add to sph_index table: 70.eml failed to add to sph_index table: 71.eml failed to add to sph_index table: 72.eml failed to add to sph_index table: 73.eml failed to add to sph_index table: 74.eml failed to add to sph_index table: 75.eml failed to add to sph_index table: 76.eml failed to add to sph_index table: 77.eml failed to add to sph_index table: 78.eml failed to add to sph_index table: 79.eml failed to add to sph_index table: 80.eml failed to add to sph_index table: 81.eml failed to add to sph_index table: 82.eml failed to add to sph_index table: 83.eml failed to add to sph_index table: 84.eml failed to add to sph_index table: 85.eml failed to add to sph_index table: 86.eml failed to add to sph_index table: 87.eml failed to add to sph_index table: 88.eml failed to add to sph_index table: 89.eml failed to add to sph_index table: 90.eml failed to add to sph_index table: 91.eml failed to add to sph_index table: 92.eml failed to add to sph_index table: 93.eml failed to add to sph_index table: 94.eml failed to add to sph_index table: 95.eml failed to add to sph_index table: 96.eml failed to add to sph_index table: 97.eml failed to add to sph_index table: 98.eml failed to add to sph_index table: 99.eml failed to add to sph_index table: 100.eml failed to add to sph_index table: 101.eml failed to add to sph_index table: 102.eml failed to add to sph_index table: 103.eml failed to add to sph_index table: 104.eml failed to add to sph_index table: 105.eml failed to add to sph_index table: 106.eml failed to add to sph_index table: 107.eml failed to add to sph_index table: 108.eml failed to add to sph_index table: 109.eml failed to add to sph_index table: 110.eml failed to add to sph_index table: 111.eml failed to add to sph_index table: 112.eml failed to add to sph_index table: 113.eml failed to add to sph_index table: 114.eml failed to add to sph_index table: 115.eml failed to add to sph_index table: 116.eml failed to add to sph_index table: 117.eml failed to add to sph_index table: 118.eml failed to add to sph_index table: 119.eml failed to add to sph_index table: 120.eml failed to add to sph_index table: 121.eml failed to add to sph_index table: 122.eml failed to add to sph_index table: 123.eml failed to add to sph_index table: 124.eml failed to add to sph_index table: 125.eml failed to add to sph_index table: 126.eml failed to add to sph_index table: 127.eml failed to add to sph_index table: 128.eml failed to add to sph_index table: 129.eml failed to add to sph_index table: 130.eml failed to add to sph_index table: 131.eml failed to add to sph_index table: 132.eml failed to add to sph_index table: 133.eml failed to add to sph_index table: 134.eml failed to add to sph_index table: 135.eml failed to add to sph_index table: 136.eml failed to add to sph_index table: 137.eml failed to add to sph_index table: 138.eml failed to add to sph_index table: 139.eml failed to add to sph_index table: 140.eml failed to add to sph_index table: 141.eml failed to add to sph_index table: 142.eml failed to add to sph_index table: 143.eml failed to add to sph_index table: 144.eml failed to add to sph_index table: 145.eml failed to add to sph_index table: 146.eml failed to add to sph_index table: 147.eml failed to add to sph_index table: 148.eml failed to add to sph_index table: 149.eml failed to add to sph_index table: 150.eml failed to add to sph_index table: 151.eml failed to add to sph_index table: 152.eml failed to add to sph_index table: 153.eml put 0 messages to sph_index table for reindexing root@piler:/tmp# ls /var/piler/sphinx -l total 300 -rw-r--r-- 1 piler piler 4452 Sep 13 22:35 dailydelta1.spa -rw-r--r-- 1 piler piler 62034 Sep 13 22:35 dailydelta1.spd -rw-r--r-- 1 piler piler 582 Sep 13 22:35 dailydelta1.sph -rw-r--r-- 1 piler piler 1048 Sep 13 22:35 dailydelta1.spi -rw-r--r-- 1 piler piler 0 Sep 13 22:35 dailydelta1.spk -rw------- 1 piler piler 0 Sep 13 22:39 dailydelta1.spl -rw-r--r-- 1 piler piler 0 Sep 13 22:35 dailydelta1.spm -rw-r--r-- 1 piler piler 70493 Sep 13 22:35 dailydelta1.spp -rw-r--r-- 1 piler piler 1 Sep 13 22:35 dailydelta1.sps -rw-r--r-- 1 piler piler 196 Sep 13 22:35 delta1.spa -rw-r--r-- 1 piler piler 1359 Sep 13 22:35 delta1.spd -rw-r--r-- 1 piler piler 582 Sep 13 22:35 delta1.sph -rw-r--r-- 1 piler piler 744 Sep 13 22:35 delta1.spi -rw-r--r-- 1 piler piler 0 Sep 13 22:35 delta1.spk -rw------- 1 piler piler 0 Sep 13 22:35 delta1.spl -rw-r--r-- 1 piler piler 0 Sep 13 22:35 delta1.spm -rw-r--r-- 1 piler piler 1039 Sep 13 22:35 delta1.spp -rw-r--r-- 1 piler piler 1 Sep 13 22:35 delta1.sps -rw-r--r-- 1 piler piler 0 Sep 13 22:39 main1.spa -rw-r--r-- 1 piler piler 1 Sep 13 22:39 main1.spd -rw-r--r-- 1 piler piler 582 Sep 13 22:39 main1.sph -rw-r--r-- 1 piler piler 1 Sep 13 22:39 main1.spi -rw-r--r-- 1 piler piler 0 Sep 13 22:39 main1.spk -rw-r--r-- 1 piler piler 0 Sep 13 22:39 main1.spm -rw-r--r-- 1 piler piler 1 Sep 13 22:39 main1.spp -rw-r--r-- 1 piler piler 1 Sep 13 22:39 main1.sps -rw-r--r-- 1 piler piler 0 Sep 13 22:39 main2.spa -rw-r--r-- 1 piler piler 1 Sep 13 22:39 main2.spd -rw-r--r-- 1 piler piler 582 Sep 13 22:39 main2.sph -rw-r--r-- 1 piler piler 1 Sep 13 22:39 main2.spi -rw-r--r-- 1 piler piler 0 Sep 13 22:39 main2.spk -rw-r--r-- 1 piler piler 0 Sep 13 22:39 main2.spm -rw-r--r-- 1 piler piler 1 Sep 13 22:39 main2.spp -rw-r--r-- 1 piler piler 1 Sep 13 22:39 main2.sps -rw-r--r-- 1 piler piler 0 Sep 13 22:39 main3.spa -rw-r--r-- 1 piler piler 1 Sep 13 22:39 main3.spd -rw-r--r-- 1 piler piler 582 Sep 13 22:39 main3.sph -rw-r--r-- 1 piler piler 1 Sep 13 22:39 main3.spi -rw-r--r-- 1 piler piler 0 Sep 13 22:39 main3.spk -rw-r--r-- 1 piler piler 0 Sep 13 22:39 main3.spm -rw-r--r-- 1 piler piler 1 Sep 13 22:39 main3.spp -rw-r--r-- 1 piler piler 1 Sep 13 22:39 main3.sps -rw-r--r-- 1 piler piler 0 Sep 13 22:39 main4.spa -rw-r--r-- 1 piler piler 1 Sep 13 22:39 main4.spd -rw-r--r-- 1 piler piler 582 Sep 13 22:39 main4.sph -rw-r--r-- 1 piler piler 1 Sep 13 22:39 main4.spi -rw-r--r-- 1 piler piler 0 Sep 13 22:39 main4.spk -rw-r--r-- 1 piler piler 0 Sep 13 22:39 main4.spm -rw-r--r-- 1 piler piler 1 Sep 13 22:39 main4.spp -rw-r--r-- 1 piler piler 1 Sep 13 22:39 main4.sps -rw-r--r-- 1 piler piler 0 Sep 13 22:30 note1.spa -rw-r--r-- 1 piler piler 1 Sep 13 22:30 note1.spd -rw-r--r-- 1 piler piler 289 Sep 13 22:30 note1.sph -rw-r--r-- 1 piler piler 1 Sep 13 22:30 note1.spi -rw-r--r-- 1 piler piler 0 Sep 13 22:30 note1.spk -rw------- 1 piler piler 0 Sep 13 22:30 note1.spl -rw-r--r-- 1 piler piler 0 Sep 13 22:30 note1.spm -rw-r--r-- 1 piler piler 1 Sep 13 22:30 note1.spp -rw-r--r-- 1 piler piler 1 Sep 13 22:30 note1.sps -rw-r--r-- 1 piler piler 0 Sep 13 22:30 tag1.spa -rw-r--r-- 1 piler piler 1 Sep 13 22:30 tag1.spd -rw-r--r-- 1 piler piler 288 Sep 13 22:30 tag1.sph -rw-r--r-- 1 piler piler 1 Sep 13 22:30 tag1.spi -rw-r--r-- 1 piler piler 0 Sep 13 22:30 tag1.spk -rw------- 1 piler piler 0 Sep 13 22:30 tag1.spl -rw-r--r-- 1 piler piler 0 Sep 13 22:30 tag1.spm -rw-r--r-- 1 piler piler 1 Sep 13 22:30 tag1.spp -rw-r--r-- 1 piler piler 1 Sep 13 22:30 tag1.sps root@piler:/tmp#

  5. Andy Vo

    All work properly now. The ex 2013 journal rule was not fully enabled. Now, continue the testing with the window ad and synchronization...

    Thanks, Andy

  6. Log in to comment