mo10
October 4, 2021, 2:59am
1
Hello,
inside Maintenance (free) the “Clear Oldest CDR” is not working. I tried it with 1 or 10 days.
Tried cron (ever 1 minute) and i tried “Execute Now”. None worked. TOP did not show any action.
Vitalpbx: 3.1.1-3. Was not working with an older version either.
Thanks
Is this a multi tenant it standard install?
miguel
October 4, 2021, 6:45pm
3
Could please check if the file “/var/lib/vitalpbx/maintenance.pid” exists? if yes, then delete it.
You can try executing the script manually in debug mode. depending on your data, it might take some time.
/usr/share/vitalpbx/scripts/maintenance.php --debug
1 Like
mo10
October 4, 2021, 8:57pm
4
@PitzKey : standard install. No MT.
@miguel
no maintenance.pid there
/var/lib/vitalpbx/ ls addons cache dbsetup-done fax firewall_zones provisioning scripts static system_misc vitalpbx.dat
and
/usr/share/vitalpbx/scripts/maintenance.php --debug
does absolut nothing.
miguel
October 4, 2021, 9:27pm
5
Something is surely wrong with your installation. I’ve tested in an almost brand new installation. Check the result in the screenshot.
mo10
October 4, 2021, 9:55pm
6
Just uninstalled and reinstalled the Maintenance Add-on again: same problem.
miguel
October 4, 2021, 9:57pm
7
Could you please share the maintenance Settings?
mo10
October 4, 2021, 10:01pm
8
And i tried Enabled as well with Cron set to every minute.
miguel
October 4, 2021, 10:06pm
9
It is required to set up a CRON and also set the option “Enabled” to “Yes.” After fulfilling the requirements execute the script again.
mo10
October 4, 2021, 10:15pm
10
As i told you before, it’s not doing anything:
miguel
October 4, 2021, 10:23pm
11
I’ve tested in another server with no data.
mo10
October 4, 2021, 10:28pm
12
From when is your maintenance.php?
Please uninstall addon and install it again. Then try again.
Thanks
miguel
October 4, 2021, 10:30pm
13
Actually, the maintenance was not installed on that server, so I have to installed before the test.
mo10
October 4, 2021, 10:35pm
14
Do you have any other idea?
PitzKey
October 5, 2021, 10:17am
15
I just tested on a lab PBX, that has maintenance unlicensed.
[root@vitalpbx1 ~]# /usr/share/vitalpbx/scripts/maintenance.php --debug
Starting Maintenance for Tenant VitalPBX...
Setting up timezone: America/New_York
Cleaning CDR (365 days old)...
Processing Recordings...
Clean Voicemail...
Deleting Old Recording: /var/spool/asterisk/voicemail/vitalpbx-voicemail/9003/INBOX/msg0000.wav
<snip>
...
</snip>
Deleting Old Recording: /var/spool/asterisk/voicemail/vitalpbx-voicemail/104/Deleted/msg0003.wav
Done
[root@vitalpbx1 ~]# ll /usr/share/vitalpbx/scripts/ | grep maint
-rwxr-xr-x 1 root root 13682 Sep 27 03:16 maintenance.php
However, I also don’t see a maintenance PID.
[root@vitalpbx1 ~]# ll /var/lib/vitalpbx/
total 60
drwxr-sr-x+ 2 apache apache 4096 Sep 27 23:41 addons
drwxrwsr-x+ 10 apache vitalpbx 4096 Sep 27 23:41 cache
-rw-rw-r--+ 1 root vitalpbx 0 Dec 8 2020 dbsetup-done
drwxrwsr-x+ 5 apache vitalpbx 4096 Sep 27 23:41 fax
drwxrwsr-x+ 2 apache vitalpbx 4096 Sep 27 23:41 firewall_zones
drwxrwsr-x+ 6 root vitalpbx 4096 Jan 25 2021 provisioning
drwxrwsr-x+ 2 apache vitalpbx 4096 Sep 27 23:41 scripts
drwxrwsr-x+ 7 apache vitalpbx 4096 Sep 27 23:41 static
drwxrwsr-x+ 2 root vitalpbx 4096 Dec 8 2020 system_misc
-rw-rw-r--+ 1 apache vitalpbx 618 Dec 8 2020 vitalpbx.dat
miguel
October 5, 2021, 6:33pm
16
The maintenance PID is deleted once the process is finished. This file is to avoid the server generating multiple processes with the same script. However, this file could remain for some reason avoiding the script run again.