No mails in web GUI after docker container was re-created

Issue #1136 resolved
Unknown created an issue

I am using piler in a docker container. /var/piler files are on a permanent volume:

volumes:
- /mailarchive/piler/data:/var/piler
- /mailarchive/piler/config:/etc/piler

When re-creating the docker container (docker-compose up -d) all mails in the web gui are gone (admin dashboard shows me about 100k mails that have been indexed which is correct). When running indexer.delta, I get an error:

/usr/libexec/piler/indexer.delta.sh

FATAL: failed to merge index 'delta1' into index 'dailydelta1': kbatch target 'main1' from merge source index must also be in destination index

What I have to do then:

\$ rm -f /var/piler/sphinx/*
\$ su -c "indexer --all --config /etc/piler/sphinx.conf" piler
\$ /usr/bin/searchd --config /etc/piler/sphinx.conf
\$ su - piler
\$ cd /var/piler/tmp
\$ reindex -f 1 -t 100;
\$ /usr/libexec/piler/indexer.delta.sh

After that, 100 mails are visible. Thus, I reindex all mails:
\$ su - piler && reindex -a

After that everything is fine till next docker-compose down && docker-compose up -d

What can be wrong? I am using the start.sh of your master tree …

Comments (3)

  1. Janos SUTO repo owner

    After the next docker-compose down and up, verify that searchd can read all index data when it starts.

    If so, then run the main indexer, and let’s see what happens.

  2. Unknown reporter

    Thanks for your help. In fact there have been some index files with incorrect rights - I have to investigate this. After setting the rights correctly and running the indexer all mails appeared in web gui.

  3. Log in to comment