cancel
Showing results for 
Search instead for 
Did you mean: 

report.ERROR: Website with the same code already exists.

report.ERROR: Website with the same code already exists.

Hi everyone I´m having this issue during my installation for Magento 2, I´m working in a proyect and when I try to install the "customer code" I´m getting this issue. 

the console says : 

 

In AbstractDb.php line 635:

Website with the same code already exists.

 

see system logs: 

 

[2022-02-02 11:48:28] report.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["config_scopes","CONFIG"],"mode":"matchingTag"}} []
[2022-02-02 11:48:28] report.ERROR: Could not validate a connection to Elasticsearch. No alive nodes found in your cluster
#0 /var/www/html/magento-2-4-2-p2/setup/src/Magento/Setup/Model/SearchConfig.php(69): Magento\Setup\Model\SearchConfig->validateSearchEngine()
#1 /var/www/html/magento-2-4-2-p2/setup/src/Magento/Setup/Model/Installer.php(1197): Magento\Setup\Model\SearchConfig->saveConfiguration()
#2 [internal function]: Magento\Setup\Model\Installer->installSearchConfiguration()
#3 /var/www/html/magento-2-4-2-p2/setup/src/Magento/Setup/Model/Installer.php(389): call_user_func_array()
#4 /var/www/html/magento-2-4-2-p2/setup/src/Magento/Setup/Console/Command/InstallCommand.php(231): Magento\Setup\Model\Installer->install()
#5 /var/www/html/magento-2-4-2-p2/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\InstallCommand->execute()
#6 /var/www/html/magento-2-4-2-p2/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#7 /var/www/html/magento-2-4-2-p2/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#8 /var/www/html/magento-2-4-2-p2/vendor/magento/framework/Console/Cli.php(115): Symfony\Component\Console\Application->doRun()
#9 /var/www/html/magento-2-4-2-p2/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun()
#10 /var/www/html/magento-2-4-2-p2/bin/magento(23): Symfony\Component\Console\Application->run()
#11 {main} [] []
[2022-02-02 11:53:11] report.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["config_scopes","CONFIG"],"mode":"matchingTag"}} []
[2022-02-02 11:53:12] report.ERROR: Could not validate a connection to Elasticsearch. No alive nodes found in your cluster
#0 /var/www/html/magento-2-4-2-p2/setup/src/Magento/Setup/Model/SearchConfig.php(69): Magento\Setup\Model\SearchConfig->validateSearchEngine()
#1 /var/www/html/magento-2-4-2-p2/setup/src/Magento/Setup/Model/Installer.php(1197): Magento\Setup\Model\SearchConfig->saveConfiguration()
#2 [internal function]: Magento\Setup\Model\Installer->installSearchConfiguration()
#3 /var/www/html/magento-2-4-2-p2/setup/src/Magento/Setup/Model/Installer.php(389): call_user_func_array()
#4 /var/www/html/magento-2-4-2-p2/setup/src/Magento/Setup/Console/Command/InstallCommand.php(231): Magento\Setup\Model\Installer->install()
#5 /var/www/html/magento-2-4-2-p2/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\InstallCommand->execute()
#6 /var/www/html/magento-2-4-2-p2/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#7 /var/www/html/magento-2-4-2-p2/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#8 /var/www/html/magento-2-4-2-p2/vendor/magento/framework/Console/Cli.php(115): Symfony\Component\Console\Application->doRun()
#9 /var/www/html/magento-2-4-2-p2/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun()
#10 /var/www/html/magento-2-4-2-p2/bin/magento(23): Symfony\Component\Console\Application->run()
#11 {main} [] []
[2022-02-02 11:56:27] report.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["config_scopes","CONFIG"],"mode":"matchingTag"}} []
[2022-02-02 11:56:28] report.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["LAYOUT_GENERAL_CACHE_TAG"],"mode":"matchingTag"}} []
[2022-02-02 11:56:28] report.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["BLOCK_HTML"],"mode":"matchingTag"}} []
[2022-02-02 11:56:28] report.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"servers":["[object] (Laminas\\Uri\\Http: http://tienda.movistar.com.ar/)"],"formattedTagsChunk":".*"}} []
[2022-02-02 11:56:28] report.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["FPC"],"mode":"matchingTag"}} []
[2022-02-02 11:56:28] report.ERROR: Website with the same code already exists.
#0 /var/www/html/magento-2-4-2-p2/vendor/magento/framework/Model/ResourceModel/Db/AbstractDb.php(416): Magento\Framework\Model\ResourceModel\Db\AbstractDb->_checkUnique()
#1 /var/www/html/magento-2-4-2-p2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\Model\ResourceModel\Db\AbstractDb->save()
#2 /var/www/html/magento-2-4-2-p2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Store\Model\ResourceModel\Website\Interceptor->___callParent()
#3 /var/www/html/magento-2-4-2-p2/vendor/magento/module-inventory-sales/Plugin/Store/Model/ResourceModel/Website/UpdateSalesChannelWebsiteCodePlugin.php(66): Magento\Store\Model\ResourceModel\Website\Interceptor->Magento\Framework\Interception\{closure}()
#4 /var/www/html/magento-2-4-2-p2/vendor/magento/framework/Interception/Interceptor.php(135): Magento\InventorySales\Plugin\Store\Model\ResourceModel\Website\UpdateSalesChannelWebsiteCodePlugin->aroundSave()
#5 /var/www/html/magento-2-4-2-p2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Store\Model\ResourceModel\Website\Interceptor->Magento\Framework\Interception\{closure}()
#6 /var/www/html/magento-2-4-2-p2/generated/code/Magento/Store/Model/ResourceModel/Website/Interceptor.php(23): Magento\Store\Model\ResourceModel\Website\Interceptor->___callPlugins()
#7 /var/www/html/magento-2-4-2-p2/app/code/Movistar/Websites/Helper/WebsiteCreator.php(43): Magento\Store\Model\ResourceModel\Website\Interceptor->save()
#8 /var/www/html/magento-2-4-2-p2/app/code/Movistar/Websites/Setup/InstallData.php(36): Movistar\Websites\Helper\WebsiteCreator->createWebsite()
#9 /var/www/html/magento-2-4-2-p2/setup/src/Magento/Setup/Model/Installer.php(1071): Movistar\Websites\Setup\InstallData->install()
#10 /var/www/html/magento-2-4-2-p2/setup/src/Magento/Setup/Model/Installer.php(960): Magento\Setup\Model\Installer->handleDBSchemaData()
#11 [internal function]: Magento\Setup\Model\Installer->installDataFixtures()
#12 /var/www/html/magento-2-4-2-p2/setup/src/Magento/Setup/Model/Installer.php(389): call_user_func_array()
#13 /var/www/html/magento-2-4-2-p2/setup/src/Magento/Setup/Console/Command/InstallCommand.php(231): Magento\Setup\Model\Installer->install()
#14 /var/www/html/magento-2-4-2-p2/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\InstallCommand->execute()
#15 /var/www/html/magento-2-4-2-p2/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#16 /var/www/html/magento-2-4-2-p2/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#17 /var/www/html/magento-2-4-2-p2/vendor/magento/framework/Console/Cli.php(115): Symfony\Component\Console\Application->doRun()
#18 /var/www/html/magento-2-4-2-p2/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun()
#19 /var/www/html/magento-2-4-2-p2/bin/magento(23): Symfony\Component\Console\Application->run()
#20 {main} [] []
[2022-02-02 11:57:18] report.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["config_scopes","CONFIG"],"mode":"matchingTag"}} []
[2022-02-02 11:57:19] report.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["config_scopes","CONFIG"],"mode":"matchingTag"}} []
[2022-02-02 11:57:19] report.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["LAYOUT_GENERAL_CACHE_TAG"],"mode":"matchingTag"}} []
[2022-02-02 11:57:19] report.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["BLOCK_HTML"],"mode":"matchingTag"}} []
[2022-02-02 11:57:19] report.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"servers":["[object] (Laminas\\Uri\\Http: http://localhost/)"],"formattedTagsChunk":".*"}} []
[2022-02-02 11:57:19] report.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["FPC"],"mode":"matchingTag"}} []
[2022-02-02 11:57:19] report.ERROR: Website with the same code already exists.
#0 /var/www/html/magento-2-4-2-p2/vendor/magento/framework/Model/ResourceModel/Db/AbstractDb.php(416): Magento\Framework\Model\ResourceModel\Db\AbstractDb->_checkUnique()
#1 /var/www/html/magento-2-4-2-p2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\Model\ResourceModel\Db\AbstractDb->save()
#2 /var/www/html/magento-2-4-2-p2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Store\Model\ResourceModel\Website\Interceptor->___callParent()
#3 /var/www/html/magento-2-4-2-p2/vendor/magento/module-inventory-sales/Plugin/Store/Model/ResourceModel/Website/UpdateSalesChannelWebsiteCodePlugin.php(66): Magento\Store\Model\ResourceModel\Website\Interceptor->Magento\Framework\Interception\{closure}()
#4 /var/www/html/magento-2-4-2-p2/vendor/magento/framework/Interception/Interceptor.php(135): Magento\InventorySales\Plugin\Store\Model\ResourceModel\Website\UpdateSalesChannelWebsiteCodePlugin->aroundSave()
#5 /var/www/html/magento-2-4-2-p2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Store\Model\ResourceModel\Website\Interceptor->Magento\Framework\Interception\{closure}()
#6 /var/www/html/magento-2-4-2-p2/generated/code/Magento/Store/Model/ResourceModel/Website/Interceptor.php(23): Magento\Store\Model\ResourceModel\Website\Interceptor->___callPlugins()
#7 /var/www/html/magento-2-4-2-p2/app/code/Movistar/Websites/Helper/WebsiteCreator.php(43): Magento\Store\Model\ResourceModel\Website\Interceptor->save()
#8 /var/www/html/magento-2-4-2-p2/app/code/Movistar/Websites/Setup/InstallData.php(36): Movistar\Websites\Helper\WebsiteCreator->createWebsite()
#9 /var/www/html/magento-2-4-2-p2/setup/src/Magento/Setup/Model/Installer.php(1071): Movistar\Websites\Setup\InstallData->install()
#10 /var/www/html/magento-2-4-2-p2/setup/src/Magento/Setup/Model/Installer.php(960): Magento\Setup\Model\Installer->handleDBSchemaData()
#11 [internal function]: Magento\Setup\Model\Installer->installDataFixtures()
#12 /var/www/html/magento-2-4-2-p2/setup/src/Magento/Setup/Model/Installer.php(389): call_user_func_array()
#13 /var/www/html/magento-2-4-2-p2/setup/src/Magento/Setup/Console/Command/InstallCommand.php(231): Magento\Setup\Model\Installer->install()
#14 /var/www/html/magento-2-4-2-p2/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\InstallCommand->execute()
#15 /var/www/html/magento-2-4-2-p2/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#16 /var/www/html/magento-2-4-2-p2/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#17 /var/www/html/magento-2-4-2-p2/vendor/magento/framework/Console/Cli.php(115): Symfony\Component\Console\Application->doRun()
#18 /var/www/html/magento-2-4-2-p2/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun()
#19 /var/www/html/magento-2-4-2-p2/bin/magento(23): Symfony\Component\Console\Application->run()
#20 {main} [] []