# Problem "No transport supports the given Messenger DSN" after update to Mautic 5.2.1

**URL:** <https://forum.mautic.org/t/problem-no-transport-supports-the-given-messenger-dsn-after-update-to-mautic-5-2-1/34698>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [January 9, 2025, 5:25pm UTC](https://forum.mautic.org/t/problem-no-transport-supports-the-given-messenger-dsn-after-update-to-mautic-5-2-1/34698 "2025-01-09T17:25:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![imog](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/imog/32/3813_2.png) [@imog](https://forum.mautic.org/u/imog)\
**Post date:** [January 9, 2025, 5:25pm UTC](https://forum.mautic.org/t/problem-no-transport-supports-the-given-messenger-dsn-after-update-to-mautic-5-2-1/34698/1 "2025-01-09T17:25:32Z")

</div>

My Mautic version is: 5.2.1  
My PHP version is: 8.1.31  
My Database type and version is: 8.0.40 MySQL  
Dockerized with php8.1-apache  
E-Mail Method: Immediate mail delivery

My Problem:

After upgrade from Mautic 5.0.4 to 5.2.1 i see this in the var/logs over and over every second:

```auto
[2025-01-09T18:18:44.856148+01:00] mautic.WARNING: Command `messenger:consume` exited with status code 1 [] {"hostname":"bd7e604a9c6e","pid":555}
[2025-01-09T18:18:44.928896+01:00] mautic.ERROR: Symfony\Component\Messenger\Exception\InvalidArgumentException: No transport supports the given Messenger DSN. (uncaught exception) at /var/www/html/vendor/symfony/messenger/Transport/TransportFactory.php line 54 while running console command `messenger:consume` [stack trace] #0 /var/www/html/var/cache/prod/ContainerQMwtW5J/getMessenger_Transport_EmailService.php(26): Symfony\Component\Messenger\Transport\TransportFactory->createTransport('invalid://null', Array, Object(Symfony\Component\Messenger\Transport\Serialization\PhpSerializer)) #1 /var/www/html/var/cache/prod/ContainerQMwtW5J/AppKernelProdContainer.php(2300): ContainerQMwtW5J\getMessenger_Transport_EmailService::do(Object(ContainerQMwtW5J\AppKernelProdContainer), true) #2 /var/www/html/vendor/symfony/dependency-injection/Container.php(427): ContainerQMwtW5J\AppKernelProdContainer->load('getMessenger_Tr...') #3 /var/www/html/vendor/symfony/dependency-injection/Argument/ServiceLocator.php(42): Symfony\Component\DependencyInjection\Container->getService('privates', 'messenger.trans...', 'getMessenger_Tr...', true) #4 /var/www/html/vendor/symfony/messenger/Command/ConsumeMessagesCommand.php(172): Symfony\Component\DependencyInjection\Argument\ServiceLocator->get('email') #5 /var/www/html/vendor/symfony/console/Command/Command.php(298): Symfony\Component\Messenger\Command\ConsumeMessagesCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #6 /var/www/html/vendor/symfony/console/Application.php(1058): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #7 /var/www/html/vendor/symfony/framework-bundle/Console/Application.php(96): Symfony\Component\Console\Application->doRunCommand(Object(Symfony\Component\Messenger\Command\ConsumeMessagesCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #8 /var/www/html/vendor/symfony/console/Application.php(301): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand(Object(Symfony\Component\Messenger\Command\ConsumeMessagesCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #9 /var/www/html/vendor/symfony/framework-bundle/Console/Application.php(82): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #10 /var/www/html/vendor/symfony/console/Application.php(171): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/bin/console(16): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 {main} [] {"hostname":"bd7e604a9c6e","pid":560}

```

It is the mautic\_worker instance which creates this. When i stop it’s container, the messages do not appear.

Updating an Docker environment is done by creating new containers based on the new mautic-docker-image version. After that the normal update-steps needs to be done, right? (i don’t think the first cache-clear is necessarry because the new container does not contain any files in the cache. I also assume that it does not matter in which container to execute the statements, as they head towards the database, so i choose to run them on mautic-web instance):

```auto
### docker exec -it mautic-web php /var/www/html/bin/console cache:clear
docker exec -it mautic-web php /var/www/html/bin/console mautic:update:apply --finish
docker exec -it mautic-web php /var/www/html/bin/console doctrine:migration:migrate --no-interaction
 docker exec -it mautic-web php /var/www/html/bin/console doctrine:schema:update --no-interaction --force
docker exec -it mautic-web php /var/www/html/bin/console cache:clear

```

mautic:update:apply runs fine, but the doctrine:migration:migrate spit out errors:

```auto
[2025-01-09 18:20:34] [WARNING] You have 78 previously executed migrations in the database that are not registered migrations.
[2025-01-09 18:20:34]
[2025-01-09 18:20:34]
[2025-01-09 18:20:34] >> 2021-06-23 14:03:28 (20180508202930)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:02 (20180702014364)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:02 (20180702014365)
[2025-01-09 18:20:34] >> 2021-06-23 14:03:29 (20180821144204)
[2025-01-09 18:20:34] >> 2021-06-23 14:03:29 (20180921144421)
[2025-01-09 18:20:34] >> 2020-11-05 10:45:51 (20181111095447)
[2025-01-09 18:20:34] >> 2020-11-05 10:45:51 (20190704154940)
[2025-01-09 18:20:34] >> 2020-11-05 10:45:53 (20190724110039)
[2025-01-09 18:20:34] >> 2020-12-13 10:56:02 (20191017140848)
[2025-01-09 18:20:34] >> 2020-11-05 10:45:54 (20191126093923)
[2025-01-09 18:20:34] >> 2020-12-13 10:56:02 (20191206113956)
[2025-01-09 18:20:34] >> 2020-11-05 10:45:55 (20191219155630)
[2025-01-09 18:20:34] >> 2020-11-05 10:45:56 (20200211095409)
[2025-01-09 18:20:34] >> 2020-11-05 10:45:57 (20200212141530)
[2025-01-09 18:20:34] >> 2020-11-05 10:45:57 (20200220172041)
[2025-01-09 18:20:34] >> 2020-11-05 10:45:57 (20200227110431)
[2025-01-09 18:20:34] >> 2020-11-05 10:45:57 (20200302164801)
[2025-01-09 18:20:34] >> 2021-06-23 14:03:29 (20200331160919)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:02 (20200409102100)
[2025-01-09 18:20:34] >> 2020-11-05 10:45:57 (20200422144300)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:03 (20200507122854)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:03 (20200729170800)
[2025-01-09 18:20:34] >> 2020-11-05 10:45:58 (20200805185714)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:03 (20200810153131)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:03 (20200812180900)
[2025-01-09 18:20:34] >> 2020-11-05 10:45:58 (20200815153711)
[2025-01-09 18:20:34] >> 2021-06-23 14:03:29 (20200924080139)
[2025-01-09 18:20:34] >> 2021-06-23 14:03:29 (20201015084627)
[2025-01-09 18:20:34] >> 2021-06-23 14:03:29 (20201102120710)
[2025-01-09 18:20:34] >> 2021-06-23 14:03:29 (20201102133546)
[2025-01-09 18:20:34] >> 2021-06-23 14:03:29 (20201105120328)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:04 (20201120122846)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:04 (20201123070813)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:04 (20201125155904)
[2025-01-09 18:20:34] >> 2021-06-23 14:03:29 (20201130201631)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:04 (20201207114926)
[2025-01-09 18:20:34] >> 2021-06-23 14:03:30 (20201207140911)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:04 (20201228041109)
[2025-01-09 18:20:34] >> 2021-06-23 14:03:30 (20210104171005)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:04 (20210203143600)
[2025-01-09 18:20:34] >> 2021-06-23 14:03:30 (20210223174702)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:04 (20210502162314)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:04 (20210520100503)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:05 (20210609191822)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:05 (20210614151138)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:05 (20210623071326)
[2025-01-09 18:20:34] >> 2022-03-21 15:24:05 (20220111202917)
[2025-01-09 18:20:34] >> 2023-06-07 10:04:11 (20230519081315)
[2025-01-09 18:20:34] >> 2023-06-07 10:04:11 (20230522115137)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:54 (Mautic\Migrations\Version20190326190241)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:54 (Mautic\Migrations\Version20190410143658)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:55 (Mautic\Migrations\Version20190524124819)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:55 (Mautic\Migrations\Version20191106152509)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:55 (Mautic\Migrations\Version20200917152259)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:55 (Mautic\Migrations\Version20201019100000)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:56 (Mautic\Migrations\Version20210112162046)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:56 (Mautic\Migrations\Version20210115065034)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:56 (Mautic\Migrations\Version20210217115150)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:56 (Mautic\Migrations\Version20210420113309)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:57 (Mautic\Migrations\Version20211026152443)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:57 (Mautic\Migrations\Version20211026153057)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:57 (Mautic\Migrations\Version20211110070503)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:57 (Mautic\Migrations\Version20211209022550)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:58 (Mautic\Migrations\Version20230506112314)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:58 (Mautic\Migrations\Version20230506113422)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:58 (Mautic\Migrations\Version20230506113627)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:58 (Mautic\Migrations\Version20230506113731)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:58 (Mautic\Migrations\Version20230506113812)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:59 (Mautic\Migrations\Version20231110103625)
[2025-01-09 18:20:34] >> 2025-01-09 14:43:59 (Mautic\Migrations\Version20231206152313)
[2025-01-09 18:20:34] >> 2025-01-09 14:44:05 (Mautic\Migrations\Version20231207235400)
[2025-01-09 18:20:34] >> 2025-01-09 14:44:05 (Mautic\Migrations\Version20240226114528)
[2025-01-09 18:20:34] >> 2025-01-09 14:44:05 (Mautic\Migrations\Version20240320081612)
[2025-01-09 18:20:34] >> 2025-01-09 14:44:06 (Mautic\Migrations\Version20240416112112)
[2025-01-09 18:20:34] >> 2025-01-09 14:44:06 (Mautic\Migrations\Version20240611103824)
[2025-01-09 18:20:34] >> 2025-01-09 14:44:06 (Mautic\Migrations\Version20240704164714)
[2025-01-09 18:20:34] >> 2025-01-09 14:44:06 (Mautic\Migrations\Version20240708153845)
[2025-01-09 18:20:34] >> 2025-01-09 14:44:06 (Mautic\Migrations\Version20240725105507)
[2025-01-09 18:20:34] [notice] Migrating up to Mautic\Migrations\Versionzz20230929183000
[2025-01-09 18:20:34] [notice] Migration Mautic\Migrations\Version20221128145933 skipped during Pre-Checks. Reason: "Schema includes this migration"
[2025-01-09 18:20:34] [notice] Table plugin_citrix_events already exists
[2025-01-09 18:20:34] [notice] Migration Mautic\Migrations\Version20230522141144 skipped during Pre-Checks. Reason: "Schema includes this migration"
[2025-01-09 18:20:34] [notice] Migration is not required.
[2025-01-09 18:20:34] [notice] Migration Mautic\Migrations\Version20230606111852 skipped during Pre-Checks. Reason: "Schema includes this migration"
[2025-01-09 18:20:34] [notice] Migration Mautic\Migrations\Versionzz20230929183000 skipped during Pre-Checks. Reason: "There are no local config files to migrate. Skipping the migration."
[2025-01-09 18:20:34] [notice] finished in 64.9ms, used 54.5M memory, 4 migrations executed, 0 sql queries
[2025-01-09 18:20:34]
[2025-01-09 18:20:34]
[2025-01-09 18:20:34] [OK] Successfully migrated to version: Mautic\Migrations\Versionzz20230929183000
[2025-01-09 18:20:34]
[2025-01-09 18:20:34]
[2025-01-09 18:20:34]

```

When i run status it get

```auto
root@a0e1d9df866c:/var/www/html# php bin/console doctrine:migration:status
+----------------------+----------------------+------------------------------------------------------------------------+
| Configuration |
+----------------------+----------------------+------------------------------------------------------------------------+
| Storage | Type | Doctrine\Migrations\Metadata\Storage\TableMetadataStorageConfiguration |
| | Table Name | migrations |
| | Column Name | version |
|----------------------------------------------------------------------------------------------------------------------|
| Database | Driver | Doctrine\DBAL\Driver\PDO\MySQL\Driver |
| | Name | mautic |
|----------------------------------------------------------------------------------------------------------------------|
| Versions | Previous | Mautic\Migrations\Version20240708153845 |
| | Current | Mautic\Migrations\Version20240725105507 |
| | Next | Mautic\Migrations\Version20221128145933 |
| | Latest | Mautic\Migrations\Versionzz20230929183000 |
|----------------------------------------------------------------------------------------------------------------------|
| Migrations | Executed | 97 |
| | Executed Unavailable | 78 |
| | Available | 23 |
| | New | 4 |
|----------------------------------------------------------------------------------------------------------------------|
| Migration Namespaces | Mautic\Migrations | /var/www/html/docroot/app/migrations |
+----------------------+----------------------+------------------------------------------------------------------------+

```

I have no clue what that means or how to fix it. Looks like there was a problem with the 2022-11-28 migration?

---

<div class="post-metadata">

**Author:** ![imog](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/imog/32/3813_2.png) [@imog](https://forum.mautic.org/u/imog)\
**Post date:** [January 10, 2025, 7:44am UTC](https://forum.mautic.org/t/problem-no-transport-supports-the-given-messenger-dsn-after-update-to-mautic-5-2-1/34698/2 "2025-01-10T07:44:56Z")

</div>

I found that it has to do with message sending. My queue-settings shows

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/7/73fa40b146c069bd9fced18ec210d5a2f476c656.png)  
where it should show the current method like here from the documentation:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/1/12e74817cefc929da6a852f4a8e4bd5e7e96c22f.png)

The mentioned table “messenger\_messages” exist in my Mautic-DB.

Maybe this is because of the missing doctrine migrations. Meanwhile i found out that this is a Doctrine topic, not a Mautic topic, so maybe somebody of that project can give me some hints how to do the outstanding migrations?

---

<div class="post-metadata">

**Author:** ![imog](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/imog/32/3813_2.png) [@imog](https://forum.mautic.org/u/imog)\
**Post date:** [January 11, 2025, 3:24pm UTC](https://forum.mautic.org/t/problem-no-transport-supports-the-given-messenger-dsn-after-update-to-mautic-5-2-1/34698/3 "2025-01-11T15:24:40Z")

</div>

I managed to solve the bug regarding the DSN. In my case it was how the environmt-variable for MAUTIC\_MESSENGER\_DSN\_EMAIL and MAUTIC\_MESSENGER\_DSN\_HIT was provided for the Docker Container. I had the value enclosed in double-quotes in my docker-compose.yml

```auto
    ...
    environment:
      - MAUTIC_MESSENGER_DSN_EMAIL="doctrine://default"
      - MAUTIC_MESSENGER_DSN_HIT="doctrine://default"
      ...

```

and that lead to an environment variable containing the double-quotes as well:

```auto
echo $MAUTIC_MESSENGER_DSN_EMAIL
"doctrine://default"

```

That made doctrine go nuts. After i removed the double-quotes:

```auto
    ...
    environment:
      - MAUTIC_MESSENGER_DSN_EMAIL=doctrine://default
      - MAUTIC_MESSENGER_DSN_HIT=doctrine://default
      ...

```

The errormessage was gone and the configuration settings look ok

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/1/1a3e7846c597a2c7673f9f29c40c75425998a2d2.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [January 13, 2025, 3:25am UTC](https://forum.mautic.org/t/problem-no-transport-supports-the-given-messenger-dsn-after-update-to-mautic-5-2-1/34698/4 "2025-01-13T03:25:19Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
