There is a problem with Nextcloud, not possible to update/upgrade/reinstall

of course, all log are here:
1/ NS 7.7 -> 7.8 -> 7.9
2/ From “full” reinstall of Nextcloud
3/ A second time the “full” reinstall of Nextcloud

Please answer:

All those messages like Nextcloud is not installed - only a limited number of commands are available followed by Command "xxxxxxx:yyyy" is not defined. or by There are no commands defined in the "xxxxxx" namespace can happen when the config.php is inaccessible, malformed or non-existent (but there could be other reasons too).

Those messages are generated after running occ commands during installation/update.

excerpt from log
Jul 21 19:25:32 server esmith::event[23967]: Nextcloud is not installed - only a limited number of commands are available
Jul 21 19:25:33 server esmith::event[23967]: Command "maintenance:mode" is not defined.
Jul 21 19:25:33 server esmith::event[23967]: Do you want to run "maintenance:install" instead?  (yes/no) [no]:
Jul 21 19:25:38 server esmith::event[23967]: > Nextcloud is not installed - only a limited number of commands are available
Jul 21 19:25:38 server esmith::event[23967]:  Command "upgrade" is not defined.

Jul 21 19:26:25 server esmith::event[23967]:  There are no commands defined in the "db" namespace.
Jul 21 19:26:26 server esmith::event[23967]: Action: /etc/e-smith/events/nethserver-nextcloud-update/S20nethserver-nextcloud-conf FAILED: 1 [114.465153]

Jul 21 19:26:29 server esmith::event[23967]: Nextcloud is not installed - only a limited number of commands are available
Jul 21 19:26:29 server esmith::event[23967]:  There are no commands defined in the "config:system" namespace.

Jul 21 19:26:34 server esmith::event[23967]: Nextcloud is not installed - only a limited number of commands are available
Jul 21 19:26:34 server esmith::event[23967]:  There are no commands defined in the "background" namespace.
1 Like

After the full reinstall of Nextcloud on a NS 7.9:

But the main problem has been after the upgrade from 7.8 -> 7.9:

Moderator edit:
After full reinstall:

“Main problem” 1:


“Main problem” 2:

If you’re going to use images, please include them directly in your post rather than relying on external image hosting sites. See edits above.

1 Like

As regards the “Main Problem”:

Did you try to click the “Start update” button? If it does not work, just use command line:

occ upgrade

See the wiki for more details.

I think the “Reinstall” issue comes from the removal of the /usr/share/nextcloud dir that seems to leave an empty config.php after reinstall of nethserver-nextcloud which leads to the errors @dnutan pointed out.

I need to check the reinstall again…and maybe update the documentation.

3 posts were split to a new topic: Nextcloud: disable the web-based upgrader

I could reproduce the reinstall issue and corrected the procedure.
We need to delete the Mariadb Nextcloud DB before removing nethserver-nextcloud. After removal the DB isn’t easily accessible anymore.
When the DB still exists, Nextcloud is not reconfigured which leads to the error.

@Neustradamus would you like to test the reinstall? If it works we can update the documentation.

1 Like

After “Start update”:

I have never used it.

The page is https://IP/nextcloud after upgrade NS 7.8 -> 7.9.

Check out this wiki page to find an explanation of the problem and a way how to upgrade step by step.
Nextcloud needs to be regularly updated.

I have done and it works!
Thanks to have solved this NethServer Nextcloud full-reinstall.

Have you found the problem at upgrade from 7.8 to 7.9?

1 Like

Yes, the update problem is known. Details and solution are in the wiki:

https://wiki.nethserver.org/doku.php?id=howto:nextcloud#exceptionupdates_between_multiple_major_versions_are_unsupported

Can you create an update of the NS package with the solution?

Note that Nextcloud 22 has been released and I think soon in NethServer.
@giacomo knows it.

No, the problem is that you did not update Nethserver/Nextcloud regularly.

The solution is in the wiki link I provided.

1 Like

The problem is that “simple” people will have several problems without a real solution.

I’m sorry, it’s a Nextcloud issue. Updates between multiple major versions are not supported.

2 Likes

It is not possible to create a script if current version is 14, do 15, 16…

Honestly, I think it’s too much effort for a case that does hardly ever occur, the script needs to be maintained to respect new versions.
I recommend to go through the wiki article once to repair your Nextcloud and update regularly.

Edit:

Which Nextcloud version is installed? You can check with

grep "'version'" /usr/share/nextcloud/config/config.php

1 Like

I have:

[root@server ~]# rpm -qa | grep nextcloud
nethserver-nextcloud-1.17.1-1.ns7.noarch
[root@server ~]# grep "'version'" /usr/share/nextcloud/config/config.php
  'version' => '19.0.3.1',
[root@server ~]# rpm -qa | grep nextcloud
nethserver-nextcloud-1.17.1-1.ns7.noarch
[root@server ~]#

With 'upgrade.disable-web' => true, in the config.php, I have: