Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command fails: bin/magento deploy:mode:set production #2561

Closed
marvincaspar opened this issue Nov 30, 2015 · 54 comments
Closed

Command fails: bin/magento deploy:mode:set production #2561

marvincaspar opened this issue Nov 30, 2015 · 54 comments
Labels
Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@marvincaspar
Copy link

Hi,

when I try to run bin/magento deploy:mode:set production it fails while executing php -f /var/www/html/bin/magento setup:di:compile-multi-tenant 2>&1

I'm working on a clean Magento 2 EE instance.

Enabled maintenance mode
Static content deployment start
Requested languages: en_US
=== frontend -> Magento/blank -> en_US ===
..............
Successful: 2051 files; errors: 0

---

=== frontend -> Magento/luma -> en_US ===
..............
Successful: 2124 files; errors: 0

---

=== adminhtml -> Magento/backend -> en_US ===
..............
Successful: 1874 files; errors: 0

---

=== Minify templates ===
..............
Successful: 1130 files modified

---

New version of deployed files: 1448885114
Static content deployment complete
Start compilation
Command returned non-zero exit code:
`php -f /var/www/html/bin/magento setup:di:compile-multi-tenant 2>&1`

Running bin/magento setup:di:compile-multi-tenant throws this error:

PHP Fatal error:  Class 'StaticReview\Review\AbstractReview' not found in /var/www/html/dev/tools/Magento/Tools/StaticReview/PhpCsFixerReview.php on line 19
PHP Stack trace:
PHP   1. {main}() /var/www/html/bin/magento:0
PHP   2. Symfony\Component\Console\Application->run() /var/www/html/bin/magento:25
PHP   3. Magento\Framework\Console\Cli->doRun() /var/www/html/vendor/symfony/console/Symfony/Component/Console/Application.php:126
PHP   4. Symfony\Component\Console\Application->doRun() /var/www/html/vendor/magento/framework/Console/Cli.php:49
PHP   5. Symfony\Component\Console\Application->doRunCommand() /var/www/html/vendor/symfony/console/Symfony/Component/Console/Application.php:195
PHP   6. Symfony\Component\Console\Command\Command->run() /var/www/html/vendor/symfony/console/Symfony/Component/Console/Application.php:874
PHP   7. Magento\Setup\Console\Command\DiCompileMultiTenantCommand->execute() /var/www/html/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
PHP   8. Magento\Setup\Console\Command\DiCompileMultiTenantCommand->compileCode() /var/www/html/setup/src/Magento/Setup/Console/Command/DiCompileMultiTenantCommand.php:228
PHP   9. Magento\Setup\Module\Di\Code\Reader\Decorator\Directory->getList() /var/www/html/setup/src/Magento/Setup/Console/Command/DiCompileMultiTenantCommand.php:374
PHP  10. Magento\Setup\Module\Di\Code\Reader\ClassesScanner->getList() /var/www/html/setup/src/Magento/Setup/Module/Di/Code/Reader/Decorator/Directory.php:92
PHP  11. class_exists() /var/www/html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php:69
PHP  12. spl_autoload_call() /var/www/html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php:69
PHP  13. Composer\Autoload\ClassLoader->loadClass() /var/www/html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php:69
PHP  14. Composer\Autoload\includeFile() /var/www/html/vendor/composer/ClassLoader.php:301
PHP  15. include() /var/www/html/vendor/composer/ClassLoader.php:412

The class StaticReview\Review\AbstractReview not exists in any directory.

@mazhalai
Copy link
Contributor

@mc388 when you ran composer install did you use the --no-dev option? StaticReview\Review\AbstractReview is loaded via "sjparkinson/static-review": "~4.1", package

@marvincaspar
Copy link
Author

I installed it with require-dev but now it is working.

I had the require-dev node in an extra composer package and not in the "main" composer file. After moving it and run composer update again, the AbstractReview class is available

@moleman
Copy link

moleman commented Dec 4, 2015

We have the same problem after calling composer install with the --no-dev flag. Is this a known issue that will be fixed?

We are using Jenkins to build our sites and we don't want to include development requirements in the artifacts that we deploy to production.

Workaround:
First call "composer install" (install with dev requirements), then set the deploy mode, then call "composer install --no-dev" to remove the dev requirements before you package your build artifact.

@marvincaspar
Copy link
Author

@moleman: this is a good argument

@hostep
Copy link
Contributor

hostep commented Dec 31, 2015

Yes, would be nice if this got fixed, we also run into this problem.

@shiftedreality
Copy link
Member

@mc388 rhank you for reporting this issue.

Internal ticket MAGETWO-47919 was created

@victorgugo victorgugo added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jan 14, 2016
@biotech
Copy link

biotech commented Feb 10, 2016

Faced with same issue.

@romeof1980
Copy link

We got in the same issue after running php magento deploy:mode:set production
We can see:
Static deployment complete
Start compilation
Command returned non-zero exit code:
'php -f /home/mysite/public_html/bin/magento setup:di:complete-multi-tenant 2>&1'

Curiously, if we run php magento setup:di:complete-multi-tenant or php magento setup:di:complete-multi-tenant 2>&1 no errors show up.
Furthermore, when firing php magento deploy:mode:show is confirmed we're still in default mode and the deployment to mode production failed

@stefanpkc
Copy link

Same issue here. Tried to go from default to production. Same error. Then I set it to developer. But now I can't go back to default or production. I'm stuck. I run it with PHP 7.0.4.

@mswaidan
Copy link

I'm having the same issue

@jsnx
Copy link

jsnx commented Mar 21, 2016

same here. Running php magento setup:di:compile-multi-tenant brings:


[ReflectionException]                                                   
  Class \Smartwave\Megamenu\Model\Attribute\SubcatColumns does not exist

Seems to be a problem with the smartwave porto theme.

@ghost
Copy link

ghost commented Mar 21, 2016

I'm also having this issue #3850

@jsnx
Copy link

jsnx commented Mar 21, 2016

can you post the output of php -f /home/telefoon/domains/blueburst.nl/public_html/bin/magento setup:di:compile-multi-tenant also here?

@ghost
Copy link

ghost commented Mar 21, 2016

Thank you for your reply. I get the following error:

$ php -f /home/telefoon/domains/blueburst.nl/public_html/bin/magento setup:di:compile-multi-tenant

  [ReflectionException]          
  Class \Issuers does not exist  

setup:di:compile-multi-tenant [--serializer="..."] [--extra-classes-file="..."] [--generation="..."] [--di="..."] [--exclude-pattern="..."] [--magento-init-params="..."]

@romeof1980
Copy link

+1 @mazhalai and @mc388 for the tips
thanks @moleman for the proposed workaround
anyway, it does not work for us.

when firing composer install we get:
Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Nothing to install or update

we also run php composer update succesfully

but when trying php magento deploy:mode:set production
we still get the following error:

Static content deployment complete
Start compilation
Command returned non-zero exit code:
php -f /chroot/home/ozforest/ozforest.com/html/bin/magento setup:di:compile-multi-tenant 2>&1

in stackoverflow someone also suggested to set memory_limit to 512M but we've already set it to 768M.

issue still persist.

NOTE: we've been working with Nexcess hosting provider, so based on past experience we're quite sure the issue isn't related to server misconfiguration and/or poor service

@ghost
Copy link

ghost commented Mar 25, 2016

Please try my workarround #3850 to check if it is something with your extensions.
and what does this command say:

php -f bin/magento setup:di:compile-multi-tenant

@hostep
Copy link
Contributor

hostep commented May 2, 2016

Bump, this still isn't fixed in Magento 2.0.5

@ Magento guys, I find it hard to believe that 6 months after the "stable" release, you still cannot setup a production-like environment for Magento 2 if you use composer install --no-dev because of this bug, this really should get a high priority!

This is the output we get:

$ php bin/magento setup:di:compile-multi-tenant
PHP Fatal error:  Class 'StaticReview\Review\AbstractReview' not found in dev/tools/Magento/Tools/StaticReview/PhpCsFixerReview.php on line 19

(please ignore the comments above for people with their 3rd party modules, they should resolve this with their 3rd party)

@LeeSaferite
Copy link

For me the problem suddenly appeared on April 29th or April 30th. We've had --no-dev in out build process since the beginning and this suddenly started happening. Due to the way out build process works we cannot use the composer.lock file. I'm guessing something changed in one of the million magento packages that broke something.

Using Magento 2.0.4

@LeeSaferite
Copy link

One thing that resolve the issue for me was 'rm -rf /dev/' since this is a prod package I have no need of the dev subdirectory anyway.

@alankent Why is /dev part of the base package and no a require-dev include?

@maderlock
Copy link

The best solution we've come up with to allow us to get round the PhpCsFixerReview.php error is to add the expected library from require-dev to require, giving a require setting like this:

"require": {
    "magento/product-community-edition": "2.0.5",
    "composer/composer": "@alpha",
    "sjparkinson/static-review": "~4.1"
},

While we wait for Magento to sort out this pretty fundamental issue, this should at least let us compile for production.

@hostep
Copy link
Contributor

hostep commented May 23, 2016

In a very very quick test using Magento 2.1.0-rc1, it looks like this got fixed.
Can someone else confirm?

@hostep
Copy link
Contributor

hostep commented Jun 26, 2016

This issue can be closed. Is fixed in Magento 2.1.0.
Even though they still install a bunch of development dependencies when running composer install --no-dev unfortunately.

@shiftedreality
Copy link
Member

Closed

@nmallepally
Copy link

@romeof1980 Yes.
prod error

@romeof1980
Copy link

Could you please post the error log too?

---- On Wed, 10 Aug 2016 10:12:29 +0200 notifications@github.com wrote ----

@romeof1980 Yes.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@nmallepally
Copy link

[2016-08-06 22:24:45] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_47c323d9e7fcb3063099dfdf783059118 and handles default, cms_index_index, cms_page_view, cms_index_index_id_everything-home: Veuillez corriger les données XML et essayer à nouveau. [] []
[2016-08-06 22:24:45] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_4a7ccd8094436548b564a588f6303121c and handles 2columns-left: Veuillez corriger les données XML et essayer à nouveau. [] []
[2016-08-06 22:24:45] main.CRITICAL: Broken reference: the 'mobile.top.search' tries to reorder itself towards 'minicart', but their parents are different: 'header-wrapper-container' and 'header-wrapper' respectively. [] []
[2016-08-06 22:24:45] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_46f1b068ec7ccf4878f9284dd1137afd1 and handles catalog_product_prices: Veuillez corriger les données XML et essayer à nouveau. [] []
[2016-08-06 22:30:26] main.ERROR: /opt/plesk/php/7.0/bin/php -f /var/www/vhosts/magento2/httpdocs/bin/magento setup:di:compile 2>&1
Compilation was started.
%message% 0/7 [>---------------------------] 0% 1 sec 40.0 MiB%message% 0/7 [>---------------------------] 0% 1 sec 40.0 MiBProxies code generation... 0/7 [>---------------------------] 0% 1 sec 40.0 MiB
Proxies code generation... 1/7 [====>-----------------------] 14% 1 sec 44.0 MiB
Repositories code generation... 1/7 [====>-----------------------] 14% 1 sec 44.0 MiBPHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /var/www/vhosts/magento2/httpdocs/vendor/magento/module-dhl/Model/Carrier.php on line 1657

Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors. [] []
[2016-08-06 22:33:03] main.ERROR: /opt/plesk/php/7.0/bin/php -f /var/www/vhosts/magento2/httpdocs/bin/magento setup:di:compile 2>&1
Compilation was started.
%message% 0/7 [>---------------------------] 0% 1 sec 40.0 MiB%message% 0/7 [>---------------------------] 0% 1 sec 40.0 MiBProxies code generation... 0/7 [>---------------------------] 0% 1 sec 40.0 MiB
Proxies code generation... 1/7 [====>-----------------------] 14% 1 sec 44.0 MiB
Repositories code generation... 1/7 [====>-----------------------] 14% 1 sec 44.0 MiBPHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /var/www/vhosts/magento2/httpdocs/vendor/magento/module-dhl/Model/Carrier.php on line 1657

@romeof1980
Copy link

Hi there, quite sure it's a memory limit error. Follow the link to composer page in the log you just sent. You need to contact your host and ask them to increase the memory limit. Make a note to them, as you see in the composer suggestion, to verify that xdebug were not loaded.
Let us know if that solve the issue,
romeo

---- On Wed, 10 Aug 2016 10:23:56 +0200 notifications@github.com wrote ----

[2016-08-06 22:24:45] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_47c323d9e7fcb3063099dfdf783059118 and handles default, cms_index_index, cms_page_view, cms_index_index_id_everything-home: Veuillez corriger les données XML et essayer à nouveau. [] []
[2016-08-06 22:24:45] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_4a7ccd8094436548b564a588f6303121c and handles 2columns-left: Veuillez corriger les données XML et essayer à nouveau. [] []
[2016-08-06 22:24:45] main.CRITICAL: Broken reference: the 'mobile.top.search' tries to reorder itself towards 'minicart', but their parents are different: 'header-wrapper-container' and 'header-wrapper' respectively. [] []
[2016-08-06 22:24:45] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_46f1b068ec7ccf4878f9284dd1137afd1 and handles catalog_product_prices: Veuillez corriger les données XML et essayer à nouveau. [] []
[2016-08-06 22:30:26] main.ERROR: /opt/plesk/php/7.0/bin/php -f /var/www/vhosts/magento2/httpdocs/bin/magento setup:di:compile 2>&1
Compilation was started.
%message% 0/7 [>---------------------------] 0% 1 sec 40.0 MiB%message% 0/7 [>---------------------------] 0% 1 sec 40.0 MiBProxies code generation... 0/7 [>---------------------------] 0% 1 sec 40.0 MiB
Proxies code generation... 1/7 [====>-----------------------] 14% 1 sec 44.0 MiB
Repositories code generation... 1/7 [====>-----------------------] 14% 1 sec 44.0 MiBPHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /var/www/vhosts/magento2/httpdocs/vendor/magento/module-dhl/Model/Carrier.php on line 1657

Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors. [] []
[2016-08-06 22:33:03] main.ERROR: /opt/plesk/php/7.0/bin/php -f /var/www/vhosts/magento2/httpdocs/bin/magento setup:di:compile 2>&1
Compilation was started.
%message% 0/7 [>---------------------------] 0% 1 sec 40.0 MiB%message% 0/7 [>---------------------------] 0% 1 sec 40.0 MiBProxies code generation... 0/7 [>---------------------------] 0% 1 sec 40.0 MiB
Proxies code generation... 1/7 [====>-----------------------] 14% 1 sec 44.0 MiB
Repositories code generation... 1/7 [====>-----------------------] 14% 1 sec 44.0 MiBPHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /var/www/vhosts/magento2/httpdocs/vendor/magento/module-dhl/Model/Carrier.php on line 1657


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@nmallepally
Copy link

@romeof1980 Thanks but my memory limit is 2048MB.
ml

@romeof1980
Copy link

hi @nmallepally ,
is Xdebug enabled?

@romeof1980
Copy link

hi @nmallepally ,
have a look here too:
http://magento.stackexchange.com/questions/97749/fatal-error-allowed-memory-size-while-run-setupstatic-contentdeploy

and here:
http://magento.stackexchange.com/questions/92492/magento-2-beta-2-0-0-error-when-compile-code

you should increase allocated memory limit for PHP.
Look to me your value is 128M

please ask your host to read this message and give us a feedback

hope that could help

romeo

@nmallepally
Copy link

@romeof1980 there is no xdebug extension on my php.ini, i did not request as it affects production perfomance. But when test the memory it shows limit value as 2G. what can i do? they say the website is taking 2048MB. Do you want me to run as -d memory=-1; ?

@romeof1980
Copy link

romeof1980 commented Aug 10, 2016

hi @nmallepally ,
please try first this cmd from public_html (your website root folder):

php -r "echo ini_get('memory_limit').PHP_EOL;"

if the memory limit is confirmed to be correct as shown in phpinfo() referring to the following thread could help: in one of my website where I had a similar issue I was able to detect the problem was related to the theme installed
#3850

@nmallepally
Copy link

@romeof1980 it shows 128mb. but on my phpinfo.php , it shows 2048mb.
when i called the hosting , they said the website is taking 2048mb, for the script they asked me to use specify path but when i used the path /opt/plesk/php/7.0/bin/php n did the above command it returns same 128mb. I'm really stuck with what to do now, as we need to go live today.

@romeof1980
Copy link

Hi guy!
If I were in your position I would insist a bit with the Host. I don't know if I can mention my Hosting provider here.. Anyway with Nexcess guys I've always found they are happy to help me troubleshoot these kind of issue: for what I can see your server admin should help clarify that difference between the value in phpinfo() and the one you get from SSH. Did they suggest to check the value in .htaccess ? Keep in mind that locally set values can override system values..

---- On Wed, 10 Aug 2016 12:20:18 +0200 notifications@github.com wrote ----

@romeof1980 it shows 128mb. but on my phpinfo.php , it shows 2048mb.
when i called the hosting , they said the website is taking 2048mb, for the script they asked me to use specify path but when i used the path /opt/plesk/php/7.0/bin/php n did the above command it returns same 128mb. I'm really stuck with what to do now, as we need to go live today.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@nmallepally
Copy link

nmallepally commented Aug 10, 2016

@romeof1980 on my .htaccess the php value memory_limit is 2048mb, the last time they said i need to give a specific memory to run the script , which i did but it does not over ride i suppose. like -d memory=6G or -1. Do i need to create another copy of php.ini on my website and change the value.
Since they say that the original php.ini files cannot be changed from 128MB ram as this is for Debian.

@romeof1980
Copy link

Tell me if I understood correctly:
From phpinfo() 2048M
From public_html/.htaccess 2048M
From SSH in public_html if you fire the above cmd it gives you 128M ?

If yes try to contact your host again and ask what they think of it: is that for them the default behaviour?
At this point could be worth consider that the issue isn't probably related to memory limit: anyway clarifying it will help moving forward with the troubleshooting

---- On Wed, 10 Aug 2016 12:38:24 +0200 notifications@github.com wrote ----

@romeof1980 on my .htaccess the php value memory_limit is 2048mb


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@nmallepally
Copy link

@romeof1980 this is what they replied,
you just need to make your own php.ini and give it to the php bin. Example :

/opt/plesk/php/7.0/bin/php -C path/to/your/php.ini your_script.php

But to make it simple, I've updated the global php.ini for the cli, it's now at 1G :

~$ /opt/plesk/php/7.0/bin/php -i | grep memory_limit
memory_limit => 1G => 1G

And by the way, setting the limit using the "-d memory_limit=2048M" directive is working as well :

~$ /opt/plesk/php/7.0/bin/php -d memory_limit=2048M -i | grep memory_limit
memory_limit => 2048M => 2048M

@romeof1980
Copy link

So? Did you try to deploy it to production with these setting in place?

---- On Wed, 10 Aug 2016 13:24:34 +0200 notifications@github.com wrote ----

@romeof1980 this is what they replied,
you just need to make your own php.ini and give it to the php bin. Example :

/opt/plesk/php/7.0/bin/php -C path/to/your/php.ini your_script.php

But to make it simple, I've updated the global php.ini for the cli, it's now at 1G :

~$ /opt/plesk/php/7.0/bin/php -i | grep memory_limit
memory_limit => 1G => 1G

And by the way, setting the limit using the "-d memory_limit=2048M" directive is working as well :

~$ /opt/plesk/php/7.0/bin/php -d memory_limit=2048M -i | grep memory_limit
memory_limit => 2048M => 2048M


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@nmallepally
Copy link

@romeof1980 I'm running the command now, Will paste the output here.
Is it possible to just run fr_FR and the theme i use for production mode? Because I have 10 other themes assosiated with the one I use from Emthemes, we only use French store ?. I'm using putty to run commands, the connection aborted due to inactivity, will the script still run behind?

@romeof1980
Copy link

Hi there, to be honest I haven't used windows anymore since I left the high school 15 years ago.. :) .. So about Putty I can't be of more help.
Run php bin/magento and find the command for checking if you are now in production: should be php/bin magento mode:set:show or something similar.

And google around to check how to manage the timeout limit of that dreadful putty stuff.. ;)

---- On Wed, 10 Aug 2016 13:53:07 +0200 notifications@github.com wrote ----

@romeof1980 I'm running the command now, Will paste the output here.
Is it possible to just run fr_FR and the theme i use for production mode? Because I have 10 other themes assosiated with the one I use from Emthemes, we only use French store ?. I'm using putty to run commands, the connection aborted due to inactivity, will the script still run behind?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@nmallepally
Copy link

@romeof1980 Hey thanks it worked and is in production mode.
But strange error, inside admin i kept minify css , html and javascript to yes.
The website is gone and admin is broken? Dont know y.
admin broken
error web

@hostep
Copy link
Contributor

hostep commented Aug 10, 2016

@nmallepally & @romeof1980: can you please continue this discussion some place else? This has nothing to do anymore with the original reported issue. You are currently spamming at least 16 people's mailboxes with all your messages.

Thank you! :)

@romeof1980
Copy link

Hi there.. This is now off-topic.. Anyway is related to permission in Magento 2. Try to check it with Firebug console and you'll probably find errors 404 related to static files (js, css). But please this need to be discussed in one of the thread in GitHub where "permission issue in Magento 2" is addressed. I'll send you a link asap

---- On Wed, 10 Aug 2016 15:12:35 +0200 notifications@github.com wrote ----

@romeof1980 Hey thanks it worked and is in production mode.
But strange error, inside admin i kept minify css , html and javascript to yes.
The website is gone and admin is broken? Dont know y.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@nmallepally
Copy link

@hostep Apologies for that, we would discuss else where.
@romeof1980 Thankyou for the guiding, yeah let me know the link, because if i can minify them my website can be faster.Thank you again.

@romeof1980
Copy link

hi @nmallepally ,
glad to know that setting mode to production now works: here are a couple of links to further work on the new issue you've gotten:
PRE INSTALLATION:
http://devdocs.magento.com/guides/v2.0/install-gde/prereq/file-system-perms.html
http://devdocs.magento.com/guides/v2.1/install-gde/prereq/file-sys-perms-over.html

seeing that if you can set memory_limit to 2048M you're probably on a dedicated server: when setting permission or when troubleshooting them remember to check the right documentation either for dedicated or shared server. With dedicated server is going to be easier (just based on my own experience).

TROUBLESHOOTING:
#2412

just google around for "issue with static file in magento 2" you'll find many thread, among them:
http://magento.stackexchange.com/questions/97209/magento-2-css-and-javascript-not-loading-from-correct-folder

important: see what your firebug console (or similar) gives you as 404 error in order to confirm and further work on the issue

if you need more help please write a question here:
#2412

have a great day,
romeo

@nmallepally
Copy link

@romeof1980 @hostep Regarding Production mode error,
In production mode on Admin side, Store->configuration->Advanced ->system -> Shows blank screen, does not even show error. 2.1CE Production .
On console it gives me 500 internal server.

To Reproduce
Update from 2.0.7 to 2.1CE
2.1 Dev mode to 2.1 Prod mode
prod mode error, increase limit to 2G
Prod done successful
store ->config-> advanced-> system ->500 internal error.
500

@medma-infomatix
Copy link

I have fixed this issue by updating composer.

$ composer update

@orlangur
Copy link
Contributor

orlangur commented Apr 1, 2017

OMG :)

7cf6450 is obviously not a proper solution as

$ php bin/magento setup:di:compile-multi-tenant
PHP Fatal error:  Class 'StaticReview\Review\AbstractReview' not found in dev/tools/Magento/Tools/StaticReview/PhpCsFixerReview.php on line 19

we don't need this file in non-dev environment.

As a result of such incorrect change people are now having troubles with outdated dependencies in PROD: #8070 (comment)

@baltechies
Copy link

I have issue when switching from default mode to Production.
When I trying to switch to production mode on magento version 2.1.5 then its throwing the errors like:

Interception cache generation... 7/7 [============================] 100% 3 mins 306.0 MiB
Generated code and dependency injection configuration successfully.
Compilation complete
Starting deployment of static content
Something went wrong while deploying static content. See the error log for details.
Command returned non-zero exit code:
/usr/bin/php -f /opt/bitnami/apps/magento/htdocs/bin/magento setup:static-content:deploy en_US de_DE fr_FR it_IT

	Incorrect dependency in class Magerips\SocialSharing\Block\SocialSharing in /opt/bitnami/apps/magento/htdocs/app/code/Magerips/SocialSharing/Block/SocialSharing.php

\Magento\Framework\App\Config\ScopeConfigInterface already exists in context object
Total Errors Count: 20

Interception cache generation... 7/7 [============================] 100% 3 mins 306.0 MiB
Generated code and dependency injection configuration successfully. [] []
[2017-04-07 06:36:12] main.ERROR: /usr/bin/php -f /opt/bitnami/apps/magento/htdocs/bin/magento setup:static-content:deploy en_US de_DE fr_FR it_IT 2>&1

PHP Fatal error: Uncaught Error: Class 'Magento\Indexer\Model\Config\Reader' not found in /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:93
Stack trace:
#0 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\Indexer...', Array)
#1 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\Indexer...')
#2 /opt/bitnami/apps/magento/htdocs/app/code/Manadev/Core/Registries/ConfigurationReaders.php(32): Magento\Framework\ObjectManager\ObjectManager->get('Magento\Indexer...')
#3 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93): Manadev\Core\Registries\ConfigurationReaders->__construct(Object(Magento\Framework\ObjectManager\ObjectManager), Array)
#4 /opt/bitnami/apps/magento/htdocs/vendor/magento/fram in /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93 [] []

PHP version is 7.0.6
Magento version 2.1.5
Note: We have upgraded the magento version fro 2.0.7

@joomlabeat
Copy link

I was getting also errors trying to set mode on my local mamp setup and it proved to be memory_limit.

So for everyone that uses MAMP and faces the same, note that when running from cli, it won't use the customised /Library/Application Support/appsolute/MAMP PRO/conf/php7.0.8.ini that you might have set through MAMP template files, but it will load directly the default MAMP Application php.ini inside:
/Applications/MAMP/bin/php/php7.0.8/conf/php.ini.

So just adjust the memory_limit there and php bin/magento deploy:mode:set ... will run and complete.

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Oct 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests