Upgrade to 17.0.1 failed - UI and CLI not working anymore

Hello,

On of my NC server is not working anymore after an upgrade from 16.0.5.1 to 17.0.1
The web is stuck within Maintenance mode, and from the CLI I get :

sudo -u www-data /usr/bin/php /var/www/nextcloud/updater/updater.phar
Nextcloud Updater - version: v16.0.3-3-ga0c2b25 dirty

Current version is 17.0.1.

Update to Nextcloud 17.0.1 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-17.0.1.zip
Open changelog β†—

Steps that will be executed:
[βœ”] Check for expected files
[βœ”] Check for write permissions
[βœ”] Create backup
[βœ”] Downloading
[βœ”] Verify integrity
[βœ”] Extracting
[βœ”] Enable maintenance mode
[βœ”] Replace entry points
[βœ”] Delete old files
[βœ”] Move new files in place
[βœ”] Done

Continue update? [y/N] y

Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[βœ”] Check for expected files
[βœ”] Check for write permissions
[βœ”] Create backup
[βœ”] Downloading
[βœ”] Verify integrity
[βœ”] Extracting
[βœ”] Enable maintenance mode
[βœ”] Replace entry points
[βœ”] Delete old files
[βœ”] Move new files in place
[βœ”] Done

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] 

Parse error: syntax error, unexpected T_CLASS, expecting T_STRING or T_VARIABLE or '$' in /var/www/nextcloud/console.php on line 94

Keep maintenance mode active? [y/N] 

Parse error: syntax error, unexpected T_CLASS, expecting T_STRING or T_VARIABLE or '$' in /var/www/nextcloud/console.php on line 94

Maintenance mode is disabled

Then not only updater is not working anymore, but occ as well, with the same PHP error in console.php :

 sudo -u www-data php /var/www/nextcloud/occ 

Parse error: syntax error, unexpected T_CLASS, expecting T_STRING or T_VARIABLE or '$' in /var/www/nextcloud/console.php on line 94
#

Thanks in advance for your help !

1 Like

Anything special at line 94 in console.php? I would look at the file and see if it matches the code in the github repository.

Thanks for the suggestion !
I’ve just check the sum of this file compare to the one in the github repo, they are the same.

If it says the syntax is an issue maybe the php version doesn’t match supported versions?

I see you are updating from 16.0.5. I think it’s recommended updating from 16.0.6. I had to upgrade php for nc 16.0.6.

it is running on Ubuntu server 18.04, with default php 7.2 packages, served by Apache 2.4. I have other servers set up exactly the same, which are running fine and has been upgraded to 7.0.1.

I’ve read somewhere else that the PHP memory_limit should be set to 512M, which I’ve done as well.

Thanks ! Is there a way to downgrade to the backuped version ?

never tried it.

I’ve finally restored last working backup (both database and /var/www/nextcloud)
Also I’ll turn update channel to Production and will make sure that we are on the latest minor before upgrading to major.
Thanks for your help !

good luck! It would be nice if you could let us know if taking the minor update first solves the problem.