• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Magento Softaculous installation has 500 error

silentlibra

New Pleskian
Server operating system version
Ubuntu 22.04
Plesk version and microupdate number
Plesk Obsidian web host edition 18.0.58 Update #1
Could someone help me I have ran tons of commands, changed permissions to folders, restart apache2, updated php requirements, and still showing 500 error for Magento 2 page. I have disabled the symbolink option in the Apache and Nginx settings in Plesk and it now shows a 502 error. Any idea how to fix this issue?

I've also reached out in the Softaculous support channel awaiting response.
 
Please remove the configuration you have done such as "disabled the symbolink" try again.

Usually, with Plesk and Magento 2, there is no need of additional configuration such as permission or Apache and Nginx settings.
 
I reenabled it already before creating this thread because with it disabled or enabled it still shows an error. It's enabled by default in Plesk under Apache and nginx settings
 
yes I substituted the actual domain with example.com

cat system.log
[2024-01-25T22:41:53.719018+00:00] main.WARNING: Memory size allocated for the temporary table is more than 20% of innodb_buffer_pool_size. Please update innodb_buffer_pool_size or decrease batch size value (which decreases memory usages for the temporary table). Current batch size: 3334; Allocated memory size: 40008000 bytes; InnoDB buffer pool size: 134217728 bytes. [] []
[2024-01-25T23:01:02.902465+00:00] main.INFO: Request token gpk6z5qtkapaj0p7aygudinrqn3hhmer was exchanged to obtain access token for consumer 1 [] []
[2024-01-25T23:01:03.894456+00:00] main.WARNING: Subscription for MBI service has been failed. An error occurred during token exchange: {"message":"Handshake request failed."}. Content-Type: application/json; charset=UTF-8 [] []
[2024-01-25T23:20:51.596440+00:00] main.ERROR: SQLSTATE[HY000] [2002] No such file or directory
#0 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/zend-db/library/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(593): Magento\Framework\DB\Adapter\Pdo\Mysql->_connect()
#3 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(634): Magento\Framework\DB\Adapter\Pdo\Mysql->_query()
#4 /var/www/vhosts/example.com/commerce.example.com/generated/code/Magento/Framework/DB/Adapter/Pdo/Mysql/Interceptor.php(95): Magento\Framework\DB\Adapter\Pdo\Mysql->query()
#5 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/zend-db/library/Zend/Db/Adapter/Abstract.php(737): Magento\Framework\DB\Adapter\Pdo\Mysql\Interceptor->query()
#6 /var/www/vhosts/example.com/commerce.example.com/generated/code/Magento/Framework/DB/Adapter/Pdo/Mysql/Interceptor.php(1085): Zend_Db_Adapter_Abstract->fetchAll()
#7 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/module-mysql-mq/Model/ResourceModel/Queue.php(160): Magento\Framework\DB\Adapter\Pdo\Mysql\Interceptor->fetchAll()
#8 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/module-mysql-mq/Model/QueueManagement.php(280): Magento\MysqlMq\Model\ResourceModel\Queue->getMessages()
#9 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/module-mysql-mq/Model/Driver/Queue.php(81): Magento\MysqlMq\Model\QueueManagement->readMessages()
#10 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework-message-queue/CallbackInvoker.php(78): Magento\MysqlMq\Model\Driver\Queue->dequeue()
#11 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework-message-queue/Consumer.php(138): Magento\Framework\MessageQueue\CallbackInvoker->invoke()
#12 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/module-message-queue/Console/StartConsumerCommand.php(94): Magento\Framework\MessageQueue\Consumer->process()
#13 /var/www/vhosts/example.com/commerce.example.com/vendor/symfony/console/Command/Command.php(298): Magento\MessageQueue\Console\StartConsumerCommand->execute()
#14 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework/Interception/Interceptor.php(58): Symfony\Component\Console\Command\Command->run()
#15 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework/Interception/Interceptor.php(138): Magento\MessageQueue\Console\StartConsumerCommand\Interceptor->___callParent()
#16 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework/Interception/Interceptor.php(153): Magento\MessageQueue\Console\StartConsumerCommand\Interceptor->Magento\Framework\Interception\{closure}()
#17 /var/www/vhosts/example.com/commerce.example.com/generated/code/Magento/MessageQueue/Console/StartConsumerCommand/Interceptor.php(77): Magento\MessageQueue\Console\StartConsumerCommand\Interceptor->___callPlugins()
#18 /var/www/vhosts/example.com/commerce.example.com/generated/code/Magento/MessageQueue/Console/StartConsumerCommand/Proxy.php(143): Magento\MessageQueue\Console\StartConsumerCommand\Interceptor->run()
#19 /var/www/vhosts/example.com/commerce.example.com/vendor/symfony/console/Application.php(1040): Magento\MessageQueue\Console\StartConsumerCommand\Proxy->run()
#20 /var/www/vhosts/example.com/commerce.example.com/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#21 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun()
#22 /var/www/vhosts/example.com/commerce.example.com/vendor/symfony/console/Application.php(171): Magento\Framework\Console\Cli->doRun()
#23 /var/www/vhosts/example.com/commerce.example.com/bin/magento(23): Symfony\Component\Console\Application->run()
#24 {main} [] []
[2024-01-25T23:20:51.701246+00:00] main.ERROR: SQLSTATE[HY000] [2002] No such file or directory
#0 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/zend-db/library/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(593): Magento\Framework\DB\Adapter\Pdo\Mysql->_connect()
#3 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(634): Magento\Framework\DB\Adapter\Pdo\Mysql->_query()
#4 /var/www/vhosts/example.com/commerce.example.com/generated/code/Magento/Framework/DB/Adapter/Pdo/Mysql/Interceptor.php(95): Magento\Framework\DB\Adapter\Pdo\Mysql->query()
#5 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/zend-db/library/Zend/Db/Adapter/Abstract.php(737): Magento\Framework\DB\Adapter\Pdo\Mysql\Interceptor->query()
#6 /var/www/vhosts/example.com/commerce.example.com/generated/code/Magento/Framework/DB/Adapter/Pdo/Mysql/Interceptor.php(1085): Zend_Db_Adapter_Abstract->fetchAll()
#7 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/module-mysql-mq/Model/ResourceModel/Queue.php(160): Magento\Framework\DB\Adapter\Pdo\Mysql\Interceptor->fetchAll()
#8 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/module-mysql-mq/Model/QueueManagement.php(280): Magento\MysqlMq\Model\ResourceModel\Queue->getMessages()
#9 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/module-mysql-mq/Model/Driver/Queue.php(81): Magento\MysqlMq\Model\QueueManagement->readMessages()
#10 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework-message-queue/CallbackInvoker.php(78): Magento\MysqlMq\Model\Driver\Queue->dequeue()
#11 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework-message-queue/Consumer.php(138): Magento\Framework\MessageQueue\CallbackInvoker->invoke()
#12 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/module-message-queue/Console/StartConsumerCommand.php(94): Magento\Framework\MessageQueue\Consumer->process()
#13 /var/www/vhosts/example.com/commerce.example.com/vendor/symfony/console/Command/Command.php(298): Magento\MessageQueue\Console\StartConsumerCommand->execute()
#14 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework/Interception/Interceptor.php(58): Symfony\Component\Console\Command\Command->run()
#15 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework/Interception/Interceptor.php(138): Magento\MessageQueue\Console\StartConsumerCommand\Interceptor->___callParent()
#16 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework/Interception/Interceptor.php(153): Magento\MessageQueue\Console\StartConsumerCommand\Interceptor->Magento\Framework\Interception\{closure}()
#17 /var/www/vhosts/example.com/commerce.example.com/generated/code/Magento/MessageQueue/Console/StartConsumerCommand/Interceptor.php(77): Magento\MessageQueue\Console\StartConsumerCommand\Interceptor->___callPlugins()
#18 /var/www/vhosts/example.com/commerce.example.com/generated/code/Magento/MessageQueue/Console/StartConsumerCommand/Proxy.php(143): Magento\MessageQueue\Console\StartConsumerCommand\Interceptor->run()
#19 /var/www/vhosts/example.com/commerce.example.com/vendor/symfony/console/Application.php(1040): Magento\MessageQueue\Console\StartConsumerCommand\Proxy->run()
#20 /var/www/vhosts/example.com/commerce.example.com/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#21 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun()
#22 /var/www/vhosts/example.com/commerce.example.com/vendor/symfony/console/Application.php(171): Magento\Framework\Console\Cli->doRun()
#23 /var/www/vhosts/example.com/commerce.example.com/bin/magento(23): Symfony\Component\Console\Application->run()
#24 {main} [] []
[2024-01-26T00:02:05.505145+00:00] main.ERROR: There are no commands defined in the "enable" namespace.
#0 /var/www/vhosts/example.com/commerce.example.com/vendor/symfony/console/Application.php(701): Symfony\Component\Console\Application->findNamespace()
#1 /var/www/vhosts/example.com/commerce.example.com/vendor/symfony/console/Application.php(259): Symfony\Component\Console\Application->find()
#2 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun()
#3 /var/www/vhosts/example.com/commerce.example.com/vendor/symfony/console/Application.php(171): Magento\Framework\Console\Cli->doRun()
#4 /var/www/vhosts/example.com/commerce.example.com/bin/magento(23): Symfony\Component\Console\Application->run()
#5 {main} [] []
 
Have you ran the bin/magento setup:install with all the info required?

It seems your Magento 2 installation is not able to connect to MySQL.

Please correct the MySQL DB info in app/etc/env.php
 
I've ran bin/magento setup: install already and it completed but still same error, also it created the database tables in the local Plesk database
 
Also try to correct the directory/file permission.

find * -type d -print0 | xargs -0 chmod 0755
find . -type f -print0 | xargs -0 chmod 0644
chmod u+x bin/magento

Then,

bin/magento setup:upgrade
bin/magento deploy:mode:set developer
 
So I uninstalled Magento through Softaculous and re-installed it same 500 error and only on Magento installation. I ran php bin/magento setup: install then the setup: upgrade command and then setup:di:compile then cache: flush cache: clean and still same error
 
Also try to correct the directory/file permission.

find * -type d -print0 | xargs -0 chmod 0755
find . -type f -print0 | xargs -0 chmod 0644
chmod u+x bin/magento

Then,

bin/magento setup:upgrade
bin/magento deploy:mode:set developer
ran those commands just now and still same thing
 
checked the system.log and this is what I got

cat var/log/system.log
[2024-01-26T22:55:02.516098+00:00] main.CRITICAL: Can't create directory /var/www/vhosts/example.com/commerce.example.com/generated/code/Magento/Store/Model/Website/.
Class Magento\Store\Model\Website\Interceptor generation error: The requested class did not generate properly, because the 'generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' CLI command when the 'generated' directory permission is set to write --- the requested class did not generate properly, then you must add the generated class object to the signature of the related construct method, only. [] []
[2024-01-26T22:55:02.520653+00:00] main.ERROR: There are no commands defined in the "indexer" namespace.
#0 /var/www/vhosts/example.com/commerce.example.com/vendor/symfony/console/Application.php(701): Symfony\Component\Console\Application->findNamespace()
#1 /var/www/vhosts/example.com/commerce.example.com/vendor/symfony/console/Application.php(259): Symfony\Component\Console\Application->find()
#2 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun()
#3 /var/www/vhosts/example.com/commerce.example.com/vendor/symfony/console/Application.php(171): Magento\Framework\Console\Cli->doRun()
#4 /var/www/vhosts/example.com/commerce.example.com/bin/magento(23): Symfony\Component\Console\Application->run()
#5 {main} [] []
[2024-01-26T22:55:03.311459+00:00] main.CRITICAL: Can't create directory /var/www/vhosts/example.com/commerce.example.com/generated/code/Magento/Store/Model/Website/.
Class Magento\Store\Model\Website\Interceptor generation error: The requested class did not generate properly, because the 'generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' CLI command when the 'generated' directory permission is set to write --- the requested class did not generate properly, then you must add the generated class object to the signature of the related construct method, only. [] []
[2024-01-26T22:55:03.313815+00:00] main.ERROR: There are no commands defined in the "cache" namespace.
#0 /var/www/vhosts/example.com/commerce.example.com/vendor/symfony/console/Application.php(701): Symfony\Component\Console\Application->findNamespace()
#1 /var/www/vhosts/example.com/commerce.example.com/vendor/symfony/console/Application.php(259): Symfony\Component\Console\Application->find()
#2 /var/www/vhosts/example.com/commerce.example.com/vendor/magento/framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun()
#3 /var/www/vhosts/example.com/commerce.example.com/vendor/symfony/console/Application.php(171): Magento\Framework\Console\Cli->doRun()
#4 /var/www/vhosts/example.com/commerce.example.com/bin/magento(23): Symfony\Component\Console\Application->run()
#5 {main} [] []
[2024-01-26T22:59:02.105163+00:00] main.CRITICAL: Can't create directory /var/www/vhosts/example.com/commerce.example.com/generated/code/Magento/Framework/App/ResourceConnection/.
Class Magento\Framework\App\ResourceConnection\Proxy generation error: The requested class did not generate properly, because the 'generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' CLI command when the 'generated' directory permission is set to write --- the requested class did not generate properly, then you must add the generated class object to the signature of the related construct method, only. [] []
 
So you have a file permission issue. I'm not sure about the File and Directory permission required by Softaculous.

We set the files and directories to 777 for testing.

Within this directory,

/var/www/vhosts/example.com/commerce.example.com/

Run,

chmod -R 777 .

Then,

bin/magento setup:upgrade
bin/magento deploy:mode:set developer
 
Very strange.

What is in the system.log now?

Please check if the following modules are loaded in Apache :
mod_env, mod_version
 
Could you please send me a

ls -l

of within /var/www/vhosts/example.com/commerce.example.com/

I'm wonder if we have to change the bash user to eg - www-data before running the Magento 2 commands in Softaculous. I haven't used Softaculous.

su -s /bin/bash www-data
 
ls -l
total 1884
-rwxrwxrwx 1 bastianhilton psacln 766543 Oct 25 15:49 CHANGELOG.md
-rwxrwxrwx 1 bastianhilton psacln 650 Oct 25 15:49 COPYING.txt
-rwxrwxrwx 1 bastianhilton psacln 2972 Oct 25 15:49 Gruntfile.js.sample
-rwxrwxrwx 1 bastianhilton psacln 10364 Oct 25 15:49 LICENSE.txt
-rwxrwxrwx 1 bastianhilton psacln 10376 Oct 25 15:49 LICENSE_AFL.txt
-rwxrwxrwx 1 bastianhilton psacln 698 Oct 25 15:49 SECURITY.md
drwxrwxrwx 4 bastianhilton psacln 4096 Jan 26 22:54 app
-rwxrwxrwx 1 bastianhilton psacln 150 Oct 25 15:49 auth.json.sample
drwxrwxrwx 2 bastianhilton psacln 4096 Jan 26 22:54 bin
drwxrwxrwx 2 bastianhilton psacln 4096 Jan 24 23:35 cgi-bin
-rwxrwxrwx 1 bastianhilton psacln 4048 Oct 25 16:04 composer.json
-rwxrwxrwx 1 bastianhilton psacln 1045544 Oct 25 16:04 composer.lock
drwxrwxrwx 4 bastianhilton psacln 4096 Jan 26 22:54 dev
drwxrwxrwx 2 bastianhilton psacln 4096 Jan 26 23:43 generated
-rwxrwxrwx 1 bastianhilton psacln 55 Oct 25 15:49 grunt-config.json.sample
-rwxrwxrwx 1 bastianhilton psacln 1651 Jan 24 17:24 index.html_
drwxrwxrwx 4 bastianhilton psacln 4096 Jan 26 22:54 lib
-rwxrwxrwx 1 bastianhilton psacln 6957 Oct 25 15:49 nginx.conf.sample
-rwxrwxrwx 1 bastianhilton psacln 1234 Oct 25 15:49 package.json.sample
drwxrwxrwx 2 bastianhilton psacln 4096 Jan 26 22:54 phpserver
drwxrwxrwx 6 bastianhilton psacln 4096 Jan 26 22:54 pub
drwxrwxrwx 7 bastianhilton psacln 4096 Jan 26 22:54 setup
drwxrwxrwx 5 bastianhilton psacln 4096 Jan 26 23:43 var
drwxrwxrwx 75 bastianhilton psacln 4096 Jan 26 22:54 vendor
 
Back
Top