P users being logged out every 15 minutes

Since we changed the user management to Active Directory,
all users are being logged off UCP exactly every 15 minutes (eg:
1400hrs, 1415, 1430, 1445, 1500).

Changing back to FreePBX internal directory fixes things –
users are not logged out by the system at all.

We tried changing the AD synchronization setting, but that
does not change the situation (currently set to 6 hours)

Currently running FreePBX 13.0.74, with latest (today)
updates.

At 6 hours it should log them out every six hours. You can confirm this by checking the crontab yourself.

Crontab -u asterisk -l

Many thanks Andrew,

I think I have found the problem…
As you suggested, I looked at crontab and saw this:

56 * * * * /var/lib/asterisk/bin/freepbx-cron-scheduler.php
@daily [ -e /var/www/html/admin/modules/sysadmin/bin/check_portal.php ] && /var/www/html/admin/modules/sysadmin/bin/check_portal.php
@daily [ -x /var/lib/asterisk/bin/freepbx_sipstation_check ] && /var/lib/asterisk/bin/freepbx_sipstation_check
50 * * * * /usr/local/sbin/fwconsole util cleanplaybackcache -q
* * * * * [ -x /var/www/html/admin/modules/dashboard/scheduler.php ] && /var/www/html/admin/modules/dashboard/scheduler.php
@weekly ID=freepbx_backup_3 /var/lib/asterisk/bin/backup.php --id=3
*/15 * * * * /usr/local/sbin/fwconsole userman sync
*/5 * * * * [ -e /var/www/html/admin/modules/qxact_reports/import_queue_data.php ] && php /var/www/html/admin/modules/qxact_reports/import_queue_data.php
0 */6 * * * /usr/local/sbin/fwconsole userman sync
@hourly [ -x /var/lib/asterisk/bin/storage.php ] && /var/lib/asterisk/bin/storage.php
@daily [ -x /var/lib/asterisk/agi-bin/update_license.php ] && /var/lib/asterisk/agi-bin/update_license.php --delay

I see there are two entries for the userman sync, one at 15 mins, one at 6 hours.

My conclusion is that when entering a new “synchronise” value in the “Authentication settings” GUI, it add the new entry, but does not remove the original 15 minute default line.

I tested it by changing the value twice more in the GUI, and this time crontab shows:

56 * * * * /var/lib/asterisk/bin/freepbx-cron-scheduler.php
@daily [ -e /var/www/html/admin/modules/sysadmin/bin/check_portal.php ] && /var/www/html/admin/modules/sysadmin/bin/check_portal.php
@daily [ -x /var/lib/asterisk/bin/freepbx_sipstation_check ] && /var/lib/asterisk/bin/freepbx_sipstation_check
50 * * * * /usr/local/sbin/fwconsole util cleanplaybackcache -q
* * * * * [ -x /var/www/html/admin/modules/dashboard/scheduler.php ] && /var/www/html/admin/modules/dashboard/scheduler.php
@weekly ID=freepbx_backup_3 /var/lib/asterisk/bin/backup.php --id=3
*/15 * * * * /usr/local/sbin/fwconsole userman sync
*/5 * * * * [ -e /var/www/html/admin/modules/qxact_reports/import_queue_data.php ] && php /var/www/html/admin/modules/qxact_reports/import_queue_data.php
0 */6 * * * /usr/local/sbin/fwconsole userman sync
@hourly [ -x /var/lib/asterisk/bin/storage.php ] && /var/lib/asterisk/bin/storage.php
@daily [ -x /var/lib/asterisk/agi-bin/update_license.php ] && /var/lib/asterisk/agi-bin/update_license.php --delay
0 * * * * /usr/local/sbin/fwconsole userman sync
*/30 * * * * /usr/local/sbin/fwconsole userman sync

So I have three crontab entries for userman sync.

Is there something I should be doing to clear out the previous entries?

Probably should report a bug for this.

Thanks - where do I go to do that? Can’t find anywhere obvious.

^ Right where it says “issues”

Userman 13.0.52 should remove the extra crons. Go back and change the sync setting and save and it should only have the correct one from now on (or none at all!)

Loaded 13.0.52, and the crontab listing looks correct now.

Time to report a secondary issue that was there before with 13.0.51 - if you select 1 day for sync in the GIU, you get a page full of errors headed:

"Exception
Cron line added didn’t remain in crontab on final check "

  • I saw this once when trying options yesterday, but was focussed on UCP logout issue, now I see it is consistent whenever trying to enter 1 day. All other settings seem to work OK.
1 Like

Thanks. Will fix tomorrow.

PS: Hope you actually drive a Tesla!