truecharts / public

Community Helm Chart Repository
https://truecharts.org
GNU Affero General Public License v3.0
1.15k stars 620 forks source link

baikal - Insufficient permissions on the configuration folders #17573

Closed YoMamasNerd closed 1 month ago

YoMamasNerd commented 9 months ago

App Name

baikal

Operating System

TrueNAS SCALE 23.10.1

App Version

0.9.4

Application Events

``
2024-01-28 22:50:48
Created container baikal
2024-01-28 22:50:48
Started container baikal
2024-01-28 22:50:46
Add eth0 [172.16.1.6/16] from ix-net
2024-01-28 22:50:46
Container image "ckulka/baikal:0.9.4-nginx@sha256:1433f34408364e500c7da75cf9bff26103e2b52ee8de19b089ef002973578bcb" already present on machine
2024-01-28 22:50:44
Successfully assigned ix-baikal/baikal-78b46cd978-tgthz to ix-truenas
2024-01-28 22:50:42
Successfully provisioned volume pvc-117a77a5-7217-4052-883c-62ad861bd7d6
2024-01-28 22:50:42
0/1 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod..
2024-01-28 22:50:42
Successfully provisioned volume pvc-0f4b0187-9de4-40db-98a5-ef451013f495
2024-01-28 22:50:42
Updated LoadBalancer with new IPs: [] -> [192.168.178.111]
2024-01-28 22:50:41
waiting for a volume to be created, either by external provisioner "zfs.csi.openebs.io" or manually created by system administrator
2024-01-28 22:50:41
There are no available nodes for LoadBalancer
2024-01-28 22:50:41
Applied LoadBalancer DaemonSet kube-system/svclb-baikal-28163350
2024-01-28 22:50:41
Scaled up replica set baikal-78b46cd978 to 1
2024-01-28 22:50:41
0/1 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod..
2024-01-28 22:50:41
Created pod: baikal-78b46cd978-tgthz
2024-01-28 22:50:40
External provisioner is provisioning volume for claim "ix-baikal/baikal-config"
2024-01-28 22:50:40
External provisioner is provisioning volume for claim "ix-baikal/baikal-specific"
2024-01-28 22:50:40
Ensuring load balancer
2024-01-28 22:50:40
waiting for a volume to be created, either by external provisioner "zfs.csi.openebs.io" or manually created by system administrator
``

Application Logs

``
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-create-baikal-database-folder.sh
30-create-baikal-database-folder.sh: info: Creating new Baikal database folder
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/40-disable-nginx-ipv6-if-unsupported.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/40-fix-baikal-file-permissions.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/40-php-fpm.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/50-start-msmtp.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2024/01/28 22:50:48 [notice] 1#1: using the "epoll" event method
2024/01/28 22:50:48 [notice] 1#1: nginx/1.25.3
2024/01/28 22:50:48 [notice] 1#1: built by gcc 12.2.0 (Debian 12.2.0-14) 
2024/01/28 22:50:48 [notice] 1#1: OS: Linux 6.1.63-production+truenas
2024/01/28 22:50:48 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2024/01/28 22:50:48 [notice] 1#1: start worker processes
2024/01/28 22:50:48 [notice] 1#1: start worker process 49
2024/01/28 22:50:48 [notice] 1#1: start worker process 50
2024/01/28 22:50:48 [notice] 1#1: start worker process 51
2024/01/28 22:50:48 [notice] 1#1: start worker process 52
2024/01/28 22:50:48 [notice] 1#1: start worker process 53
2024/01/28 22:50:48 [notice] 1#1: start worker process 54
2024/01/28 22:50:48 [notice] 1#1: start worker process 55
2024/01/28 22:50:48 [notice] 1#1: start worker process 56
2024/01/28 22:50:48 [notice] 1#1: start worker process 57
2024/01/28 22:50:48 [notice] 1#1: start worker process 58
2024/01/28 22:50:48 [notice] 1#1: start worker process 59
2024/01/28 22:50:48 [notice] 1#1: start worker process 60
2024/01/28 22:51:00 [error] 50#50: *2 FastCGI sent in stderr: "PHP message: Symfony\Component\Yaml\Exception\ParseException: File "/var/www/baikal/config/baikal.yaml" does not exist. in /var/www/baikal/vendor/symfony/yaml/Parser.php:68
Stack trace:
#0 /var/www/baikal/vendor/symfony/yaml/Yaml.php(61): Symfony\Component\Yaml\Parser->parseFile()
#1 /var/www/baikal/Core/Frameworks/Flake/Framework.php(210): Symfony\Component\Yaml\Yaml::parseFile()
#2 /var/www/baikal/Core/Frameworks/Flake/Framework.php(175): Flake\Framework::defineBaseUri()
#3 /var/www/baikal/html/index.php(49): Flake\Framework::bootstrap()
#4 {main}PHP message: Error reading baikal.yaml file : File "/var/www/baikal/config/baikal.yaml" does not exist" while reading response header from upstream, client: 172.16.0.1, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "172.16.1.6:80"
172.16.0.1 - - [28/Jan/2024:22:51:00 +0100] "GET / HTTP/1.1" 302 5 "-" "kube-probe/1.26" "-"
2024/01/28 22:51:00 [error] 51#51: *4 FastCGI sent in stderr: "PHP message: Symfony\Component\Yaml\Exception\ParseException: File "/var/www/baikal/config/baikal.yaml" does not exist. in /var/www/baikal/vendor/symfony/yaml/Parser.php:68
Stack trace:
#0 /var/www/baikal/vendor/symfony/yaml/Yaml.php(61): Symfony\Component\Yaml\Parser->parseFile()
#1 /var/www/baikal/Core/Frameworks/Flake/Framework.php(210): Symfony\Component\Yaml\Yaml::parseFile()
#2 /var/www/baikal/Core/Frameworks/Flake/Framework.php(175): Flake\Framework::defineBaseUri()
#3 /var/www/baikal/html/admin/install/index.php(57): Flake\Framework::bootstrap()
#4 {main}PHP message: Error reading baikal.yaml file : File "/var/www/baikal/config/baikal.yaml" does not exist.PHP message: Error reading baikal.yaml file : File "/var/www/baikal/config/baikal.yaml" does not exist" while reading response header from upstream, client: 172.16.0.1, server: _, request: "GET /admin/install/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "172.16.1.6:80", referrer: "http://172.16.1.6:80/"
172.16.0.1 - - [28/Jan/2024:22:51:00 +0100] "GET /admin/install/ HTTP/1.1" 200 229 "http://172.16.1.6:80/" "kube-probe/1.26" "-"
2024/01/28 22:51:05 [error] 53#53: *7 FastCGI sent in stderr: "PHP message: Symfony\Component\Yaml\Exception\ParseException: File "/var/www/baikal/config/baikal.yaml" does not exist. in /var/www/baikal/vendor/symfony/yaml/Parser.php:68
Stack trace:
#0 /var/www/baikal/vendor/symfony/yaml/Yaml.php(61): Symfony\Component\Yaml\Parser->parseFile()
#1 /var/www/baikal/Core/Frameworks/Flake/Framework.php(210): Symfony\Component\Yaml\Yaml::parseFile()
#2 /var/www/baikal/Core/Frameworks/Flake/Framework.php(175): Flake\Framework::defineBaseUri()
#3 /var/www/baikal/html/index.php(49): Flake\Framework::bootstrap()
#4 {main}PHP message: Error reading baikal.yaml file : File "/var/www/baikal/config/baikal.yaml" does not exist" while reading response header from upstream, client: 172.16.0.1, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "172.16.1.6:80"
2024/01/28 22:51:05 [error] 52#52: *6 FastCGI sent in stderr: "PHP message: Symfony\Component\Yaml\Exception\ParseException: File "/var/www/baikal/config/baikal.yaml" does not exist. in /var/www/baikal/vendor/symfony/yaml/Parser.php:68
Stack trace:
#0 /var/www/baikal/vendor/symfony/yaml/Yaml.php(61): Symfony\Component\Yaml\Parser->parseFile()
#1 /var/www/baikal/Core/Frameworks/Flake/Framework.php(210): Symfony\Component\Yaml\Yaml::parseFile()
#2 /var/www/baikal/Core/Frameworks/Flake/Framework.php(175): Flake\Framework::defineBaseUri()
#3 /var/www/baikal/html/index.php(49): Flake\Framework::bootstrap()
#4 {main}PHP message: Error reading baikal.yaml file : File "/var/www/baikal/config/baikal.yaml" does not exist" while reading response header from upstream, client: 172.16.0.1, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "172.16.1.6:80"
172.16.0.1 - - [28/Jan/2024:22:51:05 +0100] "GET / HTTP/1.1" 302 5 "-" "kube-probe/1.26" "-"
172.16.0.1 - - [28/Jan/2024:22:51:05 +0100] "GET / HTTP/1.1" 302 5 "-" "kube-probe/1.26" "-"
2024/01/28 22:51:05 [error] 54#54: *11 FastCGI sent in stderr: "PHP message: Symfony\Component\Yaml\Exception\ParseException: File "/var/www/baikal/config/baikal.yaml" does not exist. in /var/www/baikal/vendor/symfony/yaml/Parser.php:68
Stack trace:
#0 /var/www/baikal/vendor/symfony/yaml/Yaml.php(61): Symfony\Component\Yaml\Parser->parseFile()
#1 /var/www/baikal/Core/Frameworks/Flake/Framework.php(210): Symfony\Component\Yaml\Yaml::parseFile()
#2 /var/www/baikal/Core/Frameworks/Flake/Framework.php(175): Flake\Framework::defineBaseUri()
#3 /var/www/baikal/html/admin/install/index.php(57): Flake\Framework::bootstrap()
#4 {main}PHP message: Error reading baikal.yaml file : File "/var/www/baikal/config/baikal.yaml" does not exist.PHP message: Error reading baikal.yaml file : File "/var/www/baikal/config/baikal.yaml" does not exist" while reading response header from upstream, client: 172.16.0.1, server: _, request: "GET /admin/install/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "172.16.1.6:80", referrer: "http://172.16.1.6:80/"
2024/01/28 22:51:05 [error] 55#55: *10 FastCGI sent in stderr: "PHP message: Symfony\Component\Yaml\Exception\ParseException: File "/var/www/baikal/config/baikal.yaml" does not exist. in /var/www/baikal/vendor/symfony/yaml/Parser.php:68
Stack trace:
#0 /var/www/baikal/vendor/symfony/yaml/Yaml.php(61): Symfony\Component\Yaml\Parser->parseFile()
#1 /var/www/baikal/Core/Frameworks/Flake/Framework.php(210): Symfony\Component\Yaml\Yaml::parseFile()
#2 /var/www/baikal/Core/Frameworks/Flake/Framework.php(175): Flake\Framework::defineBaseUri()
#3 /var/www/baikal/html/admin/install/index.php(57): Flake\Framework::bootstrap()
#4 {main}PHP message: Error reading baikal.yaml file : File "/var/www/baikal/config/baikal.yaml" does not exist.PHP message: Error reading baikal.yaml file : File "/var/www/baikal/config/baikal.yaml" does not exist" while reading response header from upstream, client: 172.16.0.1, server: _, request: "GET /admin/install/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "172.16.1.6:80", referrer: "http://172.16.1.6:80/"
172.16.0.1 - - [28/Jan/2024:22:51:05 +0100] "GET /admin/install/ HTTP/1.1" 200 229 "http://172.16.1.6:80/" "kube-probe/1.26" "-"
172.16.0.1 - - [28/Jan/2024:22:51:05 +0100] "GET /admin/install/ HTTP/1.1" 200 229 "http://172.16.1.6:80/" "kube-probe/1.26" "-"
2024/01/28 22:51:15 [error] 57#57: *15 FastCGI sent in stderr: "PHP message: Symfony\Component\Yaml\Exception\ParseException: File "/var/www/baikal/config/baikal.yaml" does not exist. in /var/www/baikal/vendor/symfony/yaml/Parser.php:68
``

Application Configuration

baikal

Describe the bug

Baikal is deploying fine but isn't able to access needed files. Error - Insufficient permissions on the configuration folders In order to work properly, Baïkal needs to have write permissions in the Specific/ and config/ folder.

To Reproduce

  1. Install app
  2. let it deploy
  3. open app url
  4. get error

Expected Behavior

  1. Install app
  2. let it deploy
  3. open app url
  4. use app

Screenshots

N/A

Additional Context

#k3s kubectl get all -n ix-baikal 

NAME                          READY   STATUS    RESTARTS   AGE
pod/baikal-78b46cd978-tgthz   1/1     Running   0          25m

NAME             TYPE           CLUSTER-IP      EXTERNAL-IP       PORT(S)     AGE
service/baikal   LoadBalancer   172.17.87.247   192.168.178.111   10293/TCP   25m

NAME                     READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/baikal   1/1     1            1           25m

NAME                                DESIRED   CURRENT   READY   AGE
replicaset.apps/baikal-78b46cd978   1         1         1       25m

I've read and agree with the following

sethidden commented 5 months ago

A quick fix is to make sure that the owner of the data and config folders (and their contents) in the host is 101:101

chown -R 101:101 data config

This is because inside the container the UID 101 is running the nginx process (open shell inside container and run ps -aux and cat /etc/passwd | grep 101

alfi0812 commented 1 month ago

Closing as SCALE isnt a supported platform any longer. Feel free to open a new Issue if the issue persists on one of the currently supported platforms.

truecharts-admin commented 1 week ago

This issue is locked to prevent necro-posting on closed issues. Please create a new issue or contact staff on discord of the problem persists