magento / meta-for-magento2

39 stars 23 forks source link

Error while running setup:upgrade #35

Open JamelleG opened 1 year ago

JamelleG commented 1 year ago

Preconditions (*)

  1. Magento Version: 2.4.5-p3
  2. Meta for magento2 extension version: 1.2.0
  3. PHP Version: 8.1
  4. Crons/consumers are running via DB, not rabbitmq

Steps to reproduce (*)

  1. Run `bin/magento setup:upgrade

Expected result (*)

  1. bin/magento setup: upgrade runs as expected
  2. queues are set up in the database.

Actual result (*)

We get the following error message Error while checking if topic is synchronous and the underlying error message we get is Topic "persist.meta.log.immediately" is not configured.

zlik commented 1 year ago

@nrostrow-meta

nrostrow-meta commented 1 year ago

Hi @JamelleG, looking into this. Can you check your env.php file to see if the following code block is present?

'queue' => [
    'consumers_wait_for_messages' => 1
]

It's okay if there are other items in the 'queue' field array but it seems like 'consumers_wait_for_messages' => 1 must be present. If that is missing can you try adding it and see if that resolves the issue?

I think that this may be the issue based on https://magento.stackexchange.com/questions/284604/error-while-checking-if-topic-is-synchronous-on-setupupgrade and I verified that on all of my working instances that 'queue' field and item are present in the env.php files.

JamelleG commented 1 year ago

Hello @nrostrow-meta,

Thank you for picking the following up.

We do have that value set in our config but as the following 'consumers_wait_for_messages' => 0 looking at the Magento documentation from what I can see/understand this is what we should have set if we are running consumers via crons https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/message-consumers.html?lang=en

In the meantime, we will set this value to see if it resolves the issue but maybe I might be misunderstanding something because it should ideally work regardless of whether this config is set or not.

nrostrow-meta commented 1 year ago

@JamelleG any update on if switching the value to 1 fixed the issue?

cmorbitzer commented 6 months ago

@nrostrow-meta I get this message as well. None of the suggested solutions have helped. Have you made any progress on this?

sol-loup commented 6 months ago

Hey @cmorbitzer, sorry to hear you're having issues. From our perspective, communication.xml and queue_publisher.xml are correctly configured to support this. Can you confirm you've cleared cache and run the setup:install commands?

Would you also mind providing the output of:

sudo bin/magento queue:consumers:list

jigar48 commented 3 months ago

If you running and using Redis cache then try to flush Redis cache and then run upgrade command, It help me to fix this issue.

command I used to flush redis cache redis-cli flushall