magento / meta-for-magento2

33 stars 19 forks source link

Error while running setup:upgrade #35

Open JamelleG opened 9 months ago

JamelleG commented 9 months 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 9 months ago

@nrostrow-meta

nrostrow-meta commented 9 months 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 8 months 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 8 months ago

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

cmorbitzer commented 1 month 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 1 month 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