new install running into problems - Version piler-0.1.25-rc1

Issue #297 wontfix
Michael Busch created an issue

After a fresh install opening the Health screen will give a 100CPU and no space projection but the following in the piler log: PHP Warning: opendir(/var/piler/sphinx/): failed to open dir: Permission denied in /var/www/html/mailarchive/model/health/health.php on line 196, referer: http://<servername>/index.php?route=health/health

Doing an Acounting Search will result in no result but in the following log Entry

PHP Notice: Undefined variable: search_cond in /var/www/html/mailarchive/model/accounting/accounting.php on line 171, referer: http://<server>/index.php?route=accounting/accounting&view=email

Searching as regular user will not give any result

what did i do wrong during the installation

Comments (15)

  1. Janos SUTO repo owner

    You did the installation right, just a few fixes you need:

    chmod 755 /var/piler/sphinx

    I also assume you have some emails in the archive. First try the following: hit the search button as a regular user, then check your maillog, and see if the sphinx query is appropriate, and returns some hits.

    For the accounting to work check if the piler's crontab has an entry for generate_stats.php, and running it gives no error messages.

    The 100% cpu is also interesting, since you should have an mpstat command execution.

  2. Former user Account Deleted

    Regarding the 100% cpu, you might want to check if your webserver can access and read

    /var/piler/stat/cpu.stat

    I ran into this problem before (cpu.stat holds the idle value, which is substracted from a 100%, thus yieliding 100% cpu usage when the file cannot be accessed.)

    Alex

  3. Janos SUTO repo owner

    The rc1 version should have the following in controller/health/worker.php:

    $x = exec(CPU_USAGE_COMMAND);

    And in config.php the following:

    $config['CPU_USAGE_COMMAND'] = "LC_ALL=C mpstat | tail -1 | awk '{print $11}'";

    So it makes the cpu usage real time, and eliminates the cpu.stat permission problem.

  4. Michael Busch reporter

    Did all the checks - and not much on the helth screen side CPU 100% entries are as expected. changed the Crontab to:

    /12 * * /usr/local/libexec/piler/indexer.delta.sh /5 * * /usr/local/libexec/piler/indexer.main.sh /14 * * /usr/bin/indexer --quiet tag1 --rotate /8 * * /usr/bin/indexer --quiet note1 --rotate /10 * * /usr/bin/php /usr/local/libexec/piler/generate_stats.php --webui /var/www/html/mailarchive /5 * * /usr/bin/find /var/www/html/mailarchive/tmp -type f -name i.* -exec rm -f {} \; to get more redo events and perhaps that changes the situation

    Changed the access rights.

    found the following in the system logfile pilerconf: unknown key: "mydomains" - Domains have been defined in the interfact - system stores mails. Wondering about the "mapped to" in the domain defininiton I did 1:1 for the domains here Server has an other domain than all the mails comming in.

    Piler log contains: PHP Warning: opendir(/var/piler/sphinx/): failed to open dir: Permission denied in /var/www/html/mailarchive/model/health/health.php on line 196, referer: ...

    Changed Access right even to:

    drwxr--r-- 2 piler piler 4096 May 2 15:01 imap drwxr-x--- 2 piler piler 4096 May 7 20:25 sphinx drwxr-xr-x 2 piler piler 4096 May 2 18:35 stat drwxr--r-- 3 piler piler 4096 May 2 19:58 store drwxr-xr-x 2 piler piler 4096 May 7 20:10 tmp

    even with chmod 750 to all files in /var/piler/sphinx no change in situation

    as i notice piler wil rest the right when run as you can see

    -rw-r--r-- 1 piler piler 0 May 7 20:25 dailydelta1.spa -rw-r--r-- 1 piler piler 1 May 7 20:25 dailydelta1.spd -rw-r--r-- 1 piler piler 582 May 7 20:25 dailydelta1.sph -rw-r--r-- 1 piler piler 1 May 7 20:25 dailydelta1.spi -rw-r--r-- 1 piler piler 0 May 7 20:25 dailydelta1.spk -rw------- 1 piler piler 0 May 7 20:25 dailydelta1.spl -rw-r--r-- 1 piler piler 0 May 7 20:25 dailydelta1.spm -rw-r--r-- 1 piler piler 1 May 7 20:25 dailydelta1.spp -rw-r--r-- 1 piler piler 1 May 7 20:25 dailydelta1.sps -rwxr-x--- 1 piler piler 0 May 7 20:24 delta1.spa -rwxr-x--- 1 piler piler 1 May 7 20:24 delta1.spd -rwxr-x--- 1 piler piler 582 May 7 20:24 delta1.sph -rwxr-x--- 1 piler piler 1 May 7 20:24 delta1.spi -rwxr-x--- 1 piler piler 0 May 7 20:24 delta1.spk

    Accounting search will now deliver a result ... not that I am sure that I like the result as most mails to the domain are getting lost at the moment but that we can figure out in a next step

  5. Janos SUTO repo owner

    Can we arrange a teamviewer session to fix things? If so then please find me on skype (janos.suto).

  6. Michael Busch reporter

    yes we can, but next week as I am out of the office til then. Thanks for the offer anything in logging I should start to get some more things to lookt at?

  7. Michael Busch reporter

    OK solved one issue - CPU bar down to "normal" - Background I am always using a minimal installation of CentOS and than add a few local packages that I use in the environment on all systems. The missing installation was:

    yum install sysstat -y

    wich will bring "mpstat" to the system used in the health screen

    ok Accounting works, only the directory error is still there /var/www/html/mailarchive/model/health/health.php on line 196, referer: ...

  8. Janos SUTO repo owner

    You may fix the last issue by either adding 755 permissions on /var/piler/sphinx or chgrp apache /var/piler/sphinx. Otherwise the webserver can't count the sum of the filesizes inside.

  9. Michael Busch reporter

    Did change the user to apache:apache - no change in results, Access Rightst to A+rw - no change ... is there a way to start logging into this?

  10. Michael Busch reporter

    can it be that the programm realy searches for a real /var patition ? ... I do not have one

    df -h Filesystem Size Used Avail Use% Mounted on /dev/simfs 40G 1.8G 39G 5% / none 512M 4.0K 512M 1% /dev none 512M 0 512M 0% /dev/shm

  11. Janos SUTO repo owner

    I didn't advise to change to apache:apache, I suggested to change the group only. Now that you have made the directory owned by apache user piler has difficulties to write to /var/piler/sphinx.

    Again, all you have to do is to let the webserver group access the /var/piler/sphinx directory.

  12. Michael Busch reporter

    Soory for beeing a bit slow. Did try all combinations of access rights and Owership as well as Groups. Always the same error - gould it be that the real error is happening some statements earlyer and only on this line is shown?

  13. Log in to comment