cannot open directory: 0

Issue #1135 resolved
TOmi created an issue

System looks good , have a lot of emails messages are storage inside and it is working.

Piler: 1.3.4 build 994

df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/data-arch 985G 717G 227G 76% /var/piler/store
/dev/mapper/database-db 50G 29G 19G 61% /mnt/db

in log’s file I have this problem :

tail -f /var/log/maillog
Jan 20 13:40:39 vPiler piler[11772]: cannot open directory: 5
Jan 20 13:40:39 vPiler piler[11765]: cannot open directory: 1
Jan 20 13:40:39 vPiler piler[11770]: cannot open directory: 4
Jan 20 13:40:39 vPiler piler[11764]: cannot open directory: 0
Jan 20 13:40:39 vPiler piler[11766]: cannot open directory: 2
Jan 20 13:40:40 vPiler piler[11772]: cannot open directory: 5
Jan 20 13:40:40 vPiler piler[11765]: cannot open directory: 1
Jan 20 13:40:40 vPiler piler[11770]: cannot open directory: 4
Jan 20 13:40:40 vPiler piler[11764]: cannot open directory: 0
Jan 20 13:40:40 vPiler piler[11766]: cannot open directory: 2

[root@vPiler piler]# cat /etc/piler/piler.conf

workdir=/var/piler/tmp

[root@vPiler piler]# cat /etc/piler/config-site.php

\$config['DIR_TMP'] = '/var/piler/tmp';

[root@vPiler piler]# ls -l /var/piler/
……
drwxr-xr-x 8 piler piler 4096 Jan 20 13:49 tmp

to fix i changed rights to files to 777

[root@vPiler piler]# ls -l /var/piler/tmp/
total 24
drwxrwxrwx 2 piler piler 4096 Jan 20 13:49 0
drwxrwxrwx 2 piler piler 4096 Jan 20 13:49 1
drwxrwxrwx 2 piler piler 4096 Jan 20 13:49 2
drwxrwxrwx 2 piler piler 4096 Jan 20 13:48 3
drwxrwxrwx 2 piler piler 4096 Jan 20 13:48 4
drwxrwxrwx 2 piler piler 4096 Jan 20 13:48 5

What is wrong ?

Comments (7)

  1. Janos SUTO repo owner

    Permission 777 is definitely not the answer. /var/piler/tmp and all its subdirectories should be owned by piler:piler and have 700 mode on them.

    I can see you have 700 GB archived data, and I assume it was working properly until recently. So what has changed? Is the piler-smtp daemon reports any issues to mail log?

  2. TOmi reporter

    Permission was set to 700 , when I found this logs I changed it to check. This problem generate a lots of mess in logs.

    [root@vPiler var]# ls -l /var/piler/
    total 276
    drwx--x--x. 2 piler piler 4096 Feb 1 2019 error
    drwx------. 2 piler piler 4096 Dec 14 2018 imap
    drwxr-xr-x 2 piler piler 4096 Jan 21 08:18 sphinx
    drwxr-xr-x. 2 piler piler 4096 Dec 14 2018 stat
    drwxr-xr-x 4 piler piler 258048 Mar 15 2019 store
    drwxr-xr-x 8 piler piler 4096 Jan 21 08:27 tmp
    drwxr-xr-x. 15 root root 4096 Apr 9 2019 www
    [root@vPiler var]# ls -l /var/piler/www/
    total 92
    drwxr-xr-x. 4 root root 4096 Dec 14 2018 bootstrap
    -rw-r--r-- 1 root root 16000 Dec 14 2018 config.php
    drwxr-xr-x. 18 root root 4096 Dec 14 2018 controller
    drwxr-xr-x. 8 root root 4096 Dec 14 2018 google-api
    drwxrwx---. 2 root root 4096 Dec 14 2018 images
    drwxr-xr-x 2 root root 4096 Dec 14 2018 img
    -rw-r--r--. 1 root root 3100 Dec 14 2018 index.php
    -rw-r--r--. 1 root root 234 Dec 14 2018 js.php
    drwxr-xr-x. 12 root root 4096 Dec 14 2018 language
    drwxr-xr-x. 2 root root 4096 Mar 5 2019 log
    drwxr-xr-x. 16 root root 4096 Dec 14 2018 model
    -rw-r--r--. 1 root root 3 Dec 14 2018 ok.txt
    -rw-r--r--. 1 root root 1026 Dec 14 2018 qr.php
    drwxr-xr-x. 6 root root 4096 Dec 14 2018 securimage
    -rw-r--r--. 1 root root 767 Dec 14 2018 sso.php
    -rw-r--r-- 1 root root 2332 Apr 9 2019 statisticMy.php
    drwxr-xr-x. 4 root root 4096 Dec 14 2018 system
    drwxrwxrwx. 11 piler apache 4096 Jan 20 12:58 tmp
    drwxr-xr-x. 4 root root 4096 Dec 14 2018 view
    drwxr-xr-x. 4 root root 4096 Dec 14 2018 Zend

  3. TOmi reporter

    Nothing has changed since start of the system .

    durind start of the server in log files I can see problem with directory from 0 to 5 but I set in piler.conf number_of_worker_processes=4 so it is not from this config

    I know what was a reason, piler process couldn't be stop , it look like a zombie process , I killed its and it helped. FInally I restart system. Now it is OK . Thanks for help.

    [root@vPiler piler]# ps -aux | grep piler
    piler 2979 0.0 0.0 166776 1324 ? Ss Jan20 0:02 /usr/local/sbin/piler -d
    piler 2980 0.0 0.2 187108 20828 ? S Jan20 1:10 /usr/local/sbin/piler -d
    piler 2981 0.0 0.2 187440 21152 ? S Jan20 1:03 /usr/local/sbin/piler -d
    piler 2982 0.0 0.3 191148 24844 ? S Jan20 1:16 /usr/local/sbin/piler -d
    piler 2984 0.0 0.2 188652 22368 ? S Jan20 1:16 /usr/local/sbin/piler -d
    piler 2985 0.0 0.2 184116 17824 ? S Jan20 0:54 /usr/local/sbin/piler -d
    piler 2987 0.0 0.2 188828 22536 ? S Jan20 1:16 /usr/local/sbin/piler -d
    piler 6026 0.0 0.0 95364 200 ? S 2020 0:00 searchd --config /etc/piler/sphinx.conf
    piler 6027 0.1 7.9 912908 637724 ? Sl 2020 511:51 searchd --config /etc/piler/sphinx.conf
    piler 11763 0.0 0.0 166776 768 ? Ss 2020 0:39 /usr/local/sbin/piler -d
    piler 11764 0.0 0.2 185664 17212 ? S 2020 10:46 /usr/local/sbin/piler -d
    piler 11765 0.0 0.0 174736 5148 ? S 2020 10:37 /usr/local/sbin/piler -d
    piler 11766 0.0 0.1 181412 11988 ? S 2020 10:41 /usr/local/sbin/piler -d
    piler 11770 0.0 0.1 178720 9848 ? S 2020 10:33 /usr/local/sbin/piler -d
    piler 11772 0.0 0.2 188208 18540 ? S 2020 10:40 /usr/local/sbin/piler -d
    root 18771 0.0 0.0 112712 984 pts/1 R+ 12:59 0:00 grep --color=auto piler

  4. Log in to comment