Open melbruki opened 1 year ago
Hi @melbruki, could you please update your values.yaml code block to use three backticks and the word yaml like this:
```yaml myyamlhere: myvalue ```
This makes it render with syntax highlighting, which makes it a little easier to read:
myyamlhere: myvalue
ok done, let me know if you need anything else
Thank you! It looks like you still have an extra backtick before and after your yaml code, so it renders the entire thing as blue, instead of blue and green. Sorry for the extra hassle on this btw. I have a reading disability and syntax highlighting just helps break up the code so I can view it better. Otherwise I end up copying and pasting the code block into an editor where I can see the colors better, which just lengthens the time it takes for me to evaluate an issue quickly.
On your actual configuration, it looks ok from what I can tell though. Can you try again on helm chart version 4.0.0
and also try enabling debug logging? You can do that with the following in your values.yaml:
nextcloud:
configs:
# log levels: 0=debug, 1=info, 2=warn, 3=error, 4=fatal
logging.config.php: |-
<?php
$CONFIG = array (
'log_type' => 'file',
'logfile' => 'nextcloud.log',
'loglevel' => 0,
'logdateformat' => 'F d, Y H:i:s'
);
After adding syntax highlighting to your values.yaml code block, I noticed your externalDatabase.host
is set to my-mariadb-galera
. Can you try setting it to hostname + :$PORT
. I don't use mariadb galera, but according to the docs, I think you'd want either mariadb-galera:3306
, or mariadb-galera:4567
.
I am suggesting this, because when using postgresql I pass in localhost:5432
for my externalDatabase.host
.
It also looks like you have persistence enabled, so another thing to try would be to see if disabling persistence produces the same error (after fixing the externalDatabase.host
).
Thanks I actually donβt have any issue using Mariadb galera the problem only comes in when I try to use the distributed sentinel redis . If I donβt modify the config.php everything works as expected. Anytime I try to modify the config.php I get that error . I think in order to get redis sentinel working I have to modify config.php
Sorry, I misread your issue! π
I'm now up to speed and looking at your redis config. I did want to note that your nextcloud.phpconfigs
value did seem to be null instead of {} or being removed entirely, but I don't think that matters. Also want to note that I haven't worked with redis and nextcloud a ton, so others in the community might have a better idea of how to proceed, but I'll rubberduck on this regardless.
Here's the important parts we're working with from your full values.yaml for easy reference:
nextcloud:
# Default config files
defaultConfigs:
# Redis default configuration
redis.config.php: false
# Extra config files created in /var/www/html/config/
configs:
redis.config-sentinel.php: |-
<?php
$CONFIG = [
'memcache.local' => '\\OC\\Memcache\\Redis',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' => [
'host' => 'nextcloud-redis',
'port' => 6379,
'timeout' => 0,
],
];
## Redis chart configuration
## for more options see https://github.com/bitnami/charts/tree/master/bitnami/redis
redis:
enabled: true
sentinel:
enabled: true
auth:
enabled: true
password: 'changeme'
master:
persistence:
enabled: true
storageClass: rook-cephfs
accessModes:
- ReadWriteOnce
size: 8Gi
replica:
persistence:
enabled: true
storageClass: rook-cephfs
accessModes:
- ReadWriteOnce
size: 8Gi
From your logs:
Configuration was not read or initialized correctly, not overwriting /var/www/html/config/config.php
So, I think that means something wasn't initialized correctly with the file you passed in. Perhaps you need your nextcloud.configs.redis.config-sentinel.php
to more closely match the one we create for you if nextcloud.defaultConfigs.redis.config.php
is true
:
It looks like the main difference is you're passing in 'timeout' => 0,
but not password, and we're specifying 'password' => getenv('REDIS_HOST_PASSWORD'),
but no timeout
. We're also grabbing the host/port from env vars.
Can you try changing your redis host, port, and password values in nextcloud.configs.redis.config-sentinel.php
?
Thank you Iβll give that a try
@jessebot I'm bumping this up.
The issue arise with the chart latest version everytime a configs: array is added to the values.yaml.
That results in additionnal foo.config.php files created in the config directory in the nextcloud pod, but the config.php itself is existing but empty !
Removing the extra configs: array from values actually populates the config.php file.
I'm having the same issue regarding the code snippet to declare trusted_proxies.
EDIT:
Adding the nextcloud.configs array, does add this to the deployment template :
129 β > - name: nextcloud-config
130 β > mountPath: /var/www/html/config/proxy.config.php
131 β > subPath: proxy.config.php
132 β > - name: nextcloud-config
133 β > mountPath: /var/www/html/config/.htaccess
134 β > subPath: .htaccess
135 β > - name: nextcloud-config
136 β > mountPath: /var/www/html/config/apache-pretty-urls.config.php
137 β > subPath: apache-pretty-urls.config.php
138 β > - name: nextcloud-config
139 β > mountPath: /var/www/html/config/apcu.config.php
140 β > subPath: apcu.config.php
141 β > - name: nextcloud-config
142 β > mountPath: /var/www/html/config/apps.config.php
143 β > subPath: apps.config.php
144 β > - name: nextcloud-config
145 β > mountPath: /var/www/html/config/autoconfig.php
146 β > subPath: autoconfig.php
147 β > - name: nextcloud-config
148 β > mountPath: /var/www/html/config/redis.config.php
149 β > subPath: redis.config.php
150 β > - name: nextcloud-config
151 β > mountPath: /var/www/html/config/smtp.config.php
152 β > subPath: smtp.config.php
No config.php is created.
@jessebot I'm bumping this up.
The issue arise with the chart latest version everytime a configs: array is added to the values.yaml.
That results in additionnal foo.config.php files created in the config directory in the nextcloud pod, but the config.php itself is existing but empty !
Removing the extra configs: array from values actually populates the config.php file.
I'm having the same issue regarding the code snippet to declare trusted_proxies.
EDIT:
Adding the nextcloud.configs array, does add this to the deployment template :
129 β > - name: nextcloud-config 130 β > mountPath: /var/www/html/config/proxy.config.php 131 β > subPath: proxy.config.php 132 β > - name: nextcloud-config 133 β > mountPath: /var/www/html/config/.htaccess 134 β > subPath: .htaccess 135 β > - name: nextcloud-config 136 β > mountPath: /var/www/html/config/apache-pretty-urls.config.php 137 β > subPath: apache-pretty-urls.config.php 138 β > - name: nextcloud-config 139 β > mountPath: /var/www/html/config/apcu.config.php 140 β > subPath: apcu.config.php 141 β > - name: nextcloud-config 142 β > mountPath: /var/www/html/config/apps.config.php 143 β > subPath: apps.config.php 144 β > - name: nextcloud-config 145 β > mountPath: /var/www/html/config/autoconfig.php 146 β > subPath: autoconfig.php 147 β > - name: nextcloud-config 148 β > mountPath: /var/www/html/config/redis.config.php 149 β > subPath: redis.config.php 150 β > - name: nextcloud-config 151 β > mountPath: /var/www/html/config/smtp.config.php 152 β > subPath: smtp.config.php
No config.php is created.
i think you described the problem exactly , did you get this resolved?
just noticed this issue again after @melbruki pointed it out in #449. From that issue, can you let me know what's in the config.php that you need? I explained a bit more here: https://github.com/nextcloud/helm/issues/449#issuecomment-1794759246
Description:
While deploying Nextcloud using the Helm Chart version 3.5.21 on a Kubernetes cluster, I encountered a repeated error in nextcloud.log indicating that the configuration was not read or initialized correctly, which prevented the Nextcloud instance from operating as expected.
Log Output:
Steps to Reproduce:
Deploy Nextcloud using Helm Chart version 3.5.21 with specific Redis configuration. Observe the above error in nextcloud.log. Expected Behavior:
Nextcloud should correctly initialize and apply the configuration without any issues.
Actual Behavior:
Nextcloud fails to initialize the configuration and throws the error
Additional Configuration Details:
Below is the values.yaml file I used during the deployment: