2

We use SugarCRM CE 6.5.16 on Centos 6.5.

I am getting this error :

Wed Apr 9 15:37:10 2014 [10389][1][ERROR] Unable to load custom logic file: include/SugarSearchEngine/SugarSearchEngineQueueManager.php

The real problem is that i dont receive emails from my inbound email.

They are all set up.I added the cron job to the crontab. Well actually I receive some emails, like 3 or 4 from 100. In the schedulers the job status is "running" and last successful run is "Never".

Every other scheduler job has a status "Done" and has last successful run. I repaired inbound emails , scheduler jobs but with no effect.

The only thing i found is this :

http://suitecrm.com/forum/search?query=SugarSearchEngineQueueManager&searchdate=all&childforums=1

So I commented out this code and i no longer get the error but still I don't receive emails.

I don't know what else to do.

Please help me if you can !Thanks !

EDIT

I found that "This file is only included in PRO version and it's useless in Community Edition.

Code Fix: 1. Comment code in /custom/Extension/application/Ext/LogicHooks/SugarFTSHooks.php

  1. Do a Fast Rebuild from Administration (index.php?module=Administration&action=repair). This process will rebuild the piece of code that uses the SugarCRM to call inexistent file SugarSearchEngineQueueManager /custom/application/Ext/LogicHooks/logichooks.ext.php"

So I commented out the code and did the rebuild (yeah i did it before but now i know for sure that this file should not be in Sugarcrm CE ) The error doesn't show anymore but my scheduler still stays "running" and nothings happens , except: When i did this (What Matthew Poer said) , I received 4 emails just like before... so something is causing a problem.

delete from job_queue where scheduler_id = 'THE_SCHEDULER_ID';

update schedulers set last_run = subdate(now(),360) where id = 'THE_SCHEDULER_ID';

EDIT 2: This is from php error_log

[Sun Apr 13 03:34:27 2014] [notice] Digest: generating secret for digest authentication ...
[Sun Apr 13 03:34:27 2014] [notice] Digest: done
[Sun Apr 13 03:34:33 2014] [notice] Apache/2.2.15 (Unix) DAV/2 mod_nss/2.2.15 NSS/3.14.0.0 Basic ECC PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips mod_wsgi/3.2 Python/2.6.6 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Sun Apr 13 12:22:52 2014] [error] [client 122.155.18.51] File does not exist: /usr/share/phpMyAdmin/translators.html
[Sun Apr 13 13:45:31 2014] [error] [client 122.155.18.51] File does not exist: /usr/share/phpMyAdmin/translators.html
[Sun Apr 13 15:43:39 2014] [error] [client 66.249.66.74] File does not exist:     /opt/otrs/var/httpd/htdocs/js/js-cache/ModuleJS_784dc12bf89d72db064caa6e8690168b.js
[Sun Apr 13 15:43:40 2014] [error] [client 66.249.66.74] File does not exist: /opt/otrs/var/httpd/htdocs/skins/Customer/default/css-cache/CommonCSS_b1f924c426a0e1a9f1553197a2ce25a4.css
[Sun Apr 13 15:43:41 2014] [error] [client 66.249.66.74] File does not exist: /opt/otrs/var/httpd/htdocs/js/js-cache/CommonJS_7f98ddff2f339e3b515f7901d82600bb.js
[Mon Apr 14 11:09:04 2014] [error] [client 192.168.10.1] PHP Warning:  file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /usr/share/phpMyAdmin/version_check.php on line 16, referer: http://support.expert-m.net/phpmyadmin/main.php?token=d2e60372f8b5d6d53f0c3c80a536be27
[Mon Apr 14 11:09:04 2014] [error] [client 192.168.10.1] PHP Warning:  file_get_contents(http://www.phpmyadmin.net/home_page/version.json): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /usr/share/phpMyAdmin/version_check.php on line 16, referer: http://support.expert-m.net/phpmyadmin/main.php?token=d2e60372f8b5d6d53f0c3c80a536be27
[Mon Apr 14 12:45:25 2014] [error] [client 178.235.72.68] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)

This is from the logs folder of SugarCRM, error.log

[Mon Apr 14 08:58:59 2014] [error] [client 192.168.10.1] PHP Notice:  Undefined index: 8854a79c-6171-036c-e7df-534548e8bc81 in /var/www/sugarcrm/public_html/modules/Emails/EmailUIAjax.php on line 879, referer: http://sugarcrm.support.expert-m.net/index.php?module=Emails&action=index&parentTab=All
[Mon Apr 14 08:58:59 2014] [error] [client 192.168.10.1] PHP Notice:  Undefined index: 8854a79c-6171-036c-e7df-534548e8bc81 in /var/www/sugarcrm/public_html/modules/Emails/EmailUIAjax.php on line 880, referer: http://sugarcrm.support.expert-m.net/index.php?module=Emails&action=index&parentTab=All
[Mon Apr 14 11:22:17 2014] [error] [client 192.168.10.1] PHP Notice:  Undefined index: 8854a79c-6171-036c-e7df-534548e8bc81 in /var/www/sugarcrm/public_html/modules/Emails/EmailUIAjax.php on line 879, referer: http://sugarcrm.support.expert-m.net/index.php?module=Emails&action=index&parentTab=All
[Mon Apr 14 11:22:17 2014] [error] [client 192.168.10.1] PHP Notice:  Undefined index: 8854a79c-6171-036c-e7df-534548e8bc81 in /var/www/sugarcrm/public_html/modules/Emails/EmailUIAjax.php on line 880, referer: http://sugarcrm.support.expert-m.net/index.php?module=Emails&action=index&parentTab=All
[Mon Apr 14 11:24:47 2014] [error] [client 192.168.10.1] File does not exist: /var/www/sugarcrm/public_html/favicon.ico

I didn't paste all the info from the logs. There is more but the errors are repeating.

Matthew Poer
  • 1,682
  • 10
  • 17
Lubomir Borisov
  • 166
  • 4
  • 18

1 Answers1

1

The file include/SugarSearchEngine/SugarSearchEngineQueueManager.php won't exist in your system because it's a Pro+ feature.

To reset a scheduler entry that got "stuck," delete the scheduler information from the job queue in the database and reset the last_run value. Find the ID of the scheduler from the URL within SugarCRM or by select id,name from schedulers. Once you have the ID of this scheduler, run this two queries:

delete from job_queue where scheduler_id = 'THE_SCHEDULER_ID';
update schedulers set last_run = subdate(now(),360) where id = 'THE_SCHEDULER_ID';
Matthew Poer
  • 1,682
  • 10
  • 17
  • Thank you for your answer ! Just now I realise that I dont have such a directory in include. There is no SugarSearchEngige, no SugarSearchEngineQueueManager.php either. I am a little bit confused. This should be available in CE version of sugarcrm right? – Lubomir Borisov Apr 11 '14 at 05:59
  • Ah, you're right. SugarSearchEngine is Pro only. Odd that it'd be referenced in CE, then... editing my answer – Matthew Poer Apr 11 '14 at 14:01
  • I did everything several times. Its fetching 4 emails and then nothing, stuck. I delete it for the database, then add it, its fetching 4 emails and..stuck, and all of this again. What could cause this , its a fresh installation of Sugarcrm with no additional stuff. – Lubomir Borisov Apr 14 '14 at 06:17
  • Is it hanging on the same email every time? Anything in the PHP log (is PHP logging enabled from CLI?) or SugarCRM log? – Matthew Poer Apr 14 '14 at 11:32
  • Its not hanging on the same email. Actually i dont know the criteria for choosing which one to pick. It doesnt pick the oldest neither the newest... Its choosing from 1 to 4 mails. In my first post i will enter the data from the logs. – Lubomir Borisov Apr 14 '14 at 11:41
  • There's got to be an error in there somewhere, maybe parsing an email or attachment... is there nothing in the logs? – Matthew Poer Apr 14 '14 at 11:44
  • Disable the cron job and run it manually (something like `php -f /var/www/sugarcrm/public_html/cron.php > cron_errors.txt`), post the output to pastbin or gist or something. – Matthew Poer Apr 14 '14 at 12:10
  • http://pastebin.com/yW5P8wJt It says that something is wrong with teams ? I am not so sure that teams are included in CE version? – Lubomir Borisov Apr 14 '14 at 12:35
  • They're not, but that's benign, just's a Notice and it's not why the job is quitting early. Changing you SugarCRM logging level to 'debug' and run it again, post output of SugarCRM log on pastebin. – Matthew Poer Apr 14 '14 at 13:46
  • http://pastebin.com/gH4Uxxwi This is the debug log for today. I will also take a look at it. Thank you a lot for helping me ! – Lubomir Borisov Apr 15 '14 at 07:22
  • The pollMonitoredInboxes stuffs happen at 1691... it just doesn't finish the job and doesn't say why. On 1770 we get `***** On message [ 1 of 57 ] *****` and no more of those. It looks like it saves the email in the system. Maybe it's dying trying to delete the message from the server... can you try it with a different email account? – Matthew Poer Apr 15 '14 at 15:12
  • Ok i have a little progress. I removed the inbound emails and then saw that the scheduler is running with succes. Every minute like it should be and history with status "done". So i created a new email account , this time in yahoo. I created also a new inbound mail account in Sugarcrm and filled the data for yahoo. And here its the problem its freezing when i press test settings or select trash folder. This happens also with gmail. Now i just want to understand why this is happening... – Lubomir Borisov Apr 16 '14 at 06:57
  • Now I can tell where the problem was. First my scheduler was running every 1 minute. I changed that to 20 minutes. The other problem was that that in my inbox i had near 2000 emails. For some reason the scheduler freezes for so many emails. – Lubomir Borisov Apr 17 '14 at 10:54
  • Sort of makes sense now. You might be able to increase the PHP setting max_execution_time if it's running too long, which would cause it to error out before finishing. – Matthew Poer Apr 17 '14 at 11:24
  • Its still happening. In php.ini i set max_execution_time to 200seconds and the scheduler is still freezing on "running". It worked for a while. I have now 3 inbound mail boxes. 2 in Gmail and 1 in Yahoo. None of them is populated. This is getting real weird... – Lubomir Borisov Apr 28 '14 at 13:29