cancel
Showing results for 
Search instead for 
Did you mean: 

Error while updating Magento 2.2.1

SOLVED

Error while updating Magento 2.2.1

Hello!

 

I need some help.

 

While updating I get this errors:

 asd.png


I think the cron jobs are the isssue.

When they run I get this:


[Symfony\Component\Console\Exception\RuntimeException]
Too many arguments, expected arguments "command".

setup:cron:run [--magento-init-params MAGENTO-INIT-PARAMS]
On all 3 cron jobs.

 

The cron jobs are:

/opt/cpanel/ea-php70/root/usr/bin/php /home/proiecto/new.site.ro/bin/magento cron:run | grep -v "Cron job Magento - by schedule" >> /home/proiecto/new.site.ro/var/log/magento.cron.log	

/opt/cpanel/ea-php70/root/usr/bin/php /home/proiecto/new.site.ro/update/cron.php >> /home/proiecto/new.site.ro/var/log/update.cron.log	

/opt/cpanel/ea-php70/root/usr/bin/php /home/proiecto/new.site.ro/bin/magento setup:cron:run >> php /home/proiecto/new.site.ro/var/log/setup.cron.log	

I know the server is running all requrements because I had previusly had Magento 2.2.3 installed on the server.

 

Thank you!

4 REPLIES

Re: Error while updating Magento 2.2.1

List of errors: 

Step 2: Readiness Check

Error! You need to resolve these issues to continue.
Check Updater Application Availability

Updater application is available.

Check Cron Scripts

Cron script readiness check failed. Hide detail

Error from Setup Application Cron Script:
Cron job has not been configured yet
Other checks will fail as a result (PHP version, PHP settings, and PHP extensions)

 

For additional assistance, see cron scripts help.

Check Component Dependency

Component dependency is correct.

PHP Settings Check *
PHP Extensions Check

missing PHP extensions. Hide detail

The best way to resolve this is to install the correct missing extensions. The exact fix depends on our server, your host, and other system variables. 
Our PHP extension help can get you started.

For additional assistance, contact your hosting provider.

* - In some cases, you might have two PHP configuration files: one for the PHP command line and for the web server. If so, make the change in both php.ini files. For details, see the php.ini reference.
 
It appears the image dissapeared.

Re: Error while updating Magento 2.2.1

Please follow the steps on the below URL. Let know how it goes.

 

http://devdocs.magento.com/guides/v2.0/comp-mgr/trouble/cman/cron.html

 

Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.

 

Thanks,
Tarandeep
Magento 2 Certified Solution Specialist (x2). Follow me on Twitter

Re: Error while updating Magento 2.2.1

Hello,

Thanks for your reply. So my problem is a little tricky...

It seems my cron jobs run.. somehow.. In Index Management it updates.

This is what PuTTY shows me in crontab: 

 

SHELL="/usr/local/cpanel/bin/jailshell"
* * * * * /opt/cpanel/ea-php70/root/usr/bin/php /home/proiecto/new.foo.ro/bin/magento cron:run | grep -v "Cron job Magento - by schedule" >> /home/proiecto/new.foo.ro/var/log/magento.cron.log > /dev/null 2>&1

SHELL="/usr/local/cpanel/bin/jailshell"
* * * * * /opt/cpanel/ea-php70/root/usr/bin/php /home/proiecto/new.foo.ro/update/cron.php >> /home/proiecto/new.foo.ro/var/log/update.cron.log > /dev/null 2>&1

SHELL="/usr/local/cpanel/bin/jailshell"
* * * * * /opt/cpanel/ea-php70/root/usr/bin/php /home/proiecto/new.foo.ro/bin/magento setup:cron:run >> php /home/proiecto/new.foo.ro/var/log/setup.cron.log > /dev/null 2>&1

But this : 

ls -al foo/var/.setup_cronjob_status

returns :

ls: cannot access new.foo.ro/var/.setup_cronjob_status: No such file or directory

Any ideas?

 

I think is this error on cron jobs:

  [Symfony\Component\Console\Exception\RuntimeException]  
  Too many arguments, expected arguments "command".       
                                                          
setup:cron:run [--magento-init-params MAGENTO-INIT-PARAMS]

I get the above error in an email after the cron jobs run. 

Thank you!

 

Re: Error while updating Magento 2.2.1

OK!

So the problem was

| grep -v "Ran jobs by schedule" >> <magento install dir>/var/log/magento.cron.log
>> <magento install dir>/var/log/update.cron.log
>> <magento install dir>/var/log/setup.cron.log

This...

As it is suggested on the dev forums

http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html

 

Cheers!