28 to 29 upgrade fail

Synology DS920+ DSM 7.2.1-69057 Update 5
Docker setup with Portainer 2.19.5 according to mariushosting.com setup
Ran like a breeze =:) until the update from 28 something last to 29…

Logs gave

Warning: /var/www/html/config/autoconfig.php differs from the latest version of this image at /usr/src/nextcloud/config/autoconfig.php
Warning: /var/www/html/config/smtp.config.php differs from the latest version of this image at /usr/src/nextcloud/config/smtp.config.php

according to

I “just” had to copy these 2 php files FROM the docker image @ /usr/src/nextcloud/config/ TO the /var/www/html/config/ folder @ the synology. Ok i won’t deny i am fairly new at playing with docker…

  1. Found the files with terminal in portainer, went into terminal in the Synology on my admin account and tried to copy them according

With the portainer Nextcloud docker id. No result denied access…

  1. Since nano is not available in portainer terminal I used the linux -more- command to get a txt output of the files and created a new php file from that in /var/www/html/config/ in various ways… Still no bingo … it keeps the same warnings.

I am out of options here and off course the family is smoking at my back when Nextcloud will be back … online…

Anybody any ideas how to get these files copied from docker to the synology folder???

Thank you 4 your help :pray:

hi @K_V welcome to the forum :handshake:

while it could happen your auto-configuration scripts created by earlier version differ from the newest one it is not a real problem - as you state already there is a warning which focus your attention to the fact something could be different in your system compared to the fresh install.

As long you don’t hit any issues you can continue. and try to resolve the issue later… I would start looking at both versions side by side (use diff command on the console) - you will see differences and can decide if the changes are relevant for you… many of tasks are only relevant for the setup phase and are not relevant for already running instance… if yes you could still apply/copy changes - as you tried w/o success there might some issue in your local setup e.g. copy&paste between different operating systems - Linux and Windows use different EOL characters - maybe there is different whitespace (“real” tab vs multiple whitespaces) this could trigger the different warning already…

Those are just warnings that your config files are out-of-date. It’s a new feature, which is why you haven’t seen it before, but it does not indicate anything beyond your config files are out of date so things like the auto-config variables for the image may not work the way they’re documented. You would have already been in that state though, just without a warning telling you about the situation.

If you’re offline, those are not the cause.

To copy the config files into place, the easiest/most reliable approach is to open an exec window into the running container. There’s no need to use docker cp since both source and destination are accessible within the container.

You can just cp /usr/src/nextcloud/config/blah /var/www/html/config/blah.

I don’t recall how to open an exec shell in Portainer, but it’s a fairly routine Docker thing. In standalone Docker it’d be docker compose exec -u33 app bash (where app is your container name).

@ JTR & WWE

Thank you very much 4 pointing me further… .

  1. Indeed trying to copy & paste text through different OS editors was not a good idea because of the difference in formatting triggered the problem of the file difference warning in this case. I have run in this problem b4 and I should have known that. I guess the hot weather in the Netherlands recently impaired my reasoning capabilities a bit…

  2. It’s called “hide in plain sight” =:) Being rather new and unfamiliar with docker I did not realise that indeed from INSIDE the docker container SYM links to outside file locations are used and as such the cp command would “just” work =:). And it worked, but i had re-pull a new nextcloud image in portainer b4 the log warnings disappeared completely.

  3. JTR quote: “If you’re offline, those are not the cause.” With my limited knowledge I thought the difference in the warning several “config.php” were the problem… . Indeed NOT … Now the config warnings have ceased the URL nextcloud startpage comes up with

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

For help, see the documentation.

I suspect that a major Nextcloud version change (28 → 29) triggers a required software upgrade scan to make sure things work properly

Reading the documentation @

https://docs.nextcloud.com/server/29/admin_manual/maintenance/update.html

“occ upgrade” inside a portainer nextcloud container console does not work. Probably 4 a good reason.

@

“docker-compose exec -u www-data nextcloud php occ [command]” should do the job, but it needs to run form the docker-compose.yml location.

So… inside the portainer nexctloud container console :

root@3094c05c3ebe:/var/www/html# find . -name “docker-compose.yml”
./apps/suspicious_login/vendor/league/flysystem/docker-compose.yml
root@3094c05c3ebe:/var/www/html# cd ./apps/suspicious_login/vendor/league/flysystem/
root@3094c05c3ebe:/var/www/html/apps/suspicious_login/vendor/league/flysystem# ls
INFO.md LICENSE composer.json config.subsplit-publish.json docker-compose.yml readme.md src
root@3094c05c3ebe:/var/www/html/apps/suspicious_login/vendor/league/flysystem# docker-compose exec -u www-data nextcloud php occ
bash: docker-compose: command not found

“no bananas…”

Ok, running a kind of blind here so I SSH rooted into my Synology server to see IF I could find the docker-compose.yml overthere, but no luck.

Ok where a standard nextcloud installation on a linux OS “occ upgrade” will work in docker its a different ballgame because you pull a new preconfigured image every time a new version gets published.

Again i am stuck in the mud here, because i am hesitant to try run any “occ” commands inside the container being afraid to loose my users database… .

I’ve been searching 4 answers but haven’t found them yet on internet so, forgive me for having to ask for your time and assistance again to solve this… .

if you run commands inside of container console (root@309… indicates this) you don’t need docker compose exec prefix anymore and you obviously will not find the compose files as it lives outside of the container.

the compose file could have any name e.g. "my-application-config.yml", compose.yml, docker-compose.yaml are common as well. I would recommend you consul synology docs to understand how it is named (double check your portainer, I would expect it shows the compose name and location).

there is no difference whether you run occ commands inside of the container or from the host using docker exec or docker compose exec - as soon the command executes successfully the result is the same.

I would recommend you learn the technology you are tring to use e.g. consult synology docs and docs.docker.com

The Docker image automatically triggers the upgrade. If you’re getting this, it did not complete for some reason. Please post the container startup logs from the initial upgrade attempt. If you don’t have those any longer, this part is well logged in Nextcloud so it’ll be in your regular nextcloud.log.

When you are looking at the log, make sure you’re looking at the entries from the time window of your initial failed upgrade, rather than any subsequent attempts (though they may have enough info to help debug this too).

@ jtr & wwe

Thank you 4 pointing me again in the right direction. It has been an interesting journey figuring this one out.

Being a docker newby i played around with the nextcloud config files not realizing in copying text and using external text editors to adjust i screwed up the file ownership records. At one point a few of these config files where linked to the synology (root) user accounts i.s.o. the docker image user which went by the user name of “33”.

I used inside the nextcloud container docker terminal bash

@ /var/www/html/config/

chown --reference=autoconfig.php config.php

autoconfig.php had been copied from /usr/src/nextcloud/config/ so it had the right “33” user credentials. 4 other config files I had to adjust also.

Adjusting these user credentials allowed me also to finally run the occ command succesfully inside the nextcloud container docker terminal bash with

runuser --user www-data ./occ upgrade

apparently this needs to be run between major versions update to update all kinds of apps and file settings.

Now NC29 is smiling @ me again. :grin:

happy you sorted the issue. To have smoother experience next time please follow Docker upgrade procedure

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.