jsuto / piler

Email archiving application
https://www.mailpiler.org/
Other
62 stars 9 forks source link

Mails not being archived #190

Open swartjie opened 2 hours ago

swartjie commented 2 hours ago

Hey Guys,

I am having an issue with the archiver not archiving anything. I only see these lines in the log: Oct 13 13:50:36 archive piler[26237]: ERROR: 50000000670bd0360dc08fac005cfb9bbac7 failed to store index data for id=7, errno=1064, append ret=0 Oct 13 13:50:36 archive piler[26237]: ERROR: 50000000670bd0360dc08fac005cfb9bbac7: rollback sql stmt=DELETE FROM sph_index WHERE id=7 Oct 13 13:50:36 archive piler[26237]: ERROR: 50000000670bd0360dc08fac005cfb9bbac7: rollback sql stmt=DELETE FROM rcpt WHERE id=7 Oct 13 13:50:36 archive piler[26237]: ERROR: 50000000670bd0360dc08fac005cfb9bbac7: rollback sql stmt=DELETE FROM metadata WHERE id=7 Oct 13 13:50:36 archive piler[26237]: ERROR: 50000000670bd0360dc08fac005cfb9bbac7: rollback sql stmt=DELETE FROM attachment WHERE piler_id='50000000670bd0360dc08fac005cfb9bbac7'

From what I can see the piler service can connect to the db etc. But I am unable to figure out why this error is happening. If it matters, My searchd variable in manticore.conf is:

searchd { listen = 127.0.0.1:9312 listen = 127.0.0.1:9306:mysql listen = 127.0.0.1:9307:mysql_readonly log = /var/piler/manticore/manticore.log binlog_max_log_size = 256M binlog_path = /var/piler/manticore binlog_flush = 2 query_log = /var/piler/manticore/query.log network_timeout = 5 pid_file = /var/run/piler/searchd.pid seamless_rotate = 1 preopen_tables = 1 unlink_old = 1 thread_stack = 512k

https://manticoresearch.com/blog/manticoresearch-buddy-intro/

    # Give a value to the buddy_path variable to enable manticore-buddy
    # Be sure that user piler has read/write access to it
    buddy_path              =

<?php if(RT) { ?> rt_flush_period = 300 <?php } ?>

}

jsuto commented 2 hours ago

Please read #182

swartjie commented 2 hours ago

Please read #182

I have ran into it before posting... If you don't mind expanding... What should I be looking at exactly?

jsuto commented 1 hour ago

The manticore index settings must be consistent in piler.conf, manticore.conf and config-site.php. It seems that piler wants to use a real time (rt) index, but manticore isn't configured so. Show me the manticore tables you have:

mysql -h0 -P9306
show tables;

Btw. probably it's time to release 1.4.7 that fixes this ambiguity. Anyway these are the recommended settings:

piler.conf

rtindex=1
sphxdb=piler1

config-site.php:

$config['RT'] = 1;
$config['SPHINX_MAIN_INDEX'] = 'piler1';

manticore.conf

define('RT', 1);
swartjie commented 1 hour ago

Please read #182

Apologies. I had 2 tabs open and commented on the wrong thread. Will just post here too:

What should I adapt it to? It's currently: /usr/local/etc/piler/manticore.conf:define('RT', 1); and: rtindex=1 in /usr/local/etc/piler/piler.conf

define('RT', 1);

I just checked all 3 config files, and all 3 have the values matching your suggestion above. I just had to add teh SPINX_MAIN_INDEX variable, the rest were in place.

As for the output:

mysql -h0 -P9306

Welcome to the MariaDB monitor. Commands end with ; or \g. Your MySQL connection id is 399 Server version: 6.3.6 593045790@24080214 git branch manticore-6.3.6...origin/manticore-6.3.6

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MySQL [(none)]> show tables; +--------+------+ | Index | Type | +--------+------+ | audit1 | rt | +--------+------+ 1 row in set (0.001 sec)

MySQL [(none)]>

jsuto commented 26 minutes ago

OK. The problem is that you don't have piler1, tag1 and note1 rt index tables. You manticore.conf file must have index {} references for these.

swartjie commented 18 minutes ago

OK. The problem is that you don't have piler1, tag1 and note1 rt index tables. You manticore.conf file must have index {} references for these.

How do i correct the missing tables? And exactly what should I add in the manticore.conf file with regards to the index {}?

Or should I empty a variable?

jsuto commented 1 minute ago

I don't know why manticore.conf doesn't have them in the first place. How did you install piler? Check https://github.com/jsuto/piler/blob/master/etc/manticore.conf.in for starters.