Nexcloud update 13->14 Failed to start LSB

Hello, I have done an update from next cloud 13.0.7 to 14.06. but failed.

Log /var/log/univention/appcenter.log shows just the aborting, but not why.
16

Looked further to

root@fps:~# systemctl status docker-app-nextcloud.service
● docker-app-nextcloud.service - LSB: Start the Container for nextcloud
Loaded: loaded (/etc/init.d/docker-app-nextcloud; generated; vendor preset: enabled)
Active: **failed** (Result: exit-code) since Mon 2019-01-28 13:19:27 CET; 22min ago
Docs: man:systemd-sysv-generator(8)
Process: 4832 ExecStart=/etc/init.d/docker-app-nextcloud start **(code=exited, status=1/FAILURE)**
CPU: 1.094s
Jan 28 13:19:26 fps systemd[1]: Starting LSB: Start the Container for nextcloud...
Jan 28 13:19:27 fps docker-app-nextcloud[4832]: Error: No such object: 57cb3f1c0acecd73401d61e330ea1c6851194414abc2bc41e9f31eec8abf797b
Jan 28 13:19:27 fps docker-app-nextcloud[4832]: Failed to determine container state. Probably it doesn't exist.
Jan 28 13:19:27 fps docker-app-nextcloud[4832]: This script cannot create a container from an image.
Jan 28 13:19:27 fps docker-app-nextcloud[4832]: It can just stop/restart existing containers.
Jan 28 13:19:27 fps systemd[1]: **docker-app-nextcloud.service: Control process exited, code=exited status=1**
Jan 28 13:19:27 fps systemd[1]: **Failed to start LSB: Start the Container for nextcloud.**
Jan 28 13:19:27 fps systemd[1]: **docker-app-nextcloud.service: Unit entered failed state.**
Jan 28 13:19:27 fps systemd[1]: **docker-app-nextcloud.service: Failed with result 'exit-code'.**

Tryed to delete the docker image and do the update again, but the same problems.
Would be great when somebody could help.

Kind redards
Holger Jessen-Thiesen

You need to recreate container. Here is how you may do it with regular way:

  1. remove existing container:

    univention-app remove nextcloud
    
  2. install it again:

    univention-app install nextcloud
    

If you fail for ANY reason, you may create it manually with the line below, but you NEED to change nextc-99999999 with your machine name (in the Domain -> Machines) or via shell:

  1. To find out the CONTAINERID of the nextcloud container execute:

    docker ps
    
  2. To find out the hostname execute:

    docker inspect CONTAINERID|grep nextc-
    
  3. terminate old container:

    docker rm -f CONTAINERID
    
  4. manually create container

    docker create --hostname nextc-99999999 \
      --env-file /var/lib/univention-appcenter/apps/nextcloud/nextcloud.env \
      -p 40000:80/tcp \
      -v /var/lib/univention-appcenter/apps/nextcloud/data:/var/lib/univention-appcenter/apps/nextcloud/data \
      -v /etc/apt/apt.conf.d/80proxy:/etc/apt/apt.conf.d/80proxy:ro \
      -v /var/lib/univention-appcenter/apps/nextcloud/conf:/var/lib/univention-appcenter/apps/nextcloud/conf \
      -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
      --tmpfs /run \
      --tmpfs /run/lock \
      --security-opt seccomp:/etc/docker/seccomp-systemd.json \
      -e container=docker \
      docker.software-univention.de/nextcloud:14.0.6-0 \
      /usr/sbin/entrypoint.sh
    

Being you, I would start from the manual way.

no need to manually create a container if the removal fails (which is most probably the reason because the old container does not exist any longer or something is so broken that it does not start), you can also skip the backup of the old app. e.g. univention-app remove nextcloud --do-not-backup

Hello, thanks for the answer and the detailed description.
I found the machine name in the LDAP directory under computers->memberserver.

The container does not exist anymore since the update attempt yesterday. With docker ps only other containers are displayed. With docker images the old and the new Nextcloud images are displayed.

So I jumped right to create, but no container is created and only one cryptic line is displayed

root@fps:~# docker create --hostname nextc-46867832 \
  --env-file /var/lib/univention-appcenter/apps/nextcloud/nextcloud.env \
  -p 40000:80/tcp \
  -v /var/lib/univention-appcenter/apps/nextcloud/data:/var/lib/univention-appcenter/apps/nextcloud/data \
  -v /etc/apt/apt.conf.d/80proxy:/etc/apt/apt.conf.d/80proxy:ro \
  -v /var/lib/univention-appcenter/apps/nextcloud/conf:/var/lib/univention-appcenter/apps/nextcloud/conf \
  -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
  --tmpfs /run \
  --tmpfs /run/lock \
  --security-opt seccomp:/etc/docker/seccomp-systemd.json \
  -e container=docker \
  docker.software-univention.de/nextcloud:14.0.6-0 \
  /usr/sbin/entrypoint.sh

e8a1dcf3b45a5603e3c0cfd7aadc7b1919ad94b129745772b66597abdd33544d

root@fps:~#

I hardly dare to run univention-app remove nextcloud. The settings and user data are retained.
And only the new install doesn’t work, because it recognizes that the old nextcloud is still installed (but not running).

root@fps:~# univention-app install nextcloud

Going to install Nextcloud (13.0.7-0)

(must_not_be_installed) This application is already installed

e8a1dcf3b45a5603e3c0cfd7aadc7b1919ad94b129745772b66597abdd33544d
This is your docker container ID. It is shown via: docker ps

Sorry, but there is no nextcloud container after I have done the create command.

root@fps:~# docker ps
CONTAINER ID        IMAGE                                                   COMMAND                  CREATED             STATUS              PORTS                           NAMES
48e92c67f111        docker.software-univention.de/onlyoffice-ds:5.2.0.195   "/bin/sh -c /app/o..."   3 months ago        Up 20 hours         80/tcp, 0.0.0.0:5443->443/tcp   happy_beaver
d93f78507361        docker.software-univention.de/ucs-appbox-amd64:4.3-0    "/sbin/init"             4 months ago        Up 20 hours         0.0.0.0:40002->80/tcp           adoring_goodall
root@fps:~# 

When I do the create command again, it shows an other ID but still not listet in docker ps.

you may execute
docker ps -a
to see ALL containers, including failed/stopped…

As you expected, all containers will be displayed there. All my failed attempts with the status “created”. e.g.

cc90ceb91432 docker.software-univention.de/nextcloud:14.0.6-0 "/bin/sh -c /usr/s..."   23 hours ago Created reverent_curie

Unfortunately I don’t know what to do with this information ;-(

Try to start it?
docker start cc90ceb91432

And check its logs as well:
docker logs -f --tail=100 cc90ceb91432

1 Like

I tried to start the docker via web-interface and univention, but not directly. :frowning:

Yes “docker start” works! Thanks! The docker is shown under docker ps and I can reach nextcloud at the webgui. But it seemed that the docker isn’t intergrated in univention. I should make a new admin login and a new database connection.

root@fps:~# docker logs -f --tail=100 cc90ceb91432

  • Starting periodic command scheduler cron
    …done.
    AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 172.17.0.3. Set the ‘ServerName’ directive globally to suppress this message

When I inspect the docker with docker inspect cc90ceb91432
some strings seemed to be ok
“LDAP_SERVER_NAME=fps.info.tm”
other strings are not correct like
“Source”: “/var/lib/univention-appcenter/apps/nextcloud/conf”
“Source”: “/var/lib/univention-appcenter/apps/nextcloud/data”

The data is stored in /var/lib/univention-appcenter/apps/nextcloud/data/nextcloud-data/
and the conf in /var/lib/univention-appcenter/apps/nextcloud/data/integration/conf

So it isn’t surprising that the conf is missing in nextcloud. My big question is
a) Is there a "join"Script in Univention to set the old conf to the new docker?
b) or must I change the settings in the docker by hand. And then wich and how?

Thanks for your time

You need to find out your old config. It probably either in var/lib/univention-appcenter/apps/nextcloud/data/integration or var/lib/univention-appcenter/apps/nextcloud/conf directories.

For example, mine config is in /var/lib/univention-appcenter/apps/nextcloud/nextcloud.env

P.S. Source urls are OK - these are binds.

I found my old config in /var/lib/univention-appcenter/apps/nextcloud/data/integration/conf
May be I wrote that confused above.
Tried the simple path to make a dir /var/lib/univention-appcenter/apps/nextcloud/conf and copy the nextcloud.env. To test the new config I restarted the server, but the docker didn’t start. So manual docker start cc90ceb91432 but the same problems as before.

I doubt it is allowed, but… If you wish, I could take a look at your system and attempt to resolve it.
I’m the real person from real company (HQ Systems dba HQSoftwareLab.com) and you may contact me via PM. No money required.

What you may wish to try on your own, you need to RECREATE container as its Environment Variables are still old, they are NOT updated when you update the source file. E.g. delete container:
docker rm -f cc90ceb91432

Then create it again with the long line from above and inspect/start it - if you lucky it would allow you to use container again as it will be having old set of variables.

Mastodon