Owncloud 10.1.1-2019-04-23 - Cannot upgrade - RESOLVED

Hi,

App centre said there was an update for owncloud 10.1.1-2019-04-23. I applied it and then it failed, and uninstalled itself.

P reconfiguring container 5a383336d63d0d57d6b62053bfd2d352b0da45d0338a8e5c6f26face8680da45
Starting redis …  
Starting owncloud …  
tarting owncloud … done
Running command: docker cp /etc/owncloud.secret 5a383336d63d0d57d6b62053bfd2d352b0da45d0338a8e5c6f26face8680da45:/etc/owncloud.secret
Configuring 4.3/owncloud=10.1.1-2019-04-23
Module: autostart
ucr cannot be found, falling back to changing the database file directly
Executing interface restore_data_before_setup for owncloud
No interface defined
Executing interface setup for owncloud
Copying App Center’s setup to container’s /usr/share/univention-docker-container-mode/setup_custom
Setup script failed!
Aborting…
Going to remove ownCloud (10.1.1-2019-04-23)

Help! Running UCS 4.4-0 errata109

Is there any additional information in the appcenter logfile /var/log/univention/appcenter.log
Please post anything regarding the app update from that file. Is there anything manually configured in your app setup? Manually edited config files, additional owncloud apps, …?

The relevant excerpt :

25392 docker                           19-05-20 11:26:56 [   DEBUG]: Calling in /var/lib/univention-appcenter/apps/owncloud/compose:
25392 docker                           19-05-20 11:26:56 [   DEBUG]: Calling docker-compose -p owncloud start
25392 docker                           19-05-20 11:26:56 [ WARNING]: Starting redis …
25392 docker                           19-05-20 11:26:56 [ WARNING]: Starting owncloud …
25392 docker                           19-05-20 11:26:56 [ WARNING]:   ^MStarting redis … done^M   ^MStarting owncloud … done^M
25392 actions.start.progress           19-05-20 11:26:57 [   DEBUG]: 100
25392 docker.base.container.0351       19-05-20 11:27:00 [   DEBUG]: Using container.0351 for container 0351be66968f0a0f1d4c8bd2ee0b831321ffa866f320c925da6dca6e4429e561
25392 docker.base.container.0351       19-05-20 11:27:00 [   DEBUG]: Calling docker exec -u root 0351be66968f0a0f1d4c8bd2ee0b831321ffa866f320c925da6dca6e4429e561 rm -f /etc/timezone /etc/localtime
25392 docker.base                      19-05-20 11:27:00 [    INFO]: Running command: docker cp /etc/timezone 0351be66968f0a0f1d4c8bd2ee0b831321ffa866f320c925da6dca6e4429e561:/etc/timezone
25392 docker.base                      19-05-20 11:27:00 [    INFO]: Running command: docker cp /etc/localtime 0351be66968f0a0f1d4c8bd2ee0b831321ffa866f320c925da6dca6e4429e561:/etc/localtime
25392 actions.upgrade                  19-05-20 11:27:01 [    INFO]: Running command: docker cp /etc/owncloud.secret 0351be66968f0a0f1d4c8bd2ee0b831321ffa866f320c925da6dca6e4429e561:/etc/owncloud.secret
25392 actions.configure                19-05-20 11:27:02 [   DEBUG]: Calling configure
25392 actions.configure.progress       19-05-20 11:27:02 [   DEBUG]: 0
25392 actions.configure                19-05-20 11:27:02 [    INFO]: Configuring 4.3/owncloud=10.1.1-2019-04-23
25392 settings                         19-05-20 11:27:02 [    INFO]: Setting OWNCLOUD_DOMAIN to ‘localhost’
25392 settings                         19-05-20 11:27:02 [    INFO]: Setting OWNCLOUD_SUB_URL to ‘/owncloud’
25392 settings                         19-05-20 11:27:02 [    INFO]: Setting OWNCLOUD_DEFAULT_LANGUAGE to ‘en’
25392 settings                         19-05-20 11:27:02 [    INFO]: Setting OWNCLOUD_LOST_PASSWORD_LINK to ‘true’
25392 settings                         19-05-20 11:27:02 [    INFO]: Setting OWNCLOUD_LOG_LEVEL to ‘3’
25392 docker.configure.container.0351  19-05-20 11:27:02 [   DEBUG]: Using container.0351 for container 0351be66968f0a0f1d4c8bd2ee0b831321ffa866f320c925da6dca6e4429e561
25392 docker.configure.container.0351  19-05-20 11:27:02 [   DEBUG]: Calling docker exec -u root 0351be66968f0a0f1d4c8bd2ee0b831321ffa866f320c925da6dca6e4429e561 which ucr
25392 actions.configure                19-05-20 11:27:02 [ WARNING]: ucr cannot be found, falling back to changing the database file directly
25392 actions.configure.progress       19-05-20 11:27:02 [   DEBUG]: 100
25392 actions.upgrade.progress         19-05-20 11:27:02 [   DEBUG]: 50
25392 actions.upgrade                  19-05-20 11:27:02 [    INFO]: Executing interface restore_data_before_setup for owncloud
25392 actions.upgrade                  19-05-20 11:27:02 [    INFO]: No interface defined
25392 actions.upgrade                  19-05-20 11:27:02 [    INFO]: Executing interface setup for owncloud
25392 actions.upgrade                  19-05-20 11:27:02 [    INFO]: Copying App Center’s setup to container’s /usr/share/univention-docker-container-mode/setup_custom
25392 actions.upgrade.container.0351   19-05-20 11:27:02 [   DEBUG]: Using container.0351 for container 0351be66968f0a0f1d4c8bd2ee0b831321ffa866f320c925da6dca6e4429e561
25392 actions.upgrade.container.0351   19-05-20 11:27:02 [   DEBUG]: Calling docker exec -u root 0351be66968f0a0f1d4c8bd2ee0b831321ffa866f320c925da6dca6e4429e561 /usr/share/univention-docker-container-mode/setup_custom --username Administrator --app owncloud --error-fi$
25392 actions.upgrade.container.0351   19-05-20 11:27:09 [    INFO]: [02.DOCKER_SETUP] Enable user_ldap app
25392 actions.upgrade.container.0351   19-05-20 11:27:10 [    INFO]: .
25392 actions.upgrade.container.0351   19-05-20 11:27:10 [    INFO]: [02.DOCKER_SETUP] user_ldap enabled successfully! after 1 tries
25392 actions.upgrade.container.0351   19-05-20 11:27:10 [    INFO]: [02.DOCKER_SETUP] Waiting for LDAP app testing…
25392 actions.upgrade.container.0351   19-05-20 11:27:12 [    INFO]: …
25392 packages                         19-05-20 11:27:13 [   DEBUG]: Releasing LOCK
25392 actions.upgrade                  19-05-20 11:27:13 [CRITICAL]: Setup script failed!
25392 actions.upgrade                  19-05-20 11:27:13 [ WARNING]: Aborting…
25392 actions.remove                   19-05-20 11:27:13 [   DEBUG]: Calling remove

If the execution of the setup script inside the docker container just stopped, the container itself may have been stopped.
There probably is no current owncloud container after the update failed, you can check for one with docker ps -a
If there is one, try starting it with docker start <containername> otherwise, try reinstalling the app. If that does not work either, install the app with univention-app install owncloud --do-not-revert and check the owncloud docker container logs with docker logs <containername>

Getting closer - logs in the docker show :slight_smile:

“SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘owncloud.oc_appconfig’ doesn’t exist in /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:53”

…and

Upgrading server database…
An unhandled exception has been thrown:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘owncloud.oc_appconfig’ doesn’t exist in /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:104

Is the actual owncloud database still available? You can connect to MariaDB on UCS via e.g. mysql -uroot -p$(</etc/mysql.secret), then something like use owncloud; show tables;

If there is something missing, maybe there is a hint in the appcenter.log while the app update was happening? I am still trying to figure out what went wrong on your UCS system. I am repeating an earlier question: Is there anything manually configured in your app setup? Manually edited config files, additional owncloud apps, …?

You may be able to restore the database. The owncloud app creates a database backup on app updates, which can be found at /var/lib/univention-appcenter/apps/owncloud/data/backup/

Hi,

The owncloud db is there - but there are no tables. I’ll restore the backup. Fingers crossed. There’s no manual stuff going on with my owncloud by the way.

Backup restored but because the container is broken it’s not letting me upgrade/remove/install

I used the --do-not-revert flag. How do I fix this now :slight_smile:

Had the same issue but chickened out by restoring VirtualBox snapshot. Guess I will stay on current version till issue is fixed. To be clear, I hit the “upgrade” button in the app center. Not sure this is the same or the only way to do the update…:smirk:

Hi,

That’s what I did too - never failed before. Glad I’m not the only one though.

So, you have the owncloud app installed, please verify this via univention-app info, and the database is restored. Which error do see in the docker logs when you try to start the app containers? A quick way to do so is service docker-app-owncloud start

EDIT If that does not work, you should be able to uninstall the app with univention-app remove --do-not-backup owncloud

Can’t install :slight_smile:
8370 actions.install.container.8f8c   19-05-21 10:33:18 [   DEBUG]: Using container.8f8c for container 8f8c90832127e9034496bacadd489e142844c963f166c10dc30f4ca154d91071
 8370 actions.install.container.8f8c   19-05-21 10:33:18 [   DEBUG]: Calling docker exec -u root 8f8c90832127e9034496bacadd489e142844c963f166c10dc30f4ca154d91071 /usr/share/univention-docker-container-mode/setup_custom --username Administrator --app owncloud --error-fil
e /var/univention/tmp/tmpyUYc3F --password-file /var/univention/tmp/tmpUN1qZH --app-version 10.1.1-2019-04-23
 8370 packages                         19-05-21 10:33:20 [   DEBUG]: Releasing LOCK
 8370 actions.install                  19-05-21 10:33:20 [CRITICAL]: Setup script failed!
 8370 actions.install                  19-05-21 10:33:20 [ WARNING]: Aborting…
 8370 actions.remove                   19-05-21 10:33:20 [   DEBUG]: Calling remove

Hi,

My issue is now resolved. Thanks for all the pointers. It turns out that zimbradrive (which we are not using!) was enabled and this breaks the update. Anyone in the same boat - if you can quickly get into the shell on the docker - enter occ app:disable zimbradrive

Then re-install. All fun and games!?!

Hi Neal,
I never used Zimbra. How and where did you notice it was enabled? And (shame on me) how do you get into the shell on the docker? Is it different than the main command line?
Thanks
Claudio

Hi Neil,

as advised I tried to disable zimbra drive upfront the update:

root@owncl-54633860: /var/www/owncloud # occ app:disable zimbradrive
**No such app enabled: zimbradrive**

As zimbradrive wasn’t enabled on my system, it is safe to apply the update - right?

thx and best regards
Thomas

@Claudio: The docker shell for owncloud you can enter by typing “univention-app shell owncloud”.

Thanks @tpfann. I do not have zimbradrive at all. Nevertheless, I looked at the list of apps (below). Any one you think might be breaking the update for me?

Thanks!

Claudio

root@owncl-97430963: /var/www/owncloud # occ app:list
Enabled:

  • bookmarks: 0.10.5
  • calendar: 1.6.2
  • comments: 0.3.0
  • configreport: 0.1.1
  • contacts: 1.5.5
  • dav: 0.4.0
  • federatedfilesharing: 0.3.1
  • federation: 0.1.0
  • files: 1.5.1
  • files_clipboard: 0.7.1
  • files_external: 0.7.1
  • files_sharing: 0.11.0
  • files_trashbin: 0.9.1
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • gallery: 16.1.1
  • market: 0.4.0
  • notes: 2.0.4
  • notifications: 0.3.5
  • passman: 2.1.4
  • provisioning_api: 0.5.0
  • systemtags: 0.3.0
  • tasks: 0.9.7
  • updatenotification: 0.2.1
  • user_ldap: 0.13.0
    Disabled:
  • encryption
  • external
  • onlyoffice
  • richdocuments
  • user_external

I sent the question to a fello user and not staff member. @damrose:

I can not comment on which owncloud app might break the app update, because i don’t know. I am working for Univention, the app is maintained by ownCloud. They know about the issue that certain activated apps may stop the app update and there is a plan to work on this in a future app update.

I know that the apps that come with the default installation do not cause any issues, so i would deactivate all apps you installed manually before starting the update. As always, a backup or snapshot is helpful in case something goes wrong.

Thanks 4 your kind and fast reply.:slightly_smiling_face:

Mastodon