OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums Forums OroCommerce message-queue:consume keeps crashing

This topic contains 11 replies, has 3 voices, and was last updated by  msulima 6 years, 7 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #31977

    ppc
    Participant

    Message queue gets several errors and I can’t get any emails to sync to my inbox
    most frequently:

    [debug] Payload: ‘{“command”:”oro:cron:imap-sync”,”arguments”:[]}’
    [debug] [DoctrineClearIdentityMapExtension] Clear identity map for manager “default”
    [debug] [DoctrineClearIdentityMapExtension] Clear identity map for manager “config”
    [debug] [DoctrineClearIdentityMapExtension] Clear identity map for manager “message_queue_job”
    [debug] [DoctrineClearIdentityMapExtension] Clear identity map for manager “batch”
    [debug] [DoctrineClearIdentityMapExtension] Clear identity map for manager “search”
    [error] Consuming interrupted by exception. “”
    [debug] [RejectMessageOnExceptionDbalExtension] Execution was interrupted and message was rejected. oro.597b9b458e14f5.28635907

    [Doctrine\ORM\NonUniqueResultException]

    Exception trace:
    () at /var/www/html/orocommerce-application/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:781
    Doctrine\ORM\AbstractQuery->getOneOrNullResult() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Job/JobStorage.php:100
    Oro\Component\MessageQueue\Job\JobStorage->findRootJobByOwnerIdAndJobName() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Job/JobProcessor.php:86
    Oro\Component\MessageQueue\Job\JobProcessor->findOrCreateRootJob() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Job/JobRunner.php:36
    Oro\Component\MessageQueue\Job\JobRunner->runUnique() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/CronBundle/Async/CommandRunnerMessageProcessor.php:91
    Oro\Bundle\CronBundle\Async\CommandRunnerMessageProcessor->process() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Client/DelegateMessageProcessor.php:36
    Oro\Component\MessageQueue\Client\DelegateMessageProcessor->process() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Consumption/QueueConsumer.php:181
    Oro\Component\MessageQueue\Consumption\QueueConsumer->doConsume() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Consumption/QueueConsumer.php:123
    Oro\Component\MessageQueue\Consumption\QueueConsumer->consume() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Client/ConsumeMessagesCommand.php:69
    Oro\Component\MessageQueue\Client\ConsumeMessagesCommand->execute() at /var/www/html/orocommerce-application/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:259
    Symfony\Component\Console\Command\Command->run() at /var/www/html/orocommerce-application/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:866
    Symfony\Component\Console\Application->doRunCommand() at /var/www/html/orocommerce-application/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:193
    Symfony\Component\Console\Application->doRun() at /var/www/html/orocommerce-application/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:92
    Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/html/orocommerce-application/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:124
    Symfony\Component\Console\Application->run() at /var/www/html/orocommerce-application/app/console:22

    but also sometimes

    [error] Consuming interrupted by exception. “Binding entities to query parameters only allowed for entities that have an identifier.”
    [debug] [RejectMessageOnExceptionDbalExtension] Execution was interrupted and message was rejected. oro.5980fdde5f7e64.26951000

    [Doctrine\ORM\ORMInvalidArgumentException]
    Binding entities to query parameters only allowed for entities that have an identifier.

    Exception trace:
    () at /var/www/html/orocommerce-application/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php:188
    Doctrine\ORM\ORMInvalidArgumentException::invalidIdentifierBindingEntity() at /var/www/html/orocommerce-application/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:428
    Doctrine\ORM\AbstractQuery->processParameterValue() at /var/www/html/orocommerce-application/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:369
    Doctrine\ORM\Query->processParameterMappings() at /var/www/html/orocommerce-application/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:319
    Doctrine\ORM\Query->_doExecute() at /var/www/html/orocommerce-application/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:969
    Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache() at /var/www/html/orocommerce-application/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:924
    Doctrine\ORM\AbstractQuery->execute() at /var/www/html/orocommerce-application/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:727
    Doctrine\ORM\AbstractQuery->getResult() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/EmailBundle/Entity/Repository/MailboxRepository.php:144
    Oro\Bundle\EmailBundle\Entity\Repository\MailboxRepository->findBySettingsClassAndEmail() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/EmailBundle/Provider/EmailActivityListProvider.php:262
    Oro\Bundle\EmailBundle\Provider\EmailActivityListProvider->getOrganization() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/ActivityListBundle/Provider/ActivityListChainProvider.php:445
    Oro\Bundle\ActivityListBundle\Provider\ActivityListChainProvider->getActivityListEntityForEntity() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/ActivityListBundle/Provider/ActivityListChainProvider.php:227
    Oro\Bundle\ActivityListBundle\Provider\ActivityListChainProvider->getActivityListEntitiesByActivityEntity() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/ActivityListBundle/Entity/Manager/CollectListManager.php:97
    Oro\Bundle\ActivityListBundle\Entity\Manager\CollectListManager->processInsertEntities() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/ActivityListBundle/EventListener/ActivityListListener.php:85
    Oro\Bundle\ActivityListBundle\EventListener\ActivityListListener->postFlush() at /var/www/html/orocommerce-application/app/cache/prod/appProdProjectContainer.php:384
    OroBundleActivityListBundleEventListenerActivityListListener_000000000f2ad9bc0000000052f302e45ad1448f34d05b3e2e442bd22eb314ba->postFlush() at /var/www/html/orocommerce-application/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php:63
    Symfony\Bridge\Doctrine\ContainerAwareEventManager->dispatchEvent() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/EntityBundle/Event/OroEventManager.php:48
    Oro\Bundle\EntityBundle\Event\OroEventManager->dispatchEvent() at /var/www/html/orocommerce-application/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:3316
    Doctrine\ORM\UnitOfWork->dispatchPostFlushEvent() at /var/www/html/orocommerce-application/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:356
    Doctrine\ORM\UnitOfWork->commit() at /var/www/html/orocommerce-application/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:356
    Doctrine\ORM\EntityManager->flush() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/EntityBundle/ORM/OroEntityManager.php:188
    Oro\Bundle\EntityBundle\ORM\OroEntityManager->flush() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/EmailBundle/EventListener/EntityListener.php:144
    Oro\Bundle\EmailBundle\EventListener\EntityListener->postFlush() at /var/www/html/orocommerce-application/app/cache/prod/appProdProjectContainer.php:384
    OroBundleEmailBundleEventListenerEntityListener_000000000f2ae88d0000000052f302e45ad1448f34d05b3e2e442bd22eb314ba->postFlush() at /var/www/html/orocommerce-application/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php:63
    Symfony\Bridge\Doctrine\ContainerAwareEventManager->dispatchEvent() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/EntityBundle/Event/OroEventManager.php:48
    Oro\Bundle\EntityBundle\Event\OroEventManager->dispatchEvent() at /var/www/html/orocommerce-application/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:3316
    Doctrine\ORM\UnitOfWork->dispatchPostFlushEvent() at /var/www/html/orocommerce-application/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:356
    Doctrine\ORM\UnitOfWork->commit() at /var/www/html/orocommerce-application/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:356
    Doctrine\ORM\EntityManager->flush() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/EntityBundle/ORM/OroEntityManager.php:188
    Oro\Bundle\EntityBundle\ORM\OroEntityManager->flush() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/EmailBundle/EventListener/EntityListener.php:134
    Oro\Bundle\EmailBundle\EventListener\EntityListener->postFlush() at /var/www/html/orocommerce-application/app/cache/prod/appProdProjectContainer.php:384
    OroBundleEmailBundleEventListenerEntityListener_000000000f2ae88d0000000052f302e45ad1448f34d05b3e2e442bd22eb314ba->postFlush() at /var/www/html/orocommerce-application/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php:63
    Symfony\Bridge\Doctrine\ContainerAwareEventManager->dispatchEvent() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/EntityBundle/Event/OroEventManager.php:48
    Oro\Bundle\EntityBundle\Event\OroEventManager->dispatchEvent() at /var/www/html/orocommerce-application/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:3316
    Doctrine\ORM\UnitOfWork->dispatchPostFlushEvent() at /var/www/html/orocommerce-application/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:427
    Doctrine\ORM\UnitOfWork->commit() at /var/www/html/orocommerce-application/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:356
    Doctrine\ORM\EntityManager->flush() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/EntityBundle/ORM/OroEntityManager.php:188
    Oro\Bundle\EntityBundle\ORM\OroEntityManager->flush() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Job/JobStorage.php:242
    Oro\Component\MessageQueue\Job\JobStorage->forceSaveJob() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Job/JobStorage.php:223
    Oro\Component\MessageQueue\Job\JobStorage->saveJob() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Job/JobProcessor.php:177
    Oro\Component\MessageQueue\Job\JobProcessor->successChildJob() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Job/JobRunner.php:57
    Oro\Component\MessageQueue\Job\JobRunner->runUnique() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/CronBundle/Async/CommandRunnerMessageProcessor.php:91
    Oro\Bundle\CronBundle\Async\CommandRunnerMessageProcessor->process() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Client/DelegateMessageProcessor.php:36
    Oro\Component\MessageQueue\Client\DelegateMessageProcessor->process() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Consumption/QueueConsumer.php:181
    Oro\Component\MessageQueue\Consumption\QueueConsumer->doConsume() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Consumption/QueueConsumer.php:123
    Oro\Component\MessageQueue\Consumption\QueueConsumer->consume() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Client/ConsumeMessagesCommand.php:69
    Oro\Component\MessageQueue\Client\ConsumeMessagesCommand->execute() at /var/www/html/orocommerce-application/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:259
    Symfony\Component\Console\Command\Command->run() at /var/www/html/orocommerce-application/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:866
    Symfony\Component\Console\Application->doRunCommand() at /var/www/html/orocommerce-application/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:193
    Symfony\Component\Console\Application->doRun() at /var/www/html/orocommerce-application/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:92
    Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/html/orocommerce-application/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:124
    Symfony\Component\Console\Application->run() at /var/www/html/orocommerce-application/app/console:22

    oro:message-queue:consume [–message-limit MESSAGE-LIMIT] [–time-limit TIME-LIMIT] [–memory-limit MEMORY-LIMIT] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-s|–shell] [–process-isolation] [-e|–env ENV] [–no-debug] [–current-user CURRENT-USER] [–current-organization CURRENT-ORGANIZATION] [–disabled-listeners DISABLED-LISTENERS] [–] <command> [<clientDestinationName>]

    PHP Fatal error: Uncaught Oro\Bundle\ImapBundle\Exception\SocketTimeoutException: cannot read – connection closed? in /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/ImapBundle/Mail/Protocol/Imap.php:116
    Stack trace:
    #0 /var/www/html/orocommerce-application/vendor/zendframework/zend-mail/src/Protocol/Imap.php(149): Oro\Bundle\ImapBundle\Mail\Protocol\Imap->_nextLine()
    #1 /var/www/html/orocommerce-application/vendor/zendframework/zend-mail/src/Protocol/Imap.php(265): Zend\Mail\Protocol\Imap->_nextTaggedLine(NULL)
    #2 /var/www/html/orocommerce-application/vendor/zendframework/zend-mail/src/Protocol/Imap.php(288): Zend\Mail\Protocol\Imap->readLine(NULL, ‘TAG7’, true)
    #3 /var/www/html/orocommerce-application/vendor/zendframework/zend-mail/src/Protocol/Imap.php(353): Zend\Mail\Protocol\Imap->readResponse(‘TAG7’, true)
    #4 /var/www/html/orocommerce-application/vendor/zendframework/zend-mail/src/Protocol/Imap.php(422): Zend\Mail\Protocol\Imap->requestAndResponse(‘LOGOUT’, Array, true)
    #5 /var/www/html/orocomme in /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/ImapBundle/Mail/Protocol/Imap.php on line 116

Viewing 11 replies - 1 through 11 (of 11 total)
  • Author
    Replies
  • #31978

    ppc
    Participant

    also

    PHP Notice: Undefined offset: 1 in /var/www/html/orocommerce-application/vendor/zendframework/zend-mail/src/Protocol/Imap.php on line 152
    [error] Consuming interrupted by exception. “The email synchronization failed for the following origins: 1.”
    [debug] [RejectMessageOnExceptionDbalExtension] Execution was interrupted and message was rejected. oro.5980f1492f87a2.31874999

    [Exception]
    The email synchronization failed for the following origins: 1.

    Exception trace:
    () at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/EmailBundle/Sync/AbstractEmailSynchronizer.php:593
    Oro\Bundle\EmailBundle\Sync\AbstractEmailSynchronizer->assertSyncSuccess() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/EmailBundle/Sync/AbstractEmailSynchronizer.php:210
    Oro\Bundle\EmailBundle\Sync\AbstractEmailSynchronizer->syncOrigins() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Bundle/ImapBundle/Async/SyncEmailMessageProcessor.php:51
    Oro\Bundle\ImapBundle\Async\SyncEmailMessageProcessor->process() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Client/DelegateMessageProcessor.php:36
    Oro\Component\MessageQueue\Client\DelegateMessageProcessor->process() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Consumption/QueueConsumer.php:181
    Oro\Component\MessageQueue\Consumption\QueueConsumer->doConsume() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Consumption/QueueConsumer.php:123
    Oro\Component\MessageQueue\Consumption\QueueConsumer->consume() at /var/www/html/orocommerce-application/vendor/oro/platform/src/Oro/Component/MessageQueue/Client/ConsumeMessagesCommand.php:69
    Oro\Component\MessageQueue\Client\ConsumeMessagesCommand->execute() at /var/www/html/orocommerce-application/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:259
    Symfony\Component\Console\Command\Command->run() at /var/www/html/orocommerce-application/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:866
    Symfony\Component\Console\Application->doRunCommand() at /var/www/html/orocommerce-application/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:193
    Symfony\Component\Console\Application->doRun() at /var/www/html/orocommerce-application/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:92
    Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/html/orocommerce-application/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:124
    Symfony\Component\Console\Application->run() at /var/www/html/orocommerce-application/app/console:22

    #31979

    ppc
    Participant

    Sorry, should have included:

    OroCommerce v 1.2 community

    Ubuntu 16.04.2 LTS
    Apache 2.4.18
    MySQL 5.7.19
    PHP 7.0.18

    #31980

    vitaliyberdylo
    Participant

    Hello. Please clarify is it global queue problem for your project (and another queue jobs not complied too) or only reproducing on message sink? We have some issues with run several queue consumers on one instance simultaneously. Try run only one queue consumer.

    #31981

    msulima
    Moderator

    Hello, also please provide steps to reproduce described issue.
    As I understand, you have configured IMAP sync for some email account. Any additional info?


    #31982

    ppc
    Participant

    Hello, thanks for responding. This is a clean install and I am only running one queue consumer. The jobs queue was running on schedule up until the point that I configured the IMAP and SMTP information for my initial Admin user. Once there was actual data to consume, the errors began immediately. When I restart the consumer I get a notification that my user has new email, but no emails ever show up when I look to see what is there.

    I switched the sql database to UTF8mb4, which did not change the behavior.

    #31983

    msulima
    Moderator
    #31984

    msulima
    Moderator

    I did next steps:

    1. install fresh 1.3 version of application (I suggest you to upgrade you application)
    2. create new account on gmail
    3. setup IMAP settings in application for admin account
    4. run oro:message:consume
    5. click button sync email on email view page
    6. got no errors in UI and in console

    Now I will try it on 1.2. But please give me more info if I lost something.


    #31985

    msulima
    Moderator
    #31986

    ppc
    Participant

    I didn’t think it would be anything on your end that was wrong. Thank you for confirming that, though. I was hoping something in the error log would give you a clue as to what I’m doing wrong with my configuration.

    #31987

    ppc
    Participant

    So I switched the Imap to a gmail account and now it’s working as designed. Are you aware of any issues connecting to a locally hosted Kerio email server – version 8.1.1 (1374)?

    #31988

    msulima
    Moderator

    Hi, ppc.

    I don’t know anything about integration with Kerio email server. Sorry.
    It might be that IMAP protocol of Kerio have some differences from basic IMAP protocol, for example gmail.

    And our project repositories always open for contribution on http://github.com/oroinc. Thanks!


Viewing 11 replies - 1 through 11 (of 11 total)

The forum ‘OroCommerce’ is closed to new topics and replies.

Back to top