Skip to content

[BUG] <title>This container runs commands “update-ca-certificates” invalid #459

@samfor12

Description

@samfor12

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

#After connecting to S3 storage, I found that NextCloud cannot access it
#I went to NextCloud's log center

S3Exception
Error executing "PutObject" on "https://haproxy:9000/nextcloud/urn%3Aoid%3A226"; AWS HTTP error: cURL error 60: SSL certificate problem: self-signed certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://haproxy:9000/nextcloud/urn%3Aoid%3A226
Exception thrown: Aws\S3\Exception\S3Exception

#This log clearly tells us that the system did not trust this certificate

Expected Behavior

After these operations are executed and my minio S3 storage is functioning properly, NextCloud will work properly and store the data in the S3 backend

Steps To Reproduce

#1. I will first copy a CA certificate to/usr/share/ca certificates/mozilla/
docker cp CA-cloud.com.crt nextcloud1:/usr/share/ca-certificates/mozilla/
#Entering the interior of the container
docker exec -it nextcloud1 bash
#2. edit /etc/ca-certificates.conf
nano /etc/ca-certificates.conf
#3. Go to the end of the file and add mozilla/CA-cloud.com.crt
#4. RUN update-ca-certificates
update-ca-certificates

#5. not output
#6. But the original NextCloud container has relevant output and will trust this certificate normally
#7. Add S3 storage configuration

vi /home/nextcloud1/appdata/www/nextcloud/config/config.php

  'objectstore' => [
          'class' => '\\OC\\Files\\ObjectStore\\S3',
          'arguments' => [
                  'bucket' => 'nextcloud',
                  'hostname' => 'minio',
                  'key' => 'minioadmin',
                  'secret' => 'minioadmin',
                  'port' => 9000,
                  // required for some non-Amazon S3 implementations
                  'use_path_style' => true,
          ],
],

#8. Once added, you will immediately be unable to access NextCloud

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

#Unless the configuration files stored in S3 are removed
vi /home/nextcloud1/appdata/www/nextcloud/config/config.php

//  'objectstore' => [
//         'class' => '\\OC\\Files\\ObjectStore\\S3',
//          'arguments' => [
//                  'bucket' => 'nextcloud',
//                  'hostname' => 'haproxy',
//                  'key' => 'minioadmin',
//                  'secret' => 'minioadmin',
//                  'port' => 9000,
//                  // required for some non-Amazon S3 implementations
 //                 'use_path_style' => true,
//          ],
//],

#I went to NextCloud's log center

S3Exception
Error executing "PutObject" on "https://haproxy:9000/nextcloud/urn%3Aoid%3A226"; AWS HTTP error: cURL error 60: SSL certificate problem: self-signed certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://haproxy:9000/nextcloud/urn%3Aoid%3A226
Exception thrown: Aws\S3\Exception\S3Exception

#This log clearly tells us that the system did not trust this certificate

Environment

- OS:rocky8
- How docker service was installed:
Use the official yum source provided by Docker to install

CPU architecture

x86-64

Docker creation

docker run -d  --name=nextcloud1 --restart=always   --net minio_to_haproxy_network -p 3958:443 -v /home/nextcloud1/appdata:/config -v /home/nextcloud1/data:/data  linuxserver/nextcloud:latest

Container logs

using keys found in /config/keys
[custom-init] No custom files found, skipping...
[ls.io-init] done.
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    911
User GID:    911
───────────────────────────────────────

using keys found in /config/keys
[custom-init] No custom files found, skipping...
[ls.io-init] done.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions