Closed vcbranco closed 2 years ago
many thanks for testing. Can you share the output of sudo ncp-report
please?
also, is this your main instance, or is this a test instance you have around?
I made a special branch to debug your issue. That url https://10.8.6.100/index.php/apps/notify_push/test/cookie seems plain wrong.
Do you mind doing sudo ncp-update nc-21-vcbranco
and trying again sudo ncp-update-nc 21.0.4
, please?
We should get more info from the output this time around
This is a test instance (RPI 4 4GB) with the NextCloudPi_RPi_11-27-20 image fully updated.
I'll do all the tests and place the output here
Like wise here on a VM (Proxmox), got rollback: terminal output at https://pastebin.com/59CHhBJ7
Host: M1 Mac Mini Docker image: ownyourbits/nextcloudpi-arm64:latest Note: Fresh docker run without any data
ncp-update nc-21-vcbranco
. Successful, NCP to version 1.39.0.ncp-update-nc 21.0.4
. Error message shown as below:root@c5c3b7795ebe:/# ncp-update-nc 21.0.4 Current Nextcloud version 20.0.12.1 Available Nextcloud version 21.0.4 Download Nextcloud 21.0.4... Back up current instance... check free space... Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Maintenance mode already enabled backup database... backup files... tar: Nextcloud or one of the apps require upgrade - only a limited number of commands are available\nYou may use your browser or the occ upgrade command to do the upgrade\n/data/nextcloud: Cannot open: No such file or directory tar: Error is not recoverable: exiting now error generating backup Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Maintenance mode disabled Error backing up Clean up...
ncp-report
as shown below:2nd try.
ncp-report
:
{"reqId":"6jNcTch5ypYv98ojjUT7","level":2,"time":"2021-09-05T19:54:03+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"18.0.3.0"}
{"reqId":"6jNcTch5ypYv98ojjUT7","level":2,"time":"2021-09-05T19:54:03+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"18.0.3.0"}
NextCloudPi version v1.38.6
NextCloudPi image NextCloudPi_docker_01-19-21
distribution Debian GNU/Linux 10 \n \l
automount no
USB devices none
datadir /data/nextcloud/data (doesn't exist)
rootfs usage 21G/24G
swapfile /swap
dbdir /data/database
Nextcloud check ok
Nextcloud version 20.0.12.1
HTTPD service up
PHP service up
MariaDB service up
Redis service up
Postfix service up
internet check ok
port check 80 closed
port check 443 closed
IP ***REMOVED SENSITIVE VALUE***
gateway ***REMOVED SENSITIVE VALUE***
interface eth0
certificates ***REMOVED SENSITIVE VALUE***
NAT loopback no
uptime 4days
Would it work if just build a new image with NC21? Just be so excited with NC21.
ncp-report after the failed upgrade (ncp-update devel)
Test with the instance ncp-update nc-21-vcbranco in the same image but clean (the card was cloned) Error:
Update successful Turned off maintenance mode Resetting log level Check indices of the share table. Check indices of the filecache table. Adding additional size index to the filecache table, this can take some time... Filecache table updated successfully. Check indices of the twofactor_providers table. Check indices of the login_flow_v2 table. Check indices of the whats_new table. Check indices of the cards table. Check indices of the cards_properties table. Check indices of the calendarobjects_props table. Check indices of the schedulingobjects table. Check indices of the oc_properties table. Check columns of the comments table. Done. Check primary keys. Done. All tables already up to date! ++ ncc status ++ grep version: ++ awk '{ print $3 }'
+---------+-------+--------------+ | Folders | Files | Elapsed time | +---------+-------+--------------+ | 32 | 74 | 00:00:00 | +---------+-------+--------------+ Cleanup... ++ [[ /var/www/nextcloud/data == \/\v\a\r\/\w\w\w\/\n\e\x\t\c\l\o\u\d\/\d\a\t\a ]] ++ rm -rf /var/www/nextcloud/data ++ mv -T /var/www/ncp-data.CqJsv5 /var/www/nextcloud/data ++ rm /var/www/nextcloud-bkp_20210905_1630872395-20.0.12.1.tar.gz ++ echo 'Rollback successful. Nothing was updated' Rollback successful. Nothing was updated ++ exit 1 Done. Press any key...
ncp-report
The second error ncp-report is at the end. It seems to me it's the same issue
part 3.
Telegram pinned update instruction result:
Running nc-update-nextcloud Current Nextcloud version 18.0.3.0 Available Nextcloud version 21.0.4 Download Nextcloud 21.0.4... Back up current instance... check free space... Maintenance mode enabled backup database... backup files... backup /var/www//nextcloud-bkp_20210906_1630894298.tar.gz generated Maintenance mode disabled Install Nextcloud 21.0.4... Restore data... Fix permissions... Upgrade... Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Setting log level to debug Turned on maintenance mode Exception: Updates between multiple major versions and downgrades are unsupported. Update failed Maintenance mode is kept active Resetting log level Abort Clean up... Rolling back to backup /var/www/nextcloud-bkp_20210906_1630894298-18.0.3.0.tar.gz... {"reqId":"y5pHOagKPrj1O9DNjmEO","level":2,"time":"2021-09-06T02:11:56+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"18.0.3.0"} {"reqId":"y5pHOagKPrj1O9DNjmEO","level":2,"time":"2021-09-06T02:11:56+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"18.0.3.0"} Can only restore from ext/btrfs filesystems Rollback failed! Data left at /var/www/ncp-data.na7qHH Done. Press any key...
'ncp-report' logs:
thanks all. Please bear with me, as upgrading to this new HPB is really proving to be a pain given all the moving pieces. Also I don't think it's super well polished.
I'll go with your issues one by one.
@vcbranco
A couple questions: Do you have nc-static-IP
activated by any chance? do you access by IP or do you have a domain name to access?
I wasn't able to reproduce your issue, but I think we are dealing with this https://github.com/rustls/hyper-rustls/issues/84
In any case, please run again ncp-update nc-21-vcbranco
and then ncp-update-nc 21.0.4
, see if my fixes work for your case.
@WeiChihChern
Would it work if just build a new image with NC21? Just be so excited with NC21.
Yes, you can checkout devel
and then ./build-docker.sh arm64
, but then I still need to fix your issue before I can push this to everyone. A new set of images will come after this is good to go.
I'll try to replicate your upgrade path next
Yes, nc-static-ip is activated. This test intance is accessed by IP.
I going to start testing and post the results.
No luck Same problem
I'm going to setup a test DNS to the upgrade
Same problem.
Let's encrypt and nc-static-IP configured. Upgrade with ncp-update nc-21-vcbranco
Starting code integrity check... Finished code integrity check Update successful Turned off maintenance mode Resetting log level Check indices of the share table. Check indices of the filecache table. Adding additional size index to the filecache table, this can take some time... Filecache table updated successfully. Check indices of the twofactor_providers table. Check indices of the login_flow_v2 table. Check indices of the whats_new table. Check indices of the cards table. Check indices of the cards_properties table. Check indices of the calendarobjects_props table. Check indices of the schedulingobjects table. Check indices of the oc_properties table. Check columns of the comments table. Done. Check primary keys. Done. All tables already up to date! ++ ncc status ++ grep version: ++ awk '{ print $3 }'
ncc notify_push:setup https://pi.emcontacto.eu/push ✓ redis is configured ✓ push server is receiving redis messages ✓ push server can load mount info from database ✓ push server can connect to the Nextcloud server 🗴 push server is not a trusted proxy, please add '10.8.6.1' to the list of trusted proxies or configure any existing reverse proxy to forward the 'x-forwarded-for' send by the push server. See https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html#defining-trusted-proxies for how to set trusted proxies. The following trusted proxies are currently configured: "127.0.0.1", "::1", "pi.emcontacto.eu" of which the following seem to be invalid: "pi.emcontacto.eu" The following x-forwarded-for header was received by Nextcloud: 1.2.3.4 from the following remote: 10.8.6.1
If you're having issues getting the trusted proxy setup working, you can try bypassing any existing reverse proxy
in your setup by setting the NEXTCLOUD_URL
environment variable to point directly to the internal Nextcloud webserver url
(You will still need the ip address of the push server added as trusted proxy)
++ rollback
++ set +eE
++ trap '' INT TERM HUP ERR EXIT
++ echo -e 'Abort\nClean up...'
Abort
Clean up...
++ rm -rf /var/www/nextcloud.tar.bz2 /var/www/nextcloud-old
++ echo 'Rolling back to backup /var/www/nextcloud-bkp_20210907_1631037354-20.0.12.1.tar.gz...'
Rolling back to backup /var/www/nextcloud-bkp_20210907_1631037354-20.0.12.1.tar.gz...
++ local TMPDATA
+++ mktemp -d /var/www/ncp-data.XXXXXX
++ TMPDATA=/var/www/ncp-data.tHNbAO
++ [[ /var/www/nextcloud/data == \/\v\a\r\/\w\w\w\/\n\e\x\t\c\l\o\u\d\/\d\a\t\a ]]
++ mv -T /var/www/nextcloud/data /var/www/ncp-data.tHNbAO
++ ncp-restore /var/www/nextcloud-bkp_20210907_1631037354-20.0.12.1.tar.gz
{"reqId":"kIaa2OJJ1aFFhREe0bf9","level":2,"time":"2021-09-07T17:59:16+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"21.0.4.1"}
{"reqId":"kIaa2OJJ1aFFhREe0bf9","level":2,"time":"2021-09-07T17:59:16+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"21.0.4.1"}
check free space...
extracting backup file /var/www/nextcloud-bkp_20210907_1631037354-20.0.12.1.tar.gz...
restore files...
restore database...
No datadir found in backup
Maintenance mode disabled
Starting scan for user 1 out of 1 (ncp)
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 3 | 0 | 00:00:00 |
+---------+-------+--------------+
System config value tempdirectory set to string /var/www/nextcloud/data/tmp
System config value logfile set to string /var/www/nextcloud/data/nextcloud.log
System config value trusted_domains => 11 set to string 176.78.117.244
System config value trusted_domains => 1 set to string 10.8.6.100
Scanning AppData for files
+---------+-------+--------------+ | Folders | Files | Elapsed time | +---------+-------+--------------+ | 21 | 41 | 00:00:00 | +---------+-------+--------------+ Cleanup... ++ [[ /var/www/nextcloud/data == \/\v\a\r\/\w\w\w\/\n\e\x\t\c\l\o\u\d\/\d\a\t\a ]] ++ rm -rf /var/www/nextcloud/data ++ mv -T /var/www/ncp-data.tHNbAO /var/www/nextcloud/data ++ rm /var/www/nextcloud-bkp_20210907_1631037354-20.0.12.1.tar.gz ++ echo 'Rollback successful. Nothing was updated' Rollback successful. Nothing was updated ++ exit 1 Done. Press any key...
ncp-report
@nachoparker Thanks for the feedback. I've build an image from the devel branch. My personal NCP is running with the older image with an external hard drive. Can I simply stop the old image, and launch the new image and mount the external drive?
Or further setup is required to switch from one image to another with data all in an external drive? Thanks.
@WeiChihChern that's not how it works, if you want to retain your users, data and so on you need to upgrade, no way around that.
Updated apps and nextcloud from 18.0.3 to 20.0.12 first.
How did you do this? through NC updater or through NCP tools? it seems like you were in a half updated state. I updated from 18 to 20 and then did ncp-update nc-21-vcbranco
and then upgraded to 21 all using NCP tools and it worked fine for me.
@vcbranco thanks for your testing. You never shared the output from your second attempt with static IP so I don't know how it went. You just said it didn't work. Then you changed your setup and you shared the output, so we are mixing things here and I cannot trace whether my fix worked or needs adjustments.
I'm going to setup a test DNS to the upgrade
what does this mean? on your last output I see https://pi.emcontacto.eu in overwrite.cli.url, but I don't know where it comes from. notify_push seems to have a problem with it. Are you behind a proxy? have you messed with the 'forwarded_for_headers' option in your config.php by any chance?
@nachoparker
I see. I wonder what if one encountered power shortage to his device and have to relaunch the docker container again? Does that mean the users, data, etc cannot be retained? Does it mean docker users are encouraged to docker commit
their image regularly? Thanks.
I updated apps and nextcloud using ncp-config. I would try it again using your instructions, see how it goes.
@ovpc if your proxmox VM is disposable (only if), can you also ncp-update nc-21-vcbranco
, then edit /usr/local/bin/ncp-update-nc
and remove the line that says set-nc-domain "${nc_domain}"
, then
ncp-update-nc 21.0.4 # should finish ok this time, but notify_push won't be setup yet
ncc notify_push:log debug
source /usr/local/etc/library.sh
set -x
set-nc-domain localhost
journalctl -u notify_push # hopefully there's some debug info here
You error is super weird and super unhelpful and I can't find what library it comes from :/
Thanks
@WeiChihChern not encouraged to docker commit
, your NC instance, database and data need to be in sync and they live in a volume so that's orthogonal to what image you are using, and that means that they are retained always, but they are independent on the underlying docker image, because they need to be in sync. You cannot upgrade NC without migrating the database, apps and so on.
@nachoparker Tried again, but having the error of:
Running nc-update-nextcloud Current Nextcloud version 20.0.4.0 Available Nextcloud version 21.0.4 Download Nextcloud 21.0.4... Back up current instance... check free space... Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Maintenance mode enabled backup database... backup files... tar: Nextcloud or one of the apps require upgrade - only a limited number of commands are available\nYou may use your browser or the occ upgrade command to do the upgrade\n/data/nextcloud: Cannot open: No such file or directory tar: Error is not recoverable: exiting now error generating backup Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Maintenance mode disabled Error backing up Clean up... Done. Press any key...
ncp-report
:
@nachoparker
and that means that they are retained always
Sorry that I might not use the right words. I understand that the database would retain. In my case, in the external storage that -v
into the container.
What I am not sure what to do is that, as mentioned if something like power shortage resulting in relaunching a container is required, what is the correct ways to migrate my database, user, etc into a newly launch container?
It could be:
@WeiChihChern it seems like your backup step is failing? can you just run a backup from ncp-config
, see how that goes?
The provided docker image has NC 18, which does not match my database What should I do in this case? Thanks.
this is what you are not understanding I think, the image does not contain NC18. NC18 lives in a volume, along with the data and the database (and the apps). You can restart the container all you want, or you can even change container versions, as long as you include the same volume you will be in the same "NC instance" (but maybe with a different version of NCP tools). That's how we make sure we are always in sync.
@nachoparker backup log:
Running nc-backup check free space... Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Maintenance mode enabled backup database... backup files... tar: Nextcloud or one of the apps require upgrade - only a limited number of commands are available\nYou may use your browser or the occ upgrade command to do the upgrade\n/data/nextcloud: Cannot open: No such file or directory tar: Error is not recoverable: exiting now error generating backup Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Maintenance mode disabled Done. Press any key...
Ahh, now I understand it. Thanks for the explanation.
@ovpc if your proxmox VM is disposable (only if), can you also
ncp-update nc-21-vcbranco
, then edit/usr/local/bin/ncp-update-nc
and remove the line that saysset-nc-domain "${nc_domain}"
, thenncp-update-nc 21.0.4 # should finish ok this time, but notify_push won't be setup yet ncc notify_push:log debug source /usr/local/etc/library.sh set -x set-nc-domain localhost journalctl -u notify_push # hopefully there's some debug info here
You error is super weird and super unhelpful and I can't find what library it comes from :/
Thanks
@nachoparker sorry this VM is not disposible. I will create a fresh one to test this, later on today.
@nachoparker Could not reproduce the error on a new test VM it updated fine to 21.0.4 (see https://pastebin.com/8jWdiYqh) Got the old imagick error in NC admin settings tho
Security & setup warnings
This instance is missing some recommended PHP modules. For improved performance and better compatibility it is highly recommended to install them.
imagick
@ovpc can you just try again on your original VM? maybe it was a one time glitch :thinking:
@WeiChihChern can you add set -x
to /usr/local/bin/ncp-backup
as a second line and try to run a backup again?
@nachoparker Is this what you want?
root@bbb3f069dfbb:/# /usr/local/bin/ncp-backup \ -x Cannot load Zend OPcache - it was already loaded check free space... Cannot load Zend OPcache - it was already loaded Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Maintenance mode enabled backup database... backup files... tar: Nextcloud or one of the apps require upgrade - only a limited number of commands are available\nYou may use your browser or the occ upgrade command to do the upgrade\n/data/nextcloud: Cannot open: No such file or directory tar: Error is not recoverable: exiting now error generating backup Cannot load Zend OPcache - it was already loaded Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Maintenance mode disabled
thanks @WeiChihChern let's just run these commands
sudo sed -i '1aset -x' /usr/local/bin/ncp-backup
sudo ncp-config
# start a backup from the menu
thanks
@nachoparker
maybe it was a one time glitch
Must have been, it completed without issue this time terminal output @ https://pastebin.com/fCrED0ta
@ovpc oh gosh, that makes me a bit uneasy :/
but glad it worked for you
It is complaining about
Module php-imagick in this instance has no SVG support. For better compatibility it is recommended to install it.
can you try this?
https://help.nextcloud.com/t/how-to-enable-svg-for-php-imagick/108646/5
had already found same fix at https://techoverflow.net/2021/08/17/how-to-fix-docker-nextcloud-module-php-imagick-in-this-instance-has-no-svg-support-for-better-compatibility-it-is-recommended-to-install-it/
sudo apt install libmagickcore-6.q16-6-extra
fixed it
thanks @WeiChihChern let's just run these commands
sudo sed -i '1aset -x' /usr/local/bin/ncp-backup sudo ncp-config # start a backup from the menu
thanks
What I got:
Running nc-update-nextcloud Cannot load Zend OPcache - it was already loaded Cannot load Zend OPcache - it was already loaded Cannot load Zend OPcache - it was already loaded Current Nextcloud version 20.0.4.0 Available Nextcloud version 21.0.4 Download Nextcloud 21.0.4... Back up current instance...
- set -eE
- destdir=/var/www/
- includedata=no
- compress=yes
- backuplimit=0 ++ date +%Y%m%d_%s
- destfile=/var/www//nextcloud-bkp_20210908_1631113525.tar ++ date +%Y%m%d
- dbbackup=nextcloud-sqlbkp_20210908.bak
- occ='sudo -u www-data php /var/www/nextcloud/occ'
- [[ -f /.docker-image ]]
- basedir=/data
- [[ yes == \y\e\s ]]
- destfile=/var/www//nextcloud-bkp_20210908_1631113525.tar.gz ++ sudo -u www-data php /var/www/nextcloud/occ config:system:get datadirectory Cannot load Zend OPcache - it was already loaded
- datadir='Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade /data/nextcloud/data'
- trap cleanup EXIT
- trap fail INT TERM HUP ERR
- echo 'check free space...' check free space...
- mkdir -p /var/www/ ++ du -sb /data/nextcloud ++ awk '{ print $1 }'
- nsize=408125092
- [[ -d /data/nextcloud/data ]] ++ du -sb /data/nextcloud/data ++ awk '{ print $1 }'
- dsize=61061140
- margin=524288000
- [[ no == \y\e\s ]]
- size=871351952 ++ df -B1 /var/www/ ++ tail -1 ++ awk '{ print $4 }'
- free=23708033024
- '[' 871351952 -ge 23708033024 ']'
- [[ 0 != 0 ]]
- sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on Cannot load Zend OPcache - it was already loaded Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Maintenance mode enabled
- cd /data
- echo 'backup database...' backup database...
- mysqldump -u root --single-transaction nextcloud
- echo 'backup files...' backup files...
- [[ no == \y\e\s ]]
- [[ yes == \y\e\s ]]
- compress_arg='-I pigz'
- mkdir -p /var/www/ ++ dirname 'Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade /data/nextcloud/data/'
- tar -I pigz -cf /var/www//nextcloud-bkp_20210908_1631113525.tar.gz nextcloud-sqlbkp20210908.bak --exclude /.opcache --exclude '/{access,error,nextcloud}.log' --exclude /access.log --exclude /ncp-update-backups -C 'Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade /data/nextcloud' --exclude 'nextcloud/data//files/' --exclude nextcloud/data/.opcache --exclude 'nextcloud/data/{access,error,nextcloud}.log' --exclude nextcloud/data/access.log --exclude 'nextcloud/data/appdata/preview/' --exclude 'nextcloud/data//uploads/' --exclude 'nextcloud/data//cache/' --exclude 'nextcloud/data//files_trashbin/' --exclude 'nextcloud/data//files_versions/' --exclude nextcloud/data/ncp-update-backups --exclude nextcloud/data/__groupfolders -C /data nextcloud/ tar: Nextcloud or one of the apps require upgrade - only a limited number of commands are available\nYou may use your browser or the occ upgrade command to do the upgrade\n/data/nextcloud: Cannot open: No such file or directory tar: Error is not recoverable: exiting now
- echo 'error generating backup' error generating backup
- exit 1
- cleanup
- local ret=1
- rm -f nextcloud-sqlbkp_20210908.bak
- sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off Cannot load Zend OPcache - it was already loaded Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Maintenance mode disabled
- exit 1 Error backing up Clean up... Done. Press any key...
@ovpc sweet, thanks, we are back to the imagick discussion though. Not sure if we should install it for security reasons
@WeiChihChern
ugh
++ sudo -u www-data php /var/www/nextcloud/occ config:system:get datadirectory
Cannot load Zend OPcache - it was already loaded
datadir='Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
I see what's going on, we should handle this more gracefully. What is the output from
ncc config:system:get datadirectory 2> /dev/null
echo $?
@nachoparker
root@bbb3f069dfbb:/# ncc config:system:get datadirectory 2> /dev/null Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade /data/nextcloud/data root@bbb3f069dfbb:/# echo $? 0
@WeiChihChern
ncc status
?
@nachoparker
root@bbb3f069dfbb:/# ncc status Cannot load Zend OPcache - it was already loaded Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade
- installed: true
- version: 20.0.4.0
- versionstring: 20.0.4
- edition: root@bbb3f069dfbb:/#
hmm I wonder why you keep getting that message, if you log into Nextcloud, does everything work on the web interface?
Opening the web interface
Clicked upgrade:
yes, your instance was in a weird half-upgraded state to start with. I would go to the NC forums if you want to try to fix that
@WeiChihChern that's not how it works, if you want to retain your users, data and so on you need to upgrade, no way around that.
Updated apps and nextcloud from 18.0.3 to 20.0.12 first.
How did you do this? through NC updater or through NCP tools? it seems like you were in a half updated state. I updated from 18 to 20 and then did
ncp-update nc-21-vcbranco
and then upgraded to 21 all using NCP tools and it worked fine for me.@vcbranco thanks for your testing. You never shared the output from your second attempt with static IP so I don't know how it went. You just said it didn't work. Then you changed your setup and you shared the output, so we are mixing things here and I cannot trace whether my fix worked or needs adjustments.
I'm going to setup a test DNS to the upgrade
what does this mean? on your last output I see https://pi.emcontacto.eu in overwrite.cli.url, but I don't know where it comes from. notify_push seems to have a problem with it. Are you behind a proxy? have you messed with the 'forwarded_for_headers' option in your config.php by any chance?
This is the test with the fixes nc-static-ip and letsencrypt configured
https://github.com/nextcloud/nextcloudpi/issues/1326#issuecomment-914511671
Something you said and I did not understant/noticed?
I'm not behind a proxy and did not make any change in the config files. I installed the image on the pi, updated with ncp-update and ncp-update-nextcloud and sudo apt update/upgrade
yes, your instance was in a weird half-upgraded state to start with. I would go to the NC forums if you want to try to fix that
It's fine, this is only a test container. Looking forward to the final release.
@vcbranco thanks for clarifying, by the way, you don't have to and should not do sudo apt update/upgrade
, let NCP do it automatically for you to make sure you don't override any configuration.
Can you run nc-static-IP
again and then share the output of ncp-update-nc 21.0.4
so I can see why my fix failed?
After that I think we want to look into your letsencrypt
attempt.
ncc notify_push:setup https://pi.emcontacto.eu/push
🗴 push server is not a trusted proxy, please add '10.8.6.1' to the list of trusted proxies or configure any existing reverse proxy to forward the 'x-forwarded-for' send by the push server.
See https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html#defining-trusted-proxies for how to set trusted proxies.
The following trusted proxies are currently configured: "127.0.0.1", "::1", "pi.emcontacto.eu"
of which the following seem to be invalid: "pi.emcontacto.eu"
The following x-forwarded-for header was received by Nextcloud: 1.2.3.4
from the following remote: 10.8.6.1
Thanks
Ok. I'll do that
@vcbranco I added another tweak for your "letsencrypt attempt". In order to test this one, please run
ncp-update nc-21-vcbranco # download the fix
ncp-config
# run letsencrypt again inside the menu
ncp-update-nc 21.0.4
thanks
The upgrade does not done.
During upgrade I have the following errors just after the line "System config value trusted_proxies => 12 set to string ::1"
✓ redis is configured ✓ push server is receiving redis messages ✓ push server can load mount info from database 🗴 push server can't connect to the Nextcloud server error sending request for url (https://10.8.6.100/index.php/apps/notify_push/test/cookie): error trying to connect: invalid dnsname: error trying to connect: invalid dnsname: invalid dnsname Abort
Clean up... Rolling back to backup /var/www/nextcloud-bkp_20210905_1630827743-20.0.2.2.tar.gz... {"reqId":"g2uhEBMHYLKFdYG1047b","level":2,"time":"2021-09-05T07:45:50+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"21.0.4.1"} {"reqId":"g2uhEBMHYLKFdYG1047b","level":2,"time":"2021-09-05T07:45:50+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"21.0.4.1"} check free space... extracting backup file /var/www/nextcloud-bkp_20210905_1630827743-20.0.2.2.tar.gz... restore files... restore database... No datadir found in backup Maintenance mode disabled Starting scan for user 1 out of 1 (ncp) +---------+-------+--------------+ | Folders | Files | Elapsed time | +---------+-------+--------------+ | 2 | 0 | 00:00:00 | +---------+-------+--------------+ System config value tempdirectory set to string /var/www/nextcloud/data/tmp System config value logfile set to string /var/www/nextcloud/data/nextcloud.log System config value trusted_domains => 11 set to string 176.78.117.244 System config value trusted_domains => 1 set to string 10.8.6.100 Scanning AppData for files
+---------+-------+--------------+ | Folders | Files | Elapsed time | +---------+-------+--------------+ | 5 | 4 | 00:00:00 | +---------+-------+--------------+ Cleanup... Rollback successful. Nothing was updated Done. Press any key...