cancel
Showing results for 
Search instead for 
Did you mean: 

Just how many issues am I supposed to have with Magento 2! Please help.

Just how many issues am I supposed to have with Magento 2! Please help.

I've have been trying to install Magento 2 for months now and can't believe how many problems I've had. After being unable to get a install working for weeks via shared hosting (missing css after install, failing at 90% etc etc) I finally got the hosting company to do it on my behalf as using the tools available in cpanel didn't appear to be sufficient.

 

  • After install, I get constant messages that the Catalog Rule Product is not indexed. The cron doesn't seem to fix it but the cli reindex does, for about a day, and then the warning comes back! We haven't even configured the site yet.

 

  • I had problems trying to upgrade from 2.06 to 2.07. The code backup fails with no error message(!?) so had to untick it. I finally got it to upgrade, again after using SSH to delete and recompile the DI.

 

  • Unfortunately, now with 2.07 the backup section in Admin doesn't work...The OK button doesn't do anything - no messages, nothing.

 

  • Also, now if I go into Setup Wizard and click Upgrades it just sits there searching for upgrades forever so I wont be able to upgrade to a new version.

 

  • Despite this, seeing as I 'only' have a index issue, a backup issue and an upgrade issue (the site itself seems fine) I decided to go ahead and install a payment module I need. As with literally everything else I've tried in Magento 2 it's failed. It passed the checks but then failed with this:

 

[2016-06-22 11:25:55 UTC] Job "setup:module:enable {"components":[{"name":"Customweb_Base"}]}" has been successfully completed
[2016-06-22 11:25:55 UTC] Job "setup:upgrade []" has started

[2016-06-22 11:25:55 UTC] An error occurred while executing job "setup:upgrade {"command":"setup:upgrade"}": Could not complete setup:upgrade {"command":"setup:upgrade"} successfully: ltrim() expects parameter 1 to be string, object given

 

(Also, the Rollback fails!)

 

 

  • Now every time I click on Setup Wizard it jumps straight to the "enable module" screen with "Update application is not running. Error in Update!" I can't access any other section of the Setup Wizard any more.

 

  • On top of all this I'm not confident the crons are working (although they're certainly firing every minute) despite help from the hosting company and trying 3 different php paths. Update.cron.log has the following messages written to it every minute:

 

Warning: unlink(/var/sites/e/estore.contender.co.uk/public_html/var/.update_in_progress.flag): No such file or directory in /var/sites/e/estore.contender.co.uk/public_html/update/app/code/Magento/Update/Status.php on line 217
Cron readiness check failed
There was an error in previous Updater jobs...

 

The other two logs haven't had anything written to them for 2 days now, but the last messages were:

 

Parse error: syntax error, unexpected '[', expecting ')' in /var/sites/e/estore.contender.co.uk/public_html/bin/magento on line 22

Parse error: syntax error, unexpected '[', expecting ')' in /var/sites/e/estore.contender.co.uk/public_html/bin/magento on line 22

Parse error: syntax error, unexpected '[', expecting ')' in /var/sites/e/estore.contender.co.uk/public_html/bin/magento on line 22
Autoload error: Vendor autoload is not found. Please run 'composer install' under application root directory.

Warning: require(/var/sites/e/estore.contender.co.uk/public_html/vendor/magento/module-media-storage/registration.php): failed to open stream: No such file or directory in /var/sites/e/estore.contender.co.uk/public_html/vendor/composer/autoload_real.php on line 60

Fatal error: require(): Failed opening required '/var/sites/e/estore.contender.co.uk/public_html/vendor/magento/module-media-storage/registration.php' (include_path='/var/sites/e/estore.contender.co.uk/public_html/vendor/phpseclib/phpseclib/phpseclib:/var/sites/e/estore.contender.co.uk/public_html/vendor/magento/zendframework1/library:/var/sites/e/estore.contender.co.uk/public_html/vendor/phpunit/php-file-iterator:/var/sites/e/estore.contender.co.uk/public_html/vendor/phpunit/phpunit:/var/sites/e/estore.contender.co.uk/public_html/vendor/symfony/yaml:.:/usr/newage/lib/php') in /var/sites/e/estore.contender.co.uk/public_html/vendor/composer/autoload_real.php on line 60

Warning: require(/var/sites/e/estore.contender.co.uk/public_html/vendor/magento/module-variable/registration.php): failed to open stream: No such file or directory in /var/sites/e/estore.contender.co.uk/public_html/vendor/composer/autoload_real.php on line 60

Fatal error: require(): Failed opening required '/var/sites/e/estore.contender.co.uk/public_html/vendor/magento/module-variable/registration.php' (include_path='/var/sites/e/estore.contender.co.uk/public_html/vendor/phpseclib/phpseclib/phpseclib:/var/sites/e/estore.contender.co.uk/public_html/vendor/magento/zendframework1/library:/var/sites/e/estore.contender.co.uk/public_html/vendor/phpunit/php-file-iterator:/var/sites/e/estore.contender.co.uk/public_html/vendor/phpunit/phpunit:/var/sites/e/estore.contender.co.uk/public_html/vendor/symfony/yaml:.:/usr/newage/lib/php') in /var/sites/e/estore.contender.co.uk/public_html/vendor/composer/autoload_real.php on line 60

Fatal error: Class 'Zend\Mvc\Application' not found in /var/sites/e/estore.contender.co.uk/public_html/vendor/magento/framework/Console/Cli.php on line 66
Could not open input file: /var/sites/e/estore.contender.co.uk/public_html/bin/magento
Could not open input file: /var/sites/e/estore.contender.co.uk/public_html/bin/magento

 

And:

 

Fatal error: require(): Failed opening required '/var/sites/e/estore.contender.co.uk/public_html/vendor/magento/module-variable/registration.php' (include_path='/var/sites/e/estore.contender.co.uk/public_html/vendor/phpseclib/phpseclib/phpseclib:/var/sites/e/estore.contender.co.uk/public_html/vendor/magento/zendframework1/library:/var/sites/e/estore.contender.co.uk/public_html/vendor/phpunit/php-file-iterator:/var/sites/e/estore.contender.co.uk/public_html/vendor/phpunit/phpunit:/var/sites/e/estore.contender.co.uk/public_html/vendor/symfony/yaml:.:/usr/newage/lib/php') in /var/sites/e/estore.contender.co.uk/public_html/vendor/composer/autoload_real.php on line 60

Fatal error: Class 'Zend\Mvc\Application' not found in /var/sites/e/estore.contender.co.uk/public_html/vendor/magento/framework/Console/Cli.php on line 66
Could not open input file: /var/sites/e/estore.contender.co.uk/public_html/bin/magento
Could not open input file: /var/sites/e/estore.contender.co.uk/public_html/bin/magento

 

I also have this constant message in the log for my hosting:

 

[22-Jun-2016 13:58:14 Europe/London] PHP Warning: unlink(/var/sites/e/estore.contender.co.uk/public_html/var/.update_in_progress.flag): No such file or directory in /var/sites/e/estore.contender.co.uk/public_html/update/app/code/Magento/Update/Status.php on line 217
[22-Jun-2016 14:00:04 Europe/London] PHP Warning: unlink(/var/sites/e/estore.contender.co.uk/public_html/var/.update_in_progress.flag): No such file or directory in /var/sites/e/estore.contender.co.uk/public_html/update/app/code/Magento/Update/Status.php on line 217

 

 

 

 

7 REPLIES 7

Re: Just how many issues am I supposed to have with Magento 2! Please help.

It could be an issue with permissions. Make sure that whatever user the cron job runs under, it has sufficient read and write permissions to your Magento file system. If the web server process runs as a different user than the cron (PHP cli) this could cause problems.

Sindre M, CEO & Founder
ProperHost.com - The Magento Hosting Experts

Re: Just how many issues am I supposed to have with Magento 2! Please help.

I agree, it seems the user and group permissions are off for the cronjob.

 

1 tip; dont ever go further with installling modules or coding when you have a big bug (Like you describe everyone is 1 big bug)

 

first fix 1 bug and then go to the other.

 

Dont ingore them they'll bite ya. 

Re: Just how many issues am I supposed to have with Magento 2! Please help.

Deleted

 

 

Re: Just how many issues am I supposed to have with Magento 2! Please help.

I've have been through 3 major revisions (and a large number of minor ones) of the cron jobs with our very helpful hosting company so I'm not sure what else to do.

 

How can I confirm what you're both suggesting?

 

Also, I don't mean to doubt what you say but can I confirm two things with you? The Setup and Magento cron logs haven't been written to for days. Is this correct and if so, isn't that an indication that those two crons are running correctly without errors?

 

The update cron log is having "There was an error in previous Updater jobs..." written every minute, is that really an indication that my cron issues are permissions?

 

These are the three major crontabs that me (and my hosting company) have tried. The last one is the one we're currently running with because it is a cli version of php:

 

* * * * * /usr/bin/php-7.0 -c /usr/local/php7/php.ini /var/sites/e/estore.contender.co.uk/public_html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/sites/e/estore.contender.co.uk/public_html/var/log/magento.cron.log

* * * * * /usr/bin/php-7.0 -c /usr/local/php7/php.ini /var/sites/e/estore.contender.co.uk/public_html/update/cron.php >> /var/sites/e/estore.contender.co.uk/public_html/var/log/update.cron.log

* * * * * /usr/bin/php-7.0 -c /usr/local/php7/php.ini /var/sites/e/estore.contender.co.uk/public_html/bin/magento setup:cron:run >> /var/sites/e/estore.contender.co.uk/public_html/var/log/setup.cron.log

 

* * * * * /usr/bin/php-7.0 -c /var/sites/e/estore.contender.co.uk/public_html/php7.ini /var/sites/e/estore.contender.co.uk/public_html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/sites/e/estore.contender.co.uk/public_html/var/log/magento.cron.log

* * * * * /usr/bin/php-7.0 -c /var/sites/e/estore.contender.co.uk/public_html/php7.ini /var/sites/e/estore.contender.co.uk/public_html/update/cron.php >> /var/sites/e/estore.contender.co.uk/public_html/var/log/update.cron.log

* * * * * /usr/bin/php-7.0 -c /var/sites/e/estore.contender.co.uk/public_html/php7.ini /var/sites/e/estore.contender.co.uk/public_html/bin/magento setup:cron:run >> /var/sites/e/estore.contender.co.uk/public_html/var/log/setup.cron.log

 

We then changed the site to php 5.6 instead of 7:

 

* * * * * /usr/bin/php-5.6-cli -c /var/sites/e/estore.contender.co.uk/public_html/php56.ini /var/sites/e/estore.contender.co.uk/public_html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/sites/e/estore.contender.co.uk/public_html/var/log/magento.cron.log

* * * * * /usr/bin/php-5.6-cli -c /var/sites/e/estore.contender.co.uk/public_html/php56.ini /var/sites/e/estore.contender.co.uk/public_html/update/cron.php >> /var/sites/e/estore.contender.co.uk/public_html/var/log/update.cron.log

* * * * * /usr/bin/php-5.6-cli -c /var/sites/e/estore.contender.co.uk/public_html/php56.ini /var/sites/e/estore.contender.co.uk/public_html/bin/magento setup:cron:run >> /var/sites/e/estore.contender.co.uk/public_html/var/log/setup.cron.log

Re: Just how many issues am I supposed to have with Magento 2! Please help.

Look for an error_log file in /var/sites/e/estore.contender.co.uk/public_html/. It should tell you if any PHP errors occur.

 

Also, have you tried to run any of these cron commands manually from the shell? Like this:

 

 

/usr/bin/php-7.0 -c /usr/local/php7/php.ini /var/sites/e/estore.contender.co.uk/public_html/bin/magento cron:run

It is easier to debug problems with the cron jobs if you run them manually as potential errors will be written to the console.

 

Sindre M, CEO & Founder
ProperHost.com - The Magento Hosting Experts

Re: Just how many issues am I supposed to have with Magento 2! Please help.

Hi

 

Thank you for getting back to me, I really appreciate the help as I'm not sure how I can fix these issues without it.

 

I have tried running them from the SSH terminal and they never seem to report any feedback in the console. They do however take a few seconds to return the the prompt so I'm assuming they are running. I have done these manual runs on and off throughout the process and have still had the issues mentioned in my original post.

 

With regards to the php log, it's just filled up like this:

 

[22-Jun-2016 13:58:14 Europe/London] PHP Warning: unlink(/var/sites/e/estore.contender.co.uk/public_html/var/.update_in_progress.flag): No such file or directory in /var/sites/e/estore.contender.co.uk/public_html/update/app/code/Magento/Update/Status.php on line 217
[22-Jun-2016 14:00:04 Europe/London] PHP Warning: unlink(/var/sites/e/estore.contender.co.uk/public_html/var/.update_in_progress.flag): No such file or directory in /var/sites/e/estore.contender.co.uk/public_html/update/app/code/Magento/Update/Status.php on line 217
[30-Jun-2016 10:12:45 Europe/London] PHP Warning: unlink(/var/sites/e/estore.contender.co.uk/public_html/var/.update_in_progress.flag): No such file or directory in /var/sites/e/estore.contender.co.uk/public_html/update/app/code/Magento/Update/Status.php on line 217

 

Thanks

Re: Just how many issues am I supposed to have with Magento 2! Please help.

I cannot tell for sure without looking at your exact server setup, but my initial assumption is that there is some sort of permission issue causing this. It seems to me that PHP is not able to write to the file system. Make sure that the user running the cron command has read/write access to your Magento files and double check the file ownership and permissions.

Sindre M, CEO & Founder
ProperHost.com - The Magento Hosting Experts