Forums › Forums › OroCRM › OroCRM – How do I? Questions › automatic mail after export grid
This topic contains 9 replies, has 2 voices, and was last updated by fred33 6 years, 4 months ago.
Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
- CreatorTopic
- November 23, 2017 at 3:32 am #29457
Hi,
I’ve resolved my problem with export grid, now my problem is that the mail is only send out when i run this command linePHP1php app/console oro:message-queue:consume -vvv --env=prodThanks
- CreatorTopic
- AuthorReplies
- November 24, 2017 at 3:51 am #29458
Hi, This command runs message queue consuming process. It should be started before your application will be used. You can find more info about message queue on the documentation page – message queue.
November 27, 2017 at 1:31 am #29459Ok
i have this message when i run message-queue:consumePHP123456789101112ERROR: Consuming interrupted by exception. "The EntityManager is closed." {"processor":"Oro\Bundle\CronBundle\Async\CommandRunnerProcessor","topic":"oro.cron.run_command.delayed","message":{"command":"oro:cron:email-body-sync","arguments":[],"jobId":52}} {"exception":"[object] (Doctrine\ORM\ORMException(code: 0): The EntityManager is closed. at /opt/crmcrp2/vendor/doctrine/orm/lib/Doctrine/ORM/ORMException.php:144)"}DEBUG: "START TRANSACTION" {"processor":"Oro\Bundle\CronBundle\Async\CommandRunnerProcessor","extension":"Oro\Component\MessageQueue\Consumption\Dbal\Extension\RejectMessageOnExceptionDbalExtension","topic":"oro.cron.run_command.delayed","message":{"command":"oro:cron:email-body-sync","arguments":[],"jobId":52}}DEBUG: SELECT id FROM oro_message_queue WHERE id=:id FOR UPDATE {"processor":"Oro\Bundle\CronBundle\Async\CommandRunnerProcessor","extension":"Oro\Component\MessageQueue\Consumption\Dbal\Extension\RejectMessageOnExceptionDbalExtension","topic":"oro.cron.run_command.delayed","message":{"command":"oro:cron:email-body-sync","arguments":[],"jobId":52}} {"id":"192165"}DEBUG: DELETE FROM oro_message_queue WHERE id = ? {"processor":"Oro\Bundle\CronBundle\Async\CommandRunnerProcessor","extension":"Oro\Component\MessageQueue\Consumption\Dbal\Extension\RejectMessageOnExceptionDbalExtension","topic":"oro.cron.run_command.delayed","message":{"command":"oro:cron:email-body-sync","arguments":[],"jobId":52}} ["192165"]DEBUG: "COMMIT" {"processor":"Oro\Bundle\CronBundle\Async\CommandRunnerProcessor","extension":"Oro\Component\MessageQueue\Consumption\Dbal\Extension\RejectMessageOnExceptionDbalExtension","topic":"oro.cron.run_command.delayed","message":{"command":"oro:cron:email-body-sync","arguments":[],"jobId":52}}DEBUG: INSERT INTO oro_message_queue (body, headers, properties, priority, queue, redelivered) VALUES (?, ?, ?, ?, ?, ?) {"processor":"Oro\Bundle\CronBundle\Async\CommandRunnerProcessor","extension":"Oro\Component\MessageQueue\Consumption\Dbal\Extension\RejectMessageOnExceptionDbalExtension","topic":"oro.cron.run_command.delayed","message":{"command":"oro:cron:email-body-sync","arguments":[],"jobId":52}} ["{\"command\":\"oro:cron:email [...]","{\"content_type\":\"applicati [...]","{\"oro.message_queue.client [...]",2,"oro.default",true]DEBUG: Execution was interrupted and message was rejected. oro.5a1bcec32bb688.38391573 {"processor":"Oro\Bundle\CronBundle\Async\CommandRunnerProcessor","extension":"Oro\Component\MessageQueue\Consumption\Dbal\Extension\RejectMessageOnExceptionDbalExtension","topic":"oro.cron.run_command.delayed","message":{"command":"oro:cron:email-body-sync","arguments":[],"jobId":52}} {"id":"oro.5a1bcec32bb688.38391573"}INFO: The last processor executed before interrupt of consuming was "Oro\Component\MessageQueue\Job\CalculateRootJobStatusProcessor" {"processor":"Oro\Bundle\CronBundle\Async\CommandRunnerProcessor","extension":"Oro\Bundle\LoggerBundle\Async\Extension\InterruptionDetailConsumptionExtension","topic":"oro.cron.run_command.delayed","message":{"command":"oro:cron:email-body-sync","arguments":[],"jobId":52}}[Doctrine\ORM\ORMException]The EntityManager is closed.how can i resolve it ??
thanksNovember 27, 2017 at 2:02 am #29460Please, take a look on this topic so we can create a correspondent ticket if it is a bug or investigate your environment if it was set not correct.
November 27, 2017 at 6:53 am #29461ok
OroCRM 2.4.2 Community
ubuntu 16.04.3 LTS
Apache 2.4.18
mysql 5.7.20
php 7.0.22The error is coming when i run the command line
PHP1php app/console oro:message-queue:consume -vvvprobably cause when i run
PHP1php app/console oro:cron:imap-sync -vvvi also have an error
PHP123456789101112131415161718192021222324The synchronization failed. Error: An exception occurred while executing 'INSERT INTO oro_email (serialized_data, created, subject, from_name, sent, importance, internaldate, is_head, message_id, multi_message_id, x_message_id, x_thread_id, refs, acceptLanguageHeader, body_synced, thread_id, email_body_id, from_email_address_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["Tjs=", "2017-11-27 14:48:27", "\ud83d\udcf1 Transfer photos from iPhone wirelessly\u00a0", "Top App <news@topapp.si>", "2015-12-18 10:27:15", 0, "2015-12-18 10:27:15", 1, "<3fc2e96d8130a151de576556f8636cbc840.20151218102610@mail12.atl11.rsgsv.net>", null, "1520890738765280883", "1520890738765280883", null, "", null, null, null, 4576]:SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\x93\xB1 T...' for column 'subject' at row 1The synchronization failed. Error: An exception occurred while executing 'INSERT INTO oro_email (serialized_data, created, subject, from_name, sent, importance, internaldate, is_head, message_id, multi_message_id, x_message_id, x_thread_id, refs, acceptLanguageHeader, body_synced, thread_id, email_body_id, from_email_address_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["Tjs=", "2017-11-27 14:48:27", "\ud83d\udcf1 Transfer photos from iPhone wirelessly\u00a0", "Top App <news@topapp.si>", "2015-12-18 10:27:15", 0, "2015-12-18 10:27:15", 1, "<3fc2e96d8130a151de576556f8636cbc840.20151218102610@mail12.atl11.rsgsv.net>", null, "1520890738765280883", "1520890738765280883", null, "", null, null, null, 4576]:SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\x93\xB1 T...' for column 'subject' at row 1Finding an email origin ...Found "yannick.jolivet@corep.com (imap.gmail.com)" email origin. Id: 6.Get folders enabled for sync...Got 1 folder(s).The folder "INBOX" is selected.Previous max email UID "9090"Found 1 email(s).The "Menage dans votre boite mail" (UID: 9093) email was persisted.The synchronization failed. Error: The EntityManager is closed.The synchronization failed. Error: The EntityManager is closed.[Exception]The email synchronization failed for the following origins: 5, 6.Exception trace:() at /opt/crmcrp2/vendor/oro/platform/src/Oro/Bundle/EmailBundle/Sync/AbstractEmailSynchronizer.php:621Database is encoding in default Charset utf8mb4 ans default collation in utf8mb4_bin
November 27, 2017 at 8:07 am #29462It looks like your emails contains 4 bytes characters. You can find more about using 4-bytes characters here our mysql configuration section and here
November 28, 2017 at 4:52 am #29463@zebimax : thanks for all, now I don’t have any more error but the mails don’t leave however if I launch the command
PHP1php app/console oro:message-queue:consume -vvvit is well sent
November 28, 2017 at 5:44 am #29464Reply to myself
i wrote this line in crontab :PHP1*/1 * * * * /usr/bin/php /opt/crmcrp2/app/console oro:message-queue:consume --env=prod >> /dev/nulleverything’s ok now
Thanks
November 28, 2017 at 5:53 am #29465This is correct behaviour, because for normal work of your application consume command shoud run continiously.
Also you can use tools like supervisord to have better control of this command(you can run 2 or more such processes, re run mq consume command if it fail for some reason, etc.)November 28, 2017 at 9:17 am #29466yes that’s what I’m looking at because I found that this comand consumes a lot of machine resource
- AuthorReplies
The forum ‘OroCRM – How do I? Questions’ is closed to new topics and replies.