Update to nextcloud 20.0 didn't work fine

I updated from Nextcloud 19 to version 20 yesterday. That should have basically worked, but unfortunately the configuration was not adopted and I am now asked for an administrator account, data directory, database user, etc. The config.php of version 19 is still available!

Can someone help me there please?

Thank you in advance.

greetings
Helmut

This data should be originaly come from UCS ! I don’t know how to get it !

Hi @zabranah
you are right.
Did you have a look at /var/log/univention/appcenter.log for what exactly went wrong during the update?

Best, Bernd

Hello, Bernd,

sorry but the newest information in the appcenter.log are from 22.11.2020. In the Admin-Diary there is a notice

Admin Diary: APP_UPGRADE_FAILURE Alle Einträge im Kontext d46d880d-d2e8-48e9-b764-f4eee4a92f1d Die Aktualisierung von Nextcloud Hub 19.0.4-0 schlug fehl. Fehler 417 Administrator auf ucs 24.11.20, 20:20

Is that a hint for you?

Thanks for your help.

greetings helmut

Hi Helmut,

not really…

  • you know what version of the app is running?
  • did you try to upgrade again?
  • It would be helpful to know why the app upgrade failed. Or at least at what point…

It depends on the setup - but sometimes new installs are easier to make than repairs…? I would really search the logs for the time the upgrade went wrong. It is from the infos here not clear to me in what state your installation is.

Best, Bernd

The server runs under UCS 4.4-6 errata 829. Nextcloud runs as docker-image as Nextcloud Hub 20.0.2-0.

I now searched in other logs but didn’t find “nextcloud” or “docker” in any of them.

As you see in the screenshot in the first message, i can start nextcloud in the browser, but there is not the right configuration.

Helmut

  • can you check the status of the nextcloud join-script on the server?
  • all the necessary information for the database should be in your config.php
  • look around for a user nc_admin and the password for this user /var/lib/univention-appcenter/apps/nextcloud/data/integration/admin.secret.

Hello, Bernd,

the join-script for docker and nextcloud is documented as OK (“erfolgreich”).

I also tried to login with the data of the config.php and the admin.secret and got the message “The user is invalid because files for this user already exist”. My input was the “nc_admin” and the password from admin.secret.

Thanks a lot.

Hm, at this point I would search the nextcloud help for the error. If it happened before and the solutions they’ve found…

Did you change the config.php at some point? Can you get into the docker univention-app shell nextcloud and check why the config.php didn‘t load?
What is the output of univention-app info?

No, I never touched the config.php. The last updates were finished without errors.

The output of univention-app info shows UCS: 4.4-6 errata829 Installed: admindiary-backend=1.0 admindiary-frontend=1.0 cups=2.2.1 dhcp-server=12.0 fetchmail=6.3.26 kopano-core=8.7.1.0-1 kopano-webapp=3.5.14.2539-2 kvm=2.8 letsencrypt=1.2.2-8 nextcloud=20.0.2-0 samba4=4.10 uvmm=7.0 z-push-kopano=2.4.5 4.3/dudle=1.2.0-1 Upgradable:.

Yes, i can get into the docker container of nextcloud. Where do you think that i can find why the config.php didn’t load?

You can check the updater.log and nextcloud.log in
/var/lib/univention-appcenter/apps/nextcloud/data/nextcloud-data

The config.php can be found inside the docker-container in the folder var/www/html/config/

Sorry, it took a little longer!

In the LOG files I couldn’t find any entries from the corresponding date. Have now tried to install VIM in order to edit the config.php manually and got an error message that he could not access the relevant files. Then I put a PING on 8.8.8.8, which also failed. Could it be, as I suspect, that the data transfer somehow failed as a result? What can I do to fix this error?

I would then inspect the docker network with:

docker network

Usage:  docker network COMMAND

Manage networks

Commands:
  connect     Connect a container to a network
  create      Create a network
  disconnect  Disconnect a container from a network
  inspect     Display detailed information on one or more networks
  ls          List networks
  prune       Remove all unused networks
  rm          Remove one or more networks

Run 'docker network COMMAND --help' for more information on a command.

starting with: 
docker network ls

If you can’t get anywhere from inside the container, then nextcloud also can’t connect to the database on the host.
You can see the config.php from /var/lib/univention-appcenter/apps/nextcloud/data/integration/config/config.php on the host. Be careful with the file-rights when you need to edit it. It should belong to www-data:www-data

Best, Bernd

I uninstalled Nextcloud again and reinstalled it from the command line. You can then see all error messages on the screen:

Updating certificates in /etc/ssl/certs...
Username is invalid because files already exist for this user
Nextcloud is not installed - only a limited number of commands are available
Nextcloud is not installed - only a limited number of commands are available
  - installed: false
  - version: 20.0.2.2
  - versionstring: 20.0.2
  - edition:
Nextcloud is not installed - only a limited number of commands are available


 Command "app:list" is not defined.


 Do you want to run "app:check-code" instead?  (yes/no) [no]:
 >

  Command "upgrade" is not defined.


The upgrade log is written to /var/log/nextcloud-upgrade_20_12_10.log within the nextcloud container
Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.


Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.


Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.


Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.


Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.


Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.


Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.


Nextcloud is not installed - only a limited number of commands are available


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


Nextcloud is not installed - only a limited number of commands are available


 Command "app:enable" is not defined.


 Do you want to run "app:check-code" instead?  (yes/no) [no]:
 > Nextcloud is not installed - only a limited number of commands are available


  Command "app:install" is not defined.

  Did you mean one of these?
      app:check-code
      maintenance:install


Nextcloud is not installed - only a limited number of commands are available


 Command "app:disable" is not defined.


 Do you want to run "app:check-code" instead?  (yes/no) [no]:
 > Nextcloud is not installed - only a limited number of commands are available


 Command "app:enable" is not defined.


 Do you want to run "app:check-code" instead?  (yes/no) [no]:
 > Nextcloud is not installed - only a limited number of commands are available


 Command "app:enable" is not defined.


 Do you want to run "app:check-code" instead?  (yes/no) [no]:
 > Nextcloud is not installed - only a limited number of commands are available


 Command "app:enable" is not defined.


 Do you want to run "app:check-code" instead?  (yes/no) [no]:
 > Nextcloud is not installed - only a limited number of commands are available
enabling Talk... Nextcloud is not installed - only a limited number of commands are available


 Command "app:enable" is not defined.


 Do you want to run "app:check-code" instead?  (yes/no) [no]:
 > Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.


Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.


Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.


Nextcloud is not installed - only a limited number of commands are available


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


Nextcloud is not installed - only a limited number of commands are available


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


Nextcloud is not installed - only a limited number of commands are available


 Command "app:update" is not defined.


 Do you want to run "app:check-code" instead?  (yes/no) [no]:
 > Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "maintenance:update" namespace.

  Did you mean this?
      maintenance


Executing interface restore_data_after_setup for nextcloud
Copying App Center's restore_data_after_setup to container's /usr/share/univention-docker-container-mode/restore_data_after_setup_custom
Configuring nextcloud=20.0.2-0
Executing interface configure for nextcloud
No interface defined
updating certificates for nextcloud=20.0.2-0
Uninstalling /usr/lib/univention-install/51nextcloud-uninstall.uinst
Installing join script /var/cache/univention-appcenter/appcenter.software-univention.de/4.4/nextcloud_20201119211747.inst
univention-run-join-scripts: runs all join scripts existing on local computer.
copyright (c) 2001-2020 Univention GmbH, Germany

Somehow the installation stumbles over existing data of a user. I assume that this then results in the incorrect installation?

I think that with these messages the error is more obvious than with the previous imprecise information on my part. I could have thought of it before.

On the Nextcloud login page I see the empty mask inserted in the first post. As I get the login page in the browser, I think there should be a network connection. Ping to 8.8.8.8 can’t be done because the command is not found.

Thanks and best wishes
Helmut

Just as I’ve said - you will find solutions in the nextcloud-help forum. At least I think so as a short search pointed to docker versions that had similar problems.

I would try to delete the folders under /var/lib/univention-appcenter/apps/nextcloud after a deinstall and try again.

Maybe you have to delete the database (postgresql) too?

If you already have data - of course save the files and db.

Best, Bernd

Hello, Bernd, I have now backed up all the data, deleted the entire Nextcloud installation including the Docker image, UCS variables, the specified folders and the database entries. The reinstallation has now been completed, but the join script is not executed properly (not even after restarting the server).

These are the corresponding entries in the LOG file:

`RUNNING 50nextcloud.inst
2020-12-13 11:09:52.047130977+01:00 (in joinscript_init)
Object exists: cn=services,cn=univention,dc=zabrana,dc=local
Object created: cn=Nextcloud Hub,cn=services,cn=univention,dc=zabrana,dc=local
Object modified: cn=ucs,cn=dc,cn=computers,dc=zabrana,dc=local
Create nextcloud/ucs/modifyUsersFilter
Create nextcloud/ucs/userEnabled
Create nextcloud/ucs/userQuota
Create nextcloud/ucs/debug
Create nextcloud/ldap/cacheTTL
Create nextcloud/ldap/homeFolderAttribute
Create nextcloud/ldap/userSearchAttributes
Create nextcloud/ldap/userDisplayName
Create nextcloud/ldap/groupDisplayName
Create nextcloud/ldap/base
Create nextcloud/ldap/baseUsers
Create nextcloud/ldap/baseGroups
Create nextcloud/ldap/filterLogin
Create nextcloud/ldap/filterUsers
Create nextcloud/ldap/filterGroups
Module: zarafa-cfg
Module: kopano-cfg
Object exists: cn=ldapschema,cn=univention,dc=zabrana,dc=local
INFO: No change of core data of object nextcloud.
No modification: cn=nextcloud,cn=ldapschema,cn=univention,dc=zabrana,dc=local

Waiting for activation of the extension object nextcloud: OK
Object created: cn=nextcloud,cn=custom attributes,cn=univention,dc=zabrana,dc=local
Object created: cn=nextcloudUserEnabled,cn=nextcloud,cn=custom attributes,cn=univention,dc=zabrana,dc=local
Object created: cn=nextcloudUserQuota,cn=nextcloud,cn=custom attributes,cn=univention,dc=zabrana,dc=local
Object created: cn=nextcloudGroupEnabled,cn=nextcloud,cn=custom attributes,cn=univention,dc=zabrana,dc=local
Object exists: SAMLServiceProviderIdentifier=https://ucs.zabrana.local/nextcloud/apps/user_saml/saml/metadata,cn=saml-serviceprovider,cn=univention,dc=zabrana,dc=local
Config value idp-x509cert for app user_saml set to -----BEGIN CERTIFICATE-----
MIIEszCCA5uxxx…==
-----END CERTIFICATE-----
Config value type for app user_saml set to saml
Config value general-require_provisioned_account for app user_saml set to 1
Config value general-allow_multiple_user_back_ends for app user_saml set to 1
Config value general-uid_mapping for app user_saml set to uid
Config value idp-singleLogoutService.url for app user_saml set to https://ucs-sso.zabrana.local/simplesamlphp/saml2/idp/SingleLogoutService.php
Config value idp-singleSignOnService.url for app user_saml set to https://ucs-sso.zabrana.local/simplesamlphp/saml2/idp/SSOService.php
Config value idp-entityId for app user_saml set to https://ucs-sso.zabrana.local/simplesamlphp/saml2/idp/metadata.php
curl failed with error 51
Failed to request an LDAP config id from Nextcloud
EXITCODE=1
3f292d40-a799-4b24-94ce-9d3707805d9e`

Unfortunately, that doesn’t say too much to me. Do you have a tip for me?

Thanks Helmut

Did you configure SAML at some point for nextcloud?

I’m not sure if this is just the standard by now, (my installations are much older and I had to configure it by hand)

Are you working with SAML for other apps?

curl failed with error 51

seams to be a certificate validation error. So maybe there is a cert from the old installation?

Best, Bernd

No I’m not working with SAML in any app. And I don’t think that I’ve configured SAML during the installation.

Greetings Helmut

Mastodon