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

Tried update -- Result: Sorry but something went wrong. #2233

Closed
HTGuru opened this issue Feb 11, 2022 · 10 comments
Closed

Tried update -- Result: Sorry but something went wrong. #2233

HTGuru opened this issue Feb 11, 2022 · 10 comments
Labels
bug Support Please visit https://help.nextcloud.com or https://shop.hanssonit.se/product-category/support/

Comments

@HTGuru
Copy link

HTGuru commented Feb 11, 2022

Steps To Reproduce

  1. Go to 'ssh'
  2. Enter 'sudo bash /var/scripts/update.sh'

Expected Result

Update succeeds

Actual Result

Update fails

Screenshots, Videos, or Pastebins

https://0bin.net/paste/xqGpqt1O#1ll4pzyO2pcncCOAgfiEffW3Xoj-lUQoJFsDh0psQ0Z

Additional Context

Server states on homepage: This Nextcloud instance is currently in maintenance mode

Build Version

21

Environment

By downloading the VM

Environment Details

Ubuntu 20.04.1
PHP7.4

@HTGuru HTGuru added the bug label Feb 11, 2022
@HTGuru
Copy link
Author

HTGuru commented Feb 11, 2022

Also tried:
sudo nano /var/www/nextcloud/config/config.php

changed
'maintenance' => true,
to
'maintenance' => false,

Homepage then says:

Update needed
Please use the command line updater because automatic updating is disabled in the config.php.

Instance is officially broken.

Please see command line log in pastebin.

Help needed.

@HTGuru HTGuru changed the title Sorry but something went wrong. Please report this issue Tried update Result: Sorry but something went wrong. Please report this issue Feb 11, 2022
@HTGuru HTGuru changed the title Tried update Result: Sorry but something went wrong. Please report this issue Tried update -- Result: Sorry but something went wrong. Please report this issue Feb 11, 2022
@HTGuru HTGuru changed the title Tried update -- Result: Sorry but something went wrong. Please report this issue Tried update -- Result: Sorry but something went wrong. Feb 11, 2022
@enoch85
Copy link
Member

enoch85 commented Feb 11, 2022

Hi,

Please run nextcloud_occ upgrade from your CLI (as root).

@enoch85
Copy link
Member

enoch85 commented Feb 11, 2022

There seems to be an issue with LDAP anyway.

@enoch85
Copy link
Member

enoch85 commented Feb 11, 2022

Yup, it's an issue with LDAP: nextcloud/server#30944

Please check that thread on how to solve it.

@enoch85 enoch85 closed this as completed Feb 11, 2022
@enoch85 enoch85 added the Support Please visit https://help.nextcloud.com or https://shop.hanssonit.se/product-category/support/ label Feb 11, 2022
@HTGuru
Copy link
Author

HTGuru commented Feb 11, 2022

Unfortunately the thread did not help, nor the command.

nextcloud_occ upgrade yielded:

root@nextcloud1:~# nextcloud_occ upgrade
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Turned on maintenance mode
Updating database schema
Updated database
Updating <user_ldap> ...
An unhandled exception has been thrown:
Error: Call to undefined method OC\DB\QueryBuilder\QueryBuilder::executeQuery() in /var/www/nextcloud/apps/user_ldap/lib/Migration/GroupMappingMigration.php:56
Stack trace:
#0 /var/www/nextcloud/apps/user_ldap/lib/Migration/Version1130Date20220110154717.php(54): OCA\User_LDAP\Migration\GroupMappingMigration->copyGroupMappingData()
#1 /var/www/nextcloud/lib/private/DB/MigrationService.php(528): OCA\User_LDAP\Migration\Version1130Date20220110154717->preSchemaChange()
#2 /var/www/nextcloud/lib/private/DB/MigrationService.php(426): OC\DB\MigrationService->executeStep()
#3 /var/www/nextcloud/lib/private/legacy/OC_App.php(1012): OC\DB\MigrationService->migrate()
#4 /var/www/nextcloud/lib/private/Updater.php(347): OC_App::updateApp()
#5 /var/www/nextcloud/lib/private/Updater.php(262): OC\Updater->doAppUpgrade()
#6 /var/www/nextcloud/lib/private/Updater.php(134): OC\Updater->doUpgrade()
#7 /var/www/nextcloud/core/Command/Upgrade.php(249): OC\Updater->upgrade()
#8 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute()
#9 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#10 /var/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#11 /var/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#12 /var/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#13 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#14 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#15 {main}root@nextcloud1:~# occ upgrade

Command 'occ' not found, but there are 21 similar ones.

and just occ upgade yeilded:

root@nextcloud1:~# occ upgrade

Command 'occ' not found, but there are 21 similar ones.

@enoch85
Copy link
Member

enoch85 commented Feb 12, 2022

Ok :/

Did you try to patch it?

@HTGuru
Copy link
Author

HTGuru commented Feb 22, 2022

It took a while to get back to this and figure out what patch you were talking about and I finally found:
Fix user_ldap long dn migration on 21 #30947

Patched it and ran nextcloud_occ upgrade again and this time it worked!

I then ran /var/scripts/update.sh again and it seems that NC development has gone so fast that while this bug was preventing upgrade we are now 2 major releases apart and I get told that the scripts won't do it and I should contact you.
SNAG-0540

Here is the console output (seem to be a few more errors in there):

root@nextcloud1:/# nextcloud_occ upgrade
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Updating database schema
Updated database
Updating <user_ldap> ...
Updated <user_ldap> to 1.11.2
Starting code integrity check...
Finished code integrity check
Update successful
Maintenance mode is kept active
Resetting log level
root@nextcloud1:/# exit
logout
ncadmin@nextcloud1:/$ sudo bash /var/scripts/update.sh
Nextcloud is in maintenance mode - no apps have been loaded

Nextcloud is in maintenance mode - no apps have been loaded

Nextcloud is in maintenance mode - no apps have been loaded

Nextcloud is in maintenance mode - no apps have been loaded

Posting notification to users that are admins, this might take a while...
Nextcloud is in maintenance mode - no apps have been loaded

Nextcloud is in maintenance mode - no apps have been loaded

Nextcloud is in maintenance mode - no apps have been loaded

Posting 'Update script started!' to: Jeff
Nextcloud is in maintenance mode - no apps have been loaded



  There are no commands defined in the "notification" namespace.


Fetching latest packages with apt...
[⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻]
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Updating Netdata...
Tue 22 Feb 2022 04:21:33 PM EST : INFO:  Checking if a newer version of the updater script is available.
Tue 22 Feb 2022 04:21:34 PM EST : INFO:  Running on a terminal - (this script also supports running headless from crontab)
Tue 22 Feb 2022 04:21:34 PM EST : INFO:  Current Version: 00103300100000
Tue 22 Feb 2022 04:21:34 PM EST : INFO:  Latest Version: 00103300100000
Tue 22 Feb 2022 04:21:34 PM EST : INFO:  Newest version (current=00103300100000 >= latest=00103300100000) is already installed
Trying to upgrade the Redis PECL extension...
Getting current PHP-version...
PHPVER=7.4
Updating channel "pecl.php.net"
Channel "pecl.php.net" is up to date

Notice: Trying to access array offset on value of type bool in PEAR/REST.php on line 187
PHP Notice:  Trying to access array offset on value of type bool in /usr/share/php/PEAR/REST.php on line 187

Notice: Trying to access array offset on value of type bool in PEAR/REST.php on line 187
PHP Notice:  Trying to access array offset on value of type bool in /usr/share/php/PEAR/REST.php on line 187

Notice: Trying to access array offset on value of type bool in PEAR/REST.php on line 187
PHP Notice:  Trying to access array offset on value of type bool in /usr/share/php/PEAR/REST.php on line 187

Notice: Trying to access array offset on value of type bool in PEAR/REST.php on line 187
PHP Notice:  Trying to access array offset on value of type bool in /usr/share/php/PEAR/REST.php on line 187
Nothing to upgrade
dpkg-query: no packages found matching php-acpu
dpkg-query: no packages found matching php7.4-apcu
Trying to upgrade igbinary, and smbclient...
Nothing to upgrade
Nothing to upgrade
Updating Adminer...
Total reclaimed space: 0B
Total reclaimed space: 0B
Total reclaimed space: 0B
Unable to find image 'containrrr/watchtower:latest' locally
latest: Pulling from containrrr/watchtower
1045b2f97fda: Pull complete
35a104a262d3: Pull complete
1a0671483169: Pull complete
Digest: sha256:bbf9794a691b59ed2ed3089fec53844f14ada249ee5e372ff0e595b73f4e9ab3
Status: Downloaded newer image for containrrr/watchtower:latest
time="2022-02-22T21:21:45Z" level=info msg="Watchtower 1.4.0"
time="2022-02-22T21:21:45Z" level=info msg="Using no notifications"
time="2022-02-22T21:21:45Z" level=info msg="Only checking containers with name \"fts_esror\""
time="2022-02-22T21:21:45Z" level=info msg="Running a one time update."
time="2022-02-22T21:21:45Z" level=info msg="Session done" Failed=0 Scanned=1 Updated=0 notify=no
time="2022-02-22T21:21:45Z" level=info msg="Waiting for the notification goroutine to finish" notify=no
Full Text Search docker image just got updated!
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-100-generic
Found initrd image: /boot/initrd.img-5.4.0-100-generic
Found linux image: /boot/vmlinuz-5.4.0-99-generic
Found initrd image: /boot/initrd.img-5.4.0-99-generic
done
Maintenance mode disabled
Trying to automatically update all Nextcloud apps...
Your apps are already up to date!
Shutdown scheduled for Tue 2022-02-22 16:24:09 EST, use 'shutdown -c' to cancel.

So the good news is that after the reboot the instance came back up and is working! Apparently however, the bad news is the script will not upgrade between 2 major versions. So is my only option to keep it clean now and still get upgraded to 23 without taking a chance on messing it up myself to purchase 2 of these and contract you to do it?

Upgrade between major ownCloud/Nextcloud versions

...or is it possible to add additional syntax to the script to do only the 21 to 22 first, and then again from 22 to 23 with the standard script?

@enoch85
Copy link
Member

enoch85 commented Feb 24, 2022

Yeah, development is fast :)

You can get support in the shop as it says. I'll send you an invite for tomorrow or next week.

@HTGuru
Copy link
Author

HTGuru commented Feb 24, 2022

Ok thanks.

I'll wait for the invite.

@enoch85
Copy link
Member

enoch85 commented Feb 24, 2022

@HTGuru Have a look at this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Support Please visit https://help.nextcloud.com or https://shop.hanssonit.se/product-category/support/
Projects
None yet
Development

No branches or pull requests

2 participants