auditor returns zero search results

Issue #1066 resolved
Christian created an issue

Hi,

I have tried to reindex witch “indexer --all” but it only seems to index the att1

indexing index 'main1'...
collected 0 docs, 0.0 MB
total 0 docs, 0 bytes
total 0.003 sec, 0 bytes/sec, 0.00 docs/sec
indexing index 'main2'...
collected 0 docs, 0.0 MB
total 0 docs, 0 bytes
total 0.002 sec, 0 bytes/sec, 0.00 docs/sec
indexing index 'main3'...
collected 0 docs, 0.0 MB
total 0 docs, 0 bytes
total 0.002 sec, 0 bytes/sec, 0.00 docs/sec
indexing index 'main4'...
collected 0 docs, 0.0 MB
total 0 docs, 0 bytes
total 0.001 sec, 0 bytes/sec, 0.00 docs/sec
indexing index 'dailydelta1'...
collected 0 docs, 0.0 MB
total 0 docs, 0 bytes
total 0.001 sec, 0 bytes/sec, 0.00 docs/sec
indexing index 'delta1'...
collected 0 docs, 0.0 MB
total 0 docs, 0 bytes
total 0.004 sec, 0 bytes/sec, 0.00 docs/sec
indexing index 'tag1'...
collected 0 docs, 0.0 MB
total 0 docs, 0 bytes
total 0.001 sec, 0 bytes/sec, 0.00 docs/sec
indexing index 'note1'...
collected 0 docs, 0.0 MB
total 0 docs, 0 bytes
total 0.001 sec, 0 bytes/sec, 0.00 docs/sec
indexing index 'att1'...
collected 234356 docs, 24.4 MB
sorted 1.9 Mhits, 100.0% done
total 234356 docs, 24379339 bytes

what can i do to troubleshoot this?

Comments (17)

  1. Janos SUTO repo owner

    Read the docs first. Really. indexer --all initializes or resets the index data. It’s not reindexing.

    Now run reindex -a command, then run indexer.delta.sh as user piler. Then show me the output of ls -la /var/piler/sphinx

  2. Christian reporter

    i did a

    rm -R /var/piler/sphinx/*
    

    before running indexer --all as suggested in Ticket Issue #535.

    The output of reindex -a is

    $ reindex -a
    put 370882 messages to sph_index table for reindexing
    you have mail
    

  3. Christian reporter
    • changed status to open

    The problem occurs again. I suppose it has to do with the cron jobs. Yesterday evening after "reindex -a" it worked.

  4. Christian reporter

    I have the following cron jobs:

    */15 * * * * /usr/bin/indexer --quiet delta1 --rotate && sleep 2 && /usr/bin/indexer --quiet --merge main1 delta1 --merge-dst-range deleted 0 0 --rotate

    */15 * * * * /usr/bin/indexer --quiet tag1 --rotate

    */15 * * * * /usr/bin/indexer --quiet note1 --rotate

    could this be the reason for no results with the auditor account?

  5. Janos SUTO repo owner

    What piler and sphinx versions do you have? Where did these cron jobs come from? Also how do you start searchd?

  6. Janos SUTO repo owner

    My bad. I’ve fixed that page. Be sure to update the cron jobs. Also make sure nobody ever runs indexer --all. Only user piler should touch the sphinx index files.

  7. Christian reporter

    Thanks. I updated the cron jobs and ran a reindex -a.
    Sadly it did not solve my problem.
    There are still zero results in auditor account.
    Then i purged the directory /var/piler/sphinx and ran indexer --all again. That did not help either. Now im running reindex -a again, this will take a few hours.
    What can i do to troubleshoot this?

  8. Janos SUTO repo owner

    OK, let’s summarize it:

    • don’t run indexer --all
    • make sure nobody ever touches the sphinx index files except piler

    After reindexing you should have all your indices back. Then do the following. Record the file sizes in /var/piler/sphinx

    Then every 15 minutes do the same. At some point you may notice that your indexed data is gone, ie. the index files are small. Then figure out what’s going on at that time.

  9. Christian reporter

    No, that did not work. I get no results as auditor.
    I get this output from reindex -a

    ...
    failed to add to sph_index table: 370918.eml
    failed to add to sph_index table: 370919.eml
    failed to add to sph_index table: 370920.eml
    failed to add to sph_index table: 370921.eml
    failed to add to sph_index table: 370922.eml
    failed to add to sph_index table: 370923.eml
    processed:        0 [  0%]
    put 0 messages to sph_index table for reindexing
    piler@a5ca76dde0eb:/tmp$
    

    The strange thing is last time it said processed 100%.

    I attached a file with the output of ls -lah /var/piler/sphinx
    I don’t know what is wrong, i did not change anything besides recreate the index and do reindex. Just the day before yesterday it worked (momentarily though, but still).

    What can i do?

  10. Janos SUTO repo owner

    You got 0 processed, because the messages are already in the sph_index table. Run indexer.delta.sh script as user piler. It will read the sph_index table, and empty it, while updating the index files.

  11. Christian reporter

    I tried that. Still zero results in Auditor.

    Might you be interested in trying to find the error via tmate? I would have permission to give you shell access to our server.

  12. Janos SUTO repo owner

    Yes, let me do an on site troubleshoot to figure out what’s wrong. Use piler -V to get my email address to discuss the details.

  13. Log in to comment