AOP failing after upgrade 7.8.3

Hi there,

AOP worked always just fine, but since the upgrade to 7.8.3 it’s not working at all. Tried a lot to fix it, but I can’t get it to work. The mailboxes are reachable, if I open the mailboxes directly in the mail application, the mailboxes show up. Cronjobs are working. However, AOP is not working. Why is this and how can I fix it for now our customer support isn’t able to read their mails.

What is your PHP version? There are known issues with 7.8.3 when PHP is 5.3.

Hi there. It’s version PHP 5.6.30-0+deb8u1

Hhmm ok, so we’ve ruled that one out.

Maybe you can look in your logs (see my blog below for a post on where to find your logs). I’m sure you’ll see some error there.

Hi there. I can’t seem to find any errors. I checked the logs multiple times, but can’t find an AOP related error. It just seems like, the moment I updated to 7.8.3, the whole AOP just doesn’t work anymore. I even installed a new instance (with the old database and config) but that’s not working either…

Did you check also php_errors.log? Nothing there at the time when you try to load AOP?

It seems to not be running the task that’s scheduled. When I check the task log, the last time it actually ran the task was right before the upgrade. So for some reason it’s not running the task. However, when I check the cronlog, it gives me this.

Apr 19 12:53:01 presstowork CRON[840]: (nginx) CMD (cd /usr/share/nginx/html/voypcrm; php -f cron.php > /dev/null 2>&1 )
Apr 19 12:53:08 presstowork kernel: [ 73.325182] [UFW BLOCK] IN=eth0 OUT= MAC=52:54:00:1f:8a:28:ec:13:db:94:28:c0:08:00 SRC=124.169.219.230 DST=149.210.155.66 LEN=40 TOS=0x00 PREC=0x00 TTL=241 ID=13900 PROTO=TCP SPT=41390 DPT=7547 WINDOW=14600 RES=0x00 SYN URGP=0
Apr 19 12:53:10 presstowork kernel: [ 74.956078] [UFW BLOCK] IN=eth0 OUT= MAC=52:54:00:1f:8a:28:ec:13:db:94:28:c0:08:00 SRC=115.84.77.50 DST=149.210.155.66 LEN=40 TOS=0x00 PREC=0x00 TTL=242 ID=59670 PROTO=TCP SPT=50296 DPT=7547 WINDOW=14600 RES=0x00 SYN URGP=0
Apr 19 12:53:14 presstowork kernel: [ 79.368786] [UFW BLOCK] IN=eth0 OUT= MAC=52:54:00:1f:8a:28:80:ac:ac:69:ff:00:08:00 SRC=91.223.133.13 DST=149.210.155.66 LEN=40 TOS=0x08 PREC=0x20 TTL=246 ID=53075 PROTO=TCP SPT=41693 DPT=7100 WINDOW=1024 RES=0x00 SYN URGP=0
Apr 19 12:53:15 presstowork kernel: [ 80.680771] [UFW BLOCK] IN=eth0 OUT= MAC=52:54:00:1f:8a:28:80:ac:ac:69:ff:00:08:00 SRC=89.163.210.76 DST=149.210.155.66 LEN=444 TOS=0x00 PREC=0x00 TTL=56 ID=0 DF PROTO=UDP SPT=5139 DPT=5060 LEN=424

However, it gave similar results yesterday, when it was still working fine.

Apr 18 15:40:01 presstowork CRON[14171]: (nginx) CMD (cd /usr/share/nginx/html/voypcrm; php -f cron.php > /dev/null 2>&1 )
Apr 18 15:40:36 presstowork kernel: [4911358.981651] [UFW BLOCK] IN=eth0 OUT= MAC=52:54:00:1f:8a:28:80:ac:ac:69:ff:00:08:00 SRC=178.33.27.173 DST=149.210.155.66 LEN=60 TOS=0x00 PREC=0x20 TTL=52 ID=48261 DF PROTO=TCP SPT=36528 DPT=25 WINDOW=14600 RES=0x00 SYN URGP=0
Apr 18 15:40:37 presstowork kernel: [4911359.979624] [UFW BLOCK] IN=eth0 OUT= MAC=52:54:00:1f:8a:28:80:ac:ac:69:ff:00:08:00 SRC=178.33.27.173 DST=149.210.155.66 LEN=60 TOS=0x00 PREC=0x20 TTL=52 ID=48262 DF PROTO=TCP SPT=36528 DPT=25 WINDOW=14600 RES=0x00 SYN URGP=0
Apr 18 15:40:39 presstowork kernel: [4911361.983751] [UFW BLOCK] IN=eth0 OUT= MAC=52:54:00:1f:8a:28:80:ac:ac:69:ff:00:08:00 SRC=178.33.27.173 DST=149.210.155.66 LEN=60 TOS=0x00 PREC=0x20 TTL=52 ID=48263 DF PROTO=TCP SPT=36528 DPT=25 WINDOW=14600 RES=0x00 SYN URGP=0
Apr 18 15:40:43 presstowork kernel: [4911365.991735] [UFW BLOCK] IN=eth0 OUT= MAC=52:54:00:1f:8a:28:80:ac:ac:69:ff:00:08:00 SRC=178.33.27.173 DST=149.210.155.66 LEN=60 TOS=0x00 PREC=0x20 TTL=52 ID=48264 DF PROTO=TCP SPT=36528 DPT=25 WINDOW=14600 RES=0x00 SYN URGP=0
Apr 18 15:40:51 presstowork kernel: [4911373.999580] [UFW BLOCK] IN=eth0 OUT= MAC=52:54:00:1f:8a:28:80:ac:ac:69:ff:00:08:00 SRC=178.33.27.173 DST=149.210.155.66 LEN=60 TOS=0x00 PREC=0x20 TTL=52 ID=48265 DF PROTO=TCP SPT=36528 DPT=25 WINDOW=14600 RES=0x00 SYN URGP=0
Apr 18 15:40:55 presstowork kernel: [4911377.529744] [UFW BLOCK] IN=eth0 OUT= MAC=52:54:00:1f:8a:28:ec:13:db:94:28:c0:08:00 SRC=121.52.154.147 DST=149.210.155.66 LEN=52 TOS=0x08 PREC=0x20 TTL=113 ID=30943 DF PROTO=TCP SPT=62569 DPT=25 WINDOW=8192 RES=0x00 SYN URGP=0
Apr 18 15:40:58 presstowork kernel: [4911380.527377] [UFW BLOCK] IN=eth0 OUT= MAC=52:54:00:1f:8a:28:ec:13:db:94:28:c0:08:00 SRC=121.52.154.147 DST=149.210.155.66 LEN=52 TOS=0x08 PREC=0x20 TTL=113 ID=31433 DF PROTO=TCP SPT=62569 DPT=25 WINDOW=8192 RES=0x00 SYN URGP=0

Ok, can you please post the section about “cron” from your “config.php” file? (Put it inside tags when you post it here in the forums).

There were changes in the handling of cron jobs in 7.8.3., so something might have gone wrong with that…

This is the code of the config.php in 7.7.9

 array (
    'max_cron_jobs' => 10,
    'max_cron_runtime' => 30,
    'min_cron_interval' => 30,
  ),

This is the code of the config.php in 7.8.3


  array (
    'max_cron_jobs' => 10,
    'max_cron_runtime' => 30,
    'min_cron_interval' => 30,
    'allowed_cron_users' =>
    array (
      0 => 'www-data',
    ),
  ),

Ok, so your problem is that you’re running your web server as user www-data, but you’re running the cron jobs as user nginx.

7.8.3 now has a check that only allowed users can run cron. You should have this explained in your suitecrm.log, maybe you missed it because you were only looking for AOP errors, but you should always look for any “fatal” and “error” messages when troubleshooting.

Also, the Release Notes of 7.8.3 warn about this change, you should always pay attention to Release notes before installing anything, especially in production).

The normal recommendation is to run the jobs with the same user as the web server, to avoid one process messing up permissions for the other. So you might want to change the crontabs appropriately (see my blog below for a post on scheduler jobs, it explains everything).

The other way around it would be to add an entry to cron_allowed_users array to allow nginx, but that seems a worse option.

2 Likes

You, kind sir, just saved my life. Thanks!