Nextcloud upgrade failing

jeb0921

Cadet
Joined
Feb 21, 2022
Messages
3
I show an upgrade to Nextcloud from truenas charts, but when I do, I get a failed upgrade the error is as follows

UPGRADE FAILED: template: nextcloud/templates/nginx-configmap.yaml:

this has been happening for a few days now. Sorry for my lack of knowledge here, I am new to TrueNas, but loving it so far.
 

JeanCFS

Cadet
Joined
Jul 15, 2023
Messages
8
Same here, UPGRADE or INSTALLATION. My log:

Code:
Error: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 428, in run
    await self.future
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 463, in __run_body
    rv = await self.method(*([self] + args))
  File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1246, in nf
    res = await f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1378, in nf
    return await func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/chart_release.py", line 486, in do_create
    await self.middleware.call(
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1395, in call
    return await self._call(
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1355, in _call
    return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1258, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/helm.py", line 44, in helm_action
    raise CallError(f'Failed to {tn_action} chart release: {stderr.decode()}')
middlewared.service_exception.CallError: [EFAULT] Failed to install chart release: Error: INSTALLATION FAILED: template: nextcloud/templates/nginx-configmap.yaml:9:48: executing "nextcloud/templates/nginx-configmap.yaml" at <.Values.nginxConfig.externalAccessPort>: nil pointer evaluating interface {}.externalAccessPort
 

truenas-user

Cadet
Joined
Sep 1, 2023
Messages
1
I also have this same error when trying to update:

[EFAULT] Failed to upgrade chart release: Error: UPGRADE FAILED: template: nextcloud/templates/nginx-configmap.yaml:9:48: executing "nextcloud/templates/nginx-configmap.yaml" at <.Values.nginxConfig.externalAccessPort>: nil pointer evaluating interface {}.externalAccessPort

Code:
Error: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 428, in run
    await self.future
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 463, in __run_body
    rv = await self.method(*([self] + args))
  File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1378, in nf
    return await func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1246, in nf
    res = await f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/upgrade.py", line 115, in upgrade
    await self.upgrade_chart_release(job, release, options)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/upgrade.py", line 298, in upgrade_chart_release
    await self.middleware.call('chart.release.helm_action', release_name, chart_path, config, 'upgrade')
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1395, in call
    return await self._call(
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1355, in _call
    return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1258, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/helm.py", line 44, in helm_action
    raise CallError(f'Failed to {tn_action} chart release: {stderr.decode()}')
middlewared.service_exception.CallError: [EFAULT] Failed to upgrade chart release: Error: UPGRADE FAILED: template: nextcloud/templates/nginx-configmap.yaml:9:48: executing "nextcloud/templates/nginx-configmap.yaml" at <.Values.nginxConfig.externalAccessPort>: nil pointer evaluating interface {}.externalAccessPort

 
 

JeanCFS

Cadet
Joined
Jul 15, 2023
Messages
8
Same here, UPGRADE or INSTALLATION. My log:

Code:
Error: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 428, in run
    await self.future
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 463, in __run_body
    rv = await self.method(*([self] + args))
  File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1246, in nf
    res = await f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1378, in nf
    return await func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/chart_release.py", line 486, in do_create
    await self.middleware.call(
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1395, in call
    return await self._call(
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1355, in _call
    return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1258, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/helm.py", line 44, in helm_action
    raise CallError(f'Failed to {tn_action} chart release: {stderr.decode()}')
middlewared.service_exception.CallError: [EFAULT] Failed to install chart release: Error: INSTALLATION FAILED: template: nextcloud/templates/nginx-configmap.yaml:9:48: executing "nextcloud/templates/nginx-configmap.yaml" at <.Values.nginxConfig.externalAccessPort>: nil pointer evaluating interface {}.externalAccessPort

I found a solution:

In the "Certificate Configuration" section of Nextcloud (Official, not Truecharts), I deleted my certificate and recreated it. After doing this, everything is working fine now.
 

jeb0921

Cadet
Joined
Feb 21, 2022
Messages
3
I found that the certificate section in Nextcloud settings was blank. Selected Freeness_Default and saved it. then upgraded and everything worked fine. Happy again. Thanks JeanCFS for the certificate info, I never would have thought to look there. I didn't have to delete and recreate, only pick a default certificate
 

JeanCFS

Cadet
Joined
Jul 15, 2023
Messages
8
I found that the certificate section in Nextcloud settings was blank. Selected Freeness_Default and saved it. then upgraded and everything worked fine. Happy again. Thanks JeanCFS for the certificate info, I never would have thought to look there. I didn't have to delete and recreate, only pick a default certificate
Great! :smile:
I'm happy to hear that you were able to resolve your issue!
 

Satchel5197

Cadet
Joined
Sep 4, 2023
Messages
2
I am currently having this same issue. I did add a certificate, which allowed for the upgrade, but that then breaks my HAProxy reverse, and starts giving me a 400 Bad Request Error, a HTTP request was sent to an HTTPS port. I went through and checked to confirm everything was configured correctly, and have found nothing that would just now start to cause this issue.
 

JeanCFS

Cadet
Joined
Jul 15, 2023
Messages
8
I am currently having this same issue. I did add a certificate, which allowed for the upgrade, but that then breaks my HAProxy reverse, and starts giving me a 400 Bad Request Error, a HTTP request was sent to an HTTPS port. I went through and checked to confirm everything was configured correctly, and have found nothing that would just now start to cause this issue.
You can try removing the certificate, as it might be specific to the penultimate version. I did the same because I use Cloudflared, and with the latest version, the issue didn't occur.
 

Satchel5197

Cadet
Joined
Sep 4, 2023
Messages
2
You can try removing the certificate, as it might be specific to the penultimate version. I did the same because I use Cloudflared, and with the latest version, the issue didn't occur.
Yes, I did attempt this, when that is done, I receive this error when the nginx container portion is launching:

```
Startup probe failed: Get "http://172.16.0.103:80/status.php": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
 
Top