NextCloud in TrueNAS Scale fails to update

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.2
  • Operating system and version (e.g., Ubuntu 24.04):
    • TrueNAS_Scale ElectricEel-24.10.2.4
  • Web server and version (e.g, Apache 2.4.25):
    • n/a?
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • n/a?
  • PHP version (e.g, 8.3):
    • PHP 8.3.19
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • Upon trying to update
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Docker via TrueNAS Store
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • Yes, I have Cloudflare Tunnel for Nextcloud setup, but am currently connected locally over LAN

Summary of the issue you are facing:

Have the alert in NextCloud for the update (currently on 1.6.15/31.0.2) - GUI says “Web Updater is disabled. Please use Command Line or appropriate method etc

I tried updating in the TrueNAS dashboard, but it errors out with:

`Traceback (most recent call last):`
`File “/usr/lib/python3/dist-packages/middlewared/job.py”, line 509, in run`
`await self.future`
`File “/usr/lib/python3/dist-packages/middlewared/job.py”, line 556, in __run_body`
`rv = await self.middleware.run_in_thread(self.method, *args)`
`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^`
`File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1367, in run_in_thread`
`return await self.run_in_executor(io_thread_pool_executor, method, *args, **kwargs)`
`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^`
`File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1364, in run_in_executor`
`return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))`
`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^`
`File “/usr/lib/python3.11/concurrent/futures/thread.py”, line 58, in run`
`result = self.fn(*self.args, **self.kwargs)`
`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^`
`File “/usr/lib/python3/dist-packages/middlewared/schema/processor.py”, line 183, in nf`
`return func(*args, **kwargs)`
`^^^^^^^^^^^^^^^^^^^^^`
`File “/usr/lib/python3/dist-packages/middlewared/schema/processor.py”, line 55, in nf`
`res = f(*args, **kwargs)`
`^^^^^^^^^^^^^^^^^^`
`File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/upgrade.py”, line 81, in upgrade`
`new_values = self.middleware.call_sync(`
`^^^^^^^^^^^^^^^^^^^^^^^^^^`
`File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1654, in call_sync`
`return self.run_coroutine(methodobj(*prepared_call.args))`
`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^`
`File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1694, in run_coroutine`
`return fut.result()`
`^^^^^^^^^^^^`
`File “/usr/lib/python3.11/concurrent/futures/_base.py”, line 449, in result`
`return self.__get_result()`
`^^^^^^^^^^^^^^^^^^^`
`File “/usr/lib/python3.11/concurrent/futures/_base.py”, line 401, in __get_result`
`raise self._exception`
`File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/schema_normalization.py”, line 34, in normalize_and_validate_values`
`dict_obj = await self.middleware.call(`
`^^^^^^^^^^^^^^^^^^^^^^^^^^^`
`File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1629, in call`
`return await self._call(`
`^^^^^^^^^^^^^^^^^`
`File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1460, in _call`
`return await methodobj(*prepared_call.args)`
`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^`
`File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/schema_validation.py”, line 37, in validate_values`
`verrors.check()`
`File “/usr/lib/python3/dist-packages/middlewared/service_exception.py”, line 72, in check`
`raise self`
`middlewared.service_exception.ValidationErrors: [EINVAL] values.nextcloud.postgres_image_selector: Invalid choice: postgres_13_image`

I tried going into the docker container itself and running the ./occ upgrade, but it says

/var/www/html# ./occ upgrade
No upgrade required.

Note: This command triggers the upgrade actions associated with a new version. The new version’s updated source files must be deployed in advance.
See the upgrade documentation: https://docs.nextcloud.com/server/31/go.php?to=admin-update for more information. 

Steps to replicate it (hint: details matter!):

  1. Attempt to update

  2. fail miserably

  3. cry

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

No logs when attempting to update, actually no logs in the last month or two

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "upgrade.disable-web": true,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "31.0.2.1",
        "overwrite.cli.url": "https:\/\/cloud.sekuritasit.com",
        "overwriteprotocol": "https",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "US",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpport": "587",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtptimeout": 30,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "maintenance_window_start": 1,
        "opcache.memory_consumption": 512,
        "trusted_domains": [
            "127.0.0.1",
            "172.16.0.104",
            "172.16.0.212",
            "cloud.sekuritasit.com",
            "localhost",
            "nextcloud"
        ]
    }
}

Apps

The output of occ app:list (if possible).

Enabled:

activity: 4.0.0

app_api: 5.0.2

bruteforcesettings: 4.0.0

circles: 31.0.0

cloud_federation_api: 1.14.0

comments: 1.21.0

contactsinteraction: 1.12.0

dashboard: 7.11.0

dav: 1.33.0

federatedfilesharing: 1.21.0

federation: 1.21.0

files: 2.3.1

files_downloadlimit: 4.0.0

files_pdfviewer: 4.0.0

files_reminders: 1.4.0

files_sharing: 1.23.1

files_trashbin: 1.21.0

files_versions: 1.24.0

firstrunwizard: 4.0.0

logreader: 4.0.0

lookup_server_connector: 1.19.0

nextcloud_announcements: 3.0.0

notifications: 4.0.0

oauth2: 1.19.1

password_policy: 3.0.0

photos: 4.0.0-dev.1

privacy: 3.0.0

profile: 1.0.0

provisioning_api: 1.21.0

recommendations: 4.0.0

related_resources: 2.0.0

serverinfo: 3.0.0

settings: 1.14.0

sharebymail: 1.21.0

support: 3.0.0

survey_client: 3.0.0

systemtags: 1.21.1

text: 5.0.0

theming: 2.6.1

twofactor_backupcodes: 1.20.0

updatenotification: 1.21.0

user_status: 1.11.0

viewer: 4.0.0

weather_status: 1.11.0

webhook_listeners: 1.2.0

workflowengine: 2.13.0
Disabled:

admin_audit: 1.21.0

encryption: 2.19.0

files_external: 1.23.0

suspicious_login: 9.0.1

twofactor_nextcloud_notification: 5.0.0

twofactor_totp: 13.0.0-dev.0

user_ldap: 1.22.0

I understand this could also be an issue for TrueNAS forums, if no solution can be found here, please let me know and I’ll copy post over to there.

Thank you in advance!

This looks likely to be related what you’re encountering. Presumably it’s something specific to the TrueNAS distributed “Nextcloud app”.

Postgres is a database (which Nextcloud can use).

I tried going into the docker container itself and running the ./occ upgrade, but it says

Yeah, that’s not how image based installs update so that part is expected behavior.

Yeah I figured it was the postgres, do I just need to wait for TrueNas to send out an updated postgres pkg?