Nextcloud V924 fails to install, timeout

Thank you, I was able to clear an additional 20+g of free space and started the refresh again. I’ll post the result when it completes.

So after running the refresh with over 30g free on the SD, same error but this time full run time was over 4hrs.

Paused at “Copy snap “nextcloud” data” for about 2hrs, then again at “Run configure hook of “nextcloud” snap if present” for another 2hrs.

Logs sent again.

Quick health check on the boot media

echo --- dmesg io errors ---
dmesg -T | grep -iE "I/O error|sdb|usb-storage|EXT4-fs error" | tail -30
echo --- write speed test 200MB to root ---
dd if=/dev/zero of=/root/__wtest.bin bs=1M count=200 oflag=direct conv=fdatasync 2>&1
rm -f /root/__wtest.bin
echo --- read speed test ---
dd if=/dev/sdb2 of=/dev/null bs=1M count=200 iflag=direct 2>&1
echo --- smart if available ---
smartctl -a /dev/sdb 2>&1 | head -30 || true

If the write test comes back at hundreds of KB/s instead of tens of MB/s, something is wrong with SD card.

Current state + recent refresh outcome

df -h /
snap list nextcloud
snap changes | tail -10
echo --- last nextcloud refresh details ---
ID=$(snap changes | awk "/[Rr]efresh.*nextcloud/ {id=\$1} END{print id}")
echo change id: $ID
snap change "$ID"

Could you send the output please? (I am will include more into the logs email later)

root@syncloud:\~# df -h /

Filesystem      Size  Used Avail Use% Mounted on

/dev/sdb2        60G   23G   35G  40% /

root@syncloud:\~# snap list nextcloud

Name       Version  Rev  Tracking       Publisher  Notes

nextcloud  906      906  latest/stable  syncloud✓  -

root@syncloud:\~# snap changes | tail -10

476  Done    today at 03:44 EDT      today at 03:44 EDT      Running service command

477  Error   today at 04:24 EDT      today at 04:24 EDT      Initialize device

478  Done    today at 04:32 EDT      today at 04:32 EDT      Running service command

479  Done    today at 05:20 EDT      today at 05:20 EDT      Running service command

480  Done    today at 05:20 EDT      today at 05:21 EDT      Running service command

481  Done    today at 05:22 EDT      today at 05:22 EDT      Running service command

482  Done    today at 05:22 EDT      today at 05:22 EDT      Running service command

483  Done    today at 05:22 EDT      today at 05:22 EDT      Running service command

484  Done    today at 05:22 EDT      today at 05:22 EDT      Running service command

root@syncloud:\~# echo --- last nextcloud refresh details ---

\--- last nextcloud refresh details ---

root@syncloud:\~# ID=$(snap changes | awk "/\[Rr\]efresh.\*nextcloud/ {id=\\$1} END{print id}")

root@syncloud:\~# echo change id: $ID

change id: 473

root@syncloud:\~# snap change "$ID"

Status  Spawn               Ready               Summary

Undone  today at 00:52 EDT  today at 05:22 EDT  Download snap "nextcloud" (937) from channel "latest/stable"

Done    today at 00:52 EDT  today at 05:22 EDT  Fetch and check assertions for snap "nextcloud" (937)

Undone  today at 00:52 EDT  today at 05:22 EDT  Mount snap "nextcloud" (937)

Undone  today at 00:52 EDT  today at 05:22 EDT  Run pre-refresh hook of "nextcloud" snap if present

Undone  today at 00:52 EDT  today at 05:22 EDT  Stop snap "nextcloud" services

Undone  today at 00:52 EDT  today at 05:22 EDT  Remove aliases for snap "nextcloud"

Undone  today at 00:52 EDT  today at 05:22 EDT  Make current revision for snap "nextcloud" unavailable

Undone  today at 00:52 EDT  today at 05:22 EDT  Copy snap "nextcloud" data

Undone  today at 00:52 EDT  today at 05:20 EDT  Setup snap "nextcloud" (937) security profiles

Undone  today at 00:52 EDT  today at 05:20 EDT  Make snap "nextcloud" (937) available to the system

Undone  today at 00:52 EDT  today at 05:20 EDT  Automatically connect eligible plugs and slots of snap "nextcloud"

Undone  today at 00:52 EDT  today at 05:20 EDT  Set automatic aliases for snap "nextcloud"

Undone  today at 00:52 EDT  today at 05:20 EDT  Setup snap "nextcloud" aliases

Undone  today at 00:52 EDT  today at 05:20 EDT  Run post-refresh hook of "nextcloud" snap if present

Undone  today at 00:52 EDT  today at 05:19 EDT  Start snap "nextcloud" (937) services

Done    today at 00:52 EDT  today at 05:18 EDT  Clean up "nextcloud" (937) install

Error   today at 00:52 EDT  today at 05:18 EDT  Run configure hook of "nextcloud" snap if present

Hold    today at 00:52 EDT  today at 05:18 EDT  Run health check of "nextcloud" snap

Done    today at 00:52 EDT  today at 05:22 EDT  Handling re-refresh of "nextcloud" as needed

......................................................................

Run configure hook of "nextcloud" snap if present

2026-05-04T05:18:39-04:00 ERROR run hook "configure":

\-----

debug installer/executor.go:23 executing {"cmd": "/snap/nextcloud/current/bin/occ-runner upgrade"}

debug installer/executor.go:26 No upgrade required.

debug installer/executor.go:26

debug installer/executor.go:26 Note: This command triggers the upgrade actions associated with a new version. The new version's updated source files must be deployed in advance.

debug installer/executor.go:26 See the upgrade documentation: https://docs.nextcloud.com/server/32/go.php?to=admin-update for more information.

debug installer/executor.go:26

info installer/occ.go:24 occ {"args": \["maintenance:mode", "--off"\]}

debug installer/executor.go:23 executing {"cmd": "/snap/nextcloud/current/bin/occ-runner maintenance:mode --off"}

debug installer/executor.go:26 Maintenance mode already disabled

debug installer/executor.go:26

info installer/occ.go:24 occ {"args": \["db:add-missing-indices"\]}

debug installer/executor.go:23 executing {"cmd": "/snap/nextcloud/current/bin/occ-runner db:add-missing-indices"}

debug installer/executor.go:26 Adding additional share_with_index index to the oc_share table, this can take some time...

debug installer/executor.go:26

debug installer/executor.go:26 In ExceptionConverter.php line 87:

debug installer/executor.go:26

debug installer/executor.go:26   An exception occurred while executing a query: SQLSTATE\[42501\]: Insufficien

debug installer/executor.go:26   t privilege: 7 ERROR:  permission denied for schema public

debug installer/executor.go:26

debug installer/executor.go:26

debug installer/executor.go:26 In Exception.php line 24:

debug installer/executor.go:26

debug installer/executor.go:26   SQLSTATE\[42501\]: Insufficient privilege: 7 ERROR:  permission denied for sc

debug installer/executor.go:26   hema public

debug installer/executor.go:26

debug installer/executor.go:26

debug installer/executor.go:26 In Connection.php line 33:

debug installer/executor.go:26

debug installer/executor.go:26   SQLSTATE\[42501\]: Insufficient privilege: 7 ERROR:  permission denied for sc

debug installer/executor.go:26   hema public

debug installer/executor.go:26

debug installer/executor.go:26

debug installer/executor.go:26 db:add-missing-indices \[--dry-run\]

debug installer/executor.go:26

debug installer/executor.go:26

error installer/occ.go:27 occ failed {"error": "/snap/nextcloud/current/bin/occ-runner \[db:add-missing-indices\]: exit status 7: Adding additional share_with_index index to the oc_share table, this can take some time...\\n\\nIn ExceptionConverter.php line 87:\\n                                                                               \\n  An exception occurred while executing a query: SQLSTATE\[42501\]: Insufficien  \\n  t privilege: 7 ERROR:  permission denied for schema public                   \\n                                                                               \\n\\nIn Exception.php line 24:\\n                                                                               \\n  SQLSTATE\[42501\]: Insufficient privilege: 7 ERROR:  permission denied for sc  \\n  hema public                                                                  \\n                                                                               \\n\\nIn Connection.php line 33:\\n                                                                               \\n  SQLSTATE\[42501\]: Insufficient privilege: 7 ERROR:  permission denied for sc  \\n  hema public                                                                  \\n                                                                               \\n\\ndb:add-missing-indices \[--dry-run\]\\n\\n", "output": "Adding additional share_with_index index to the oc_share table, this can take some time...\\n\\nIn ExceptionConverter.php line 87:\\n                                                                               \\n  An exception occurred while executing a query: SQLSTATE\[42501\]: Insufficien  \\n  t privilege: 7 ERROR:  permission denied for schema public                   \\n                                                                               \\n\\nIn Exception.php line 24:\\n                                                                               \\n  SQLSTATE\[42501\]: Insufficient privilege: 7 ERROR:  permission denied for sc  \\n  hema public                                                                  \\n                                                                               \\n\\nIn Connection.php line 33:\\n                                                                               \\n  SQLSTATE\[42501\]: Insufficient privilege: 7 ERROR:  permission denied for sc  \\n  hema public                                                                  \\n                                                                               \\n\\ndb:add-missing-indices \[--dry-run\]\\n\\n"}

hooks/installer.(\*OCConsole).Run

        /drone/src/cli/installer/occ.go:27

hooks/installer.(\*Installer).upgrade

        /drone/src/cli/installer/installer.go:359

hooks/installer.(\*Installer).Configure

        /drone/src/cli/installer/installer.go:188

main.main.func1

        /drone/src/cli/cmd/configure/main.go:20

github.com/spf13/cobra.(*Command).execute

        /go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:983

github.com/spf13/cobra.(*Command).ExecuteC

        /go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115

github.com/spf13/cobra.(*Command).Execute

        /go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039

main.main

        /drone/src/cli/cmd/configure/main.go:24

runtime.main

        /usr/local/go/src/runtime/proc.go:290

Error: /snap/nextcloud/current/bin/occ-runner \[db:add-missing-indices\]: exit status 7: Adding additional share_with_index index to the oc_share table, this can take some time...

In ExceptionConverter.php line 87:

  An exception occurred while executing a query: SQLSTATE\[42501\]: Insufficien

  t privilege: 7 ERROR:  permission denied for schema public

In Exception.php line 24:

  SQLSTATE\[42501\]: Insufficient privilege: 7 ERROR:  permission denied for sc

  hema public

In Connection.php line 33:

  SQLSTATE\[42501\]: Insufficient privilege: 7 ERROR:  permission denied for sc

  hema public

db:add-missing-indices \[--dry-run\]

/snap/nextcloud/current/bin/occ-runner \[db:add-missing-indices\]: exit status 7: Adding additional share_with_index index to the oc_share table, this can take some time...

In ExceptionConverter.php line 87:

  An exception occurred while executing a query: SQLSTATE\[42501\]: Insufficien

  t privilege: 7 ERROR:  permission denied for schema public

In Exception.php line 24:

  SQLSTATE\[42501\]: Insufficient privilege: 7 ERROR:  permission denied for sc

  hema public

In Connection.php line 33:

  SQLSTATE\[42501\]: Insufficient privilege: 7 ERROR:  permission denied for sc

  hema public

db:add-missing-indices \[--dry-run\]

\-----

root@syncloud:\~#

Can you run refresh again and show output we have more logs to help us on latest 943

snap refresh nextcloud 

Could you run this as well please

sudo grep -E "dbuser|dbname|dbtype|dbpassword|installed" /var/snap/nextcloud/current/nextcloud/config/config.php

Logs sent after v943 attempt.

Is this safe to post the results of “sudo grep -E “dbuser|dbname|dbtype|dbpassword|installed” /var/snap/nextcloud/current/nextcloud/config/config.php” ?

root@syncloud:\~# sudo grep -E "dbuser|dbname|dbtype|dbpassword|installed" /var/snap/nextcloud/current/nextcloud/config/config.php

  'dbtype' => 'pgsql',

  'dbname' => 'nextcloud',

  'dbuser' => 'oc_installer-d9228a1fad8c4ff6941dbebb9562e607',

  'dbpassword' => 'blocked out',

  'installed' => true,

Are the logs from the v943 attempt any more helpful?

I tried running

root@syncloud:~# ls -lh /var/snap/nextcloud/current/database.dump

-rw-r–r-- 1 nextcloud nextcloud 1.1G May 4 23:29 /var/snap/nextcloud/current/database.dump

If I understand that right it is saying the database dump is 1.1G, in nextcloud system panel it says database is 2.5G.

Should the dump size be closer to the db size?

Could this be a slow/failing sd issue causing timeout on the generation of dump file, then if dump file is incomplete restoring it would fail as well? (The system is working fine otherwise, only issue is it will not upgrade successfully, the rolled back version of nextcloud is working fine. )

Any ideas on this? Anything stand out in logs?

Today logging in I see that Nextcloud is now on v954. It has successfully upgraded and Nextcloud is online.

Thank you.

1 Like