Upgrade NextCloud 211228447

Hello,
I launch the upgrade of NextCloud 211228447 .

After several minutes the upgrade stop .

and the snap are inactive.

nextcloud.nginx enabled inactive
nextcloud.php-fpm enabled inactive
nextcloud.postgresql enabled inactive

Nextcloud snap is allways the old version
current → 211119415

find in /var/snap/nextcloud/common/log/nginx_error.log :slightly_frowning_face:

2022/01/12 10:50:09 [alert] 25072#0: unlink() “/var/snap/nextcloud/common/log/nginx.pid” failed (2: No such file or directory)

the syncloud app is in this state

what do now?

Pierre

I run the command "snap refresh nextcloud.

root@syncloud:/var/snap/nextcloud/common# snap refresh nextcloud
error: cannot perform the following tasks:

  • Run pre-refresh hook of “nextcloud” snap if present (run hook “pre-refresh”:

2022-01-12 12:54:34,676 - database - INFO - postgres executing: snap run nextcloud.pgdumpall -f /var/snap/nextcloud/current/database.dump
pg_dumpall: could not connect to database “template1”: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/var/snap/nextcloud/current/database/.s.PGSQL.5436”?
2022-01-12 12:54:35,036 - database - ERROR - postgres error:
Traceback (most recent call last):
File “/snap/nextcloud/211119415/meta/hooks/pre-refresh”, line 7, in
Installer().pre_refresh()
File “/snap/nextcloud/211119415/hooks/installer.py”, line 90, in pre_refresh
self.db.backup()
File “/snap/nextcloud/211119415/hooks/postgres.py”, line 52, in backup
self.run(‘snap run nextcloud.pgdumpall -f {0}’.format(self.backup_file))
File “/snap/nextcloud/211119415/hooks/postgres.py”, line 62, in run
raise e
File “/snap/nextcloud/211119415/hooks/postgres.py”, line 58, in run
output = check_output(cmd, shell=True).decode()
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/subprocess.py”, line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/subprocess.py”, line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command ‘snap run nextcloud.pgdumpall -f /var/snap/nextcloud/current/database.dump’ returned non-zero exit status 1.
-----)

The DB is down …
Can i do start the DB before the command

I guess it is down for a reason, what is the output of:

df -h

You can start nextcloud by:

snap start nextcloud

Usually you never do this unless the reason it is down is fixed now.

Hi boris

df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 15G 7.4G 6.3G 55% /
devtmpfs 1.8G 0 1.8G 0% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 2.0G 204M 1.8G 11% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/loop0 530M 530M 0 100% /snap/rocketchat/190609478
/dev/loop7 30M 30M 0 100% /snap/users/20071264
/dev/sda1 220G 43G 166G 21% /opt/disk/external
/dev/loop9 43M 43M 0 100% /snap/bitwarden/21032862
/dev/loop10 93M 93M 0 100% /snap/users/210524196
/dev/loop11 207M 207M 0 100% /snap/nextcloud/210528234
/dev/loop6 283M 283M 0 100% /snap/nextcloud/210624280
/dev/loop2 151M 151M 0 100% /snap/platform/2110031074
/dev/loop3 151M 151M 0 100% /snap/platform/2110221095
/dev/loop4 424M 424M 0 100% /snap/nextcloud/211119415
/dev/loop1 147M 147M 0 100% /snap/platform/1203

snap start nextcloud
error: cannot perform the following tasks:

  • start of [nextcloud.nginx nextcloud.php-fpm nextcloud.postgresql] (# systemctl start snap.nextcloud.nginx.service snap.nextcloud.php-fpm.service snap.nextcloud.postgresql.service
    Job for snap.nextcloud.postgresql.service failed because the control process exited with error code.
    See “systemctl status snap.nextcloud.postgresql.service” and “journalctl -xe” for details.
    Job for snap.nextcloud.php-fpm.service failed because the control process exited with error code.
    See “systemctl status snap.nextcloud.php-fpm.service” and “journalctl -xe” for details.
    )
  • start of [nextcloud.nginx nextcloud.php-fpm nextcloud.postgresql] (exit status 1)
    root@syncloud:~#

systemctl status snap.nextcloud.php-fpm.service
● snap.nextcloud.php-fpm.service - Service for snap application nextcloud.php-fpm
Loaded: loaded (/etc/systemd/system/snap.nextcloud.php-fpm.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2022-01-13 13:06:13 CET; 6min ago
Process: 3229 ExecStart=/usr/bin/snap run nextcloud.php-fpm (code=exited, status=70)

Jan 13 13:06:13 syncloud systemd[1]: snap.nextcloud.php-fpm.service: Service RestartSec=100ms expired, scheduling restart.
Jan 13 13:06:13 syncloud systemd[1]: snap.nextcloud.php-fpm.service: Scheduled restart job, restart counter is at 5.
Jan 13 13:06:13 syncloud systemd[1]: Stopped Service for snap application nextcloud.php-fpm.
Jan 13 13:06:13 syncloud systemd[1]: snap.nextcloud.php-fpm.service: Start request repeated too quickly.
Jan 13 13:06:13 syncloud systemd[1]: snap.nextcloud.php-fpm.service: Failed with result ‘exit-code’.
Jan 13 13:06:13 syncloud systemd[1]: Failed to start Service for snap application nextcloud.php-fpm.
root@syncloud:~#

journalctl -ru snap.nextcloud.postgresql.service

you wil find the log here : CryptPad

bad weather :frowning:

I found this : PostgreSQL: Re: PANIC: replication checkpoint has wrong magic 0 instead of …??

Cheers

OK, I guess the simplest option is to remove it and install again then there will be no upgrade issue, I understand this is not the best option but there were few issues fixed in the latest version which may cause this.
After remove/install you will have latest version will lose settings like calendar/contacts but all the files will stay but you may need to tell Nextcloud to scan them with:

snap run nextcloud.occ files:scan --all

OK

Remove since the platform web UI ?

But before i test if the DB restart after apply this work around.

Just moving away to somewhere else
$PG_DATA/pg_logical/replorigin_checkpoint

I do that during the week-end.
Thanks.
Pierre

Hello Boris ,

I found the issue with my installation.

It’s the hardware.

The SD card is not READ ONLY but the file system have several problem.

Yesterday i install rclone to backup platform/backup directory from external disk to infomaniak.
it was ok …

I don’t remenber why , i rebooted the Rapsberrypi .

i saw than the nextcloud was up !!! :slight_smile:
but rclone was not installed :frowning:

Data are write in cache but not on the SD card.

:frowning:
In first time i restore a SD on new card.
And i lookup on your site the Syncloud H seems enough for me. but do you have a solution where the boot disk will not SD card.

Syncloud R uses sd card for the whole OS and that is why it is called Starter.
Syncloud H uses sd card just for kernel boot and can be easily replaced if corrupted as it is “readonly” boot storage.
Syncloud N does not use sd card at all.

Hi Boris
On syncloud H where are store the snap directory ?

it’s S or N ? I don’t see description pour Syncloud S.

Pierre

On syncloud H where are store the snap directory ?

On internal SSD disk which is used to store operation system files as well as snaps.

it’s S or N ? I don’t see description pour Syncloud S.

Sorry N, S is discontinued for now.

1 Like