Open Dual-0 opened 5 days ago
When I disable files_versions_s3 I can see versions but no new versions are created, even if I change the markdown file
Found this in log of Nextcloud 30.0.1 RC1
{"reqId":"cOAgjxP9vHa2M3iRD06e","level":3,"time":"2024-10-03T19:50:21+00:00","remoteAddr":"x.x.x.x","user":"test","app":"no app in context","method":"POST","url":"/apps/text/session/461/save","message":"Exception thrown: Aws\\S3\\Exception\\S3Exception","userAgent":"Mozilla/5.0 (Wind NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36","version":"30.0.1.0","exception":{"Exception":"Aws\\S3\\Exception\\S3Exception","Message":"Error executing \"ListObjectVersions\" on \"https://xxxxxxxx-xxxx-xxxx-xxxxx-xxxxxxxxxxxx.fsn1.your-objectstorage.com/xxxxxxxx-xxxx-xxxx-xxxxx-xxxxxxxxxxxx?versions&prefix=urn%3Aoid%3A461\"; AWS HTTP error: Client error: `GET https://xxxxxxxx-xxxx-xxxx-xxxxx-xxxxxxxxxxxx.fsn1.your-objectstorage.com/xxxxxxxx-xxxx-xxxx-xxxxx-xxxxxxxxxxxx?versions&prefix=urn%3Aoid%3A461` resulted in a `404 Not Found` response:\nNoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
NoSuchKey
If ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx
is your bucket name and it's embedded in your hostname
then your configuration is likely wrong:
'bucket' => 'ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
'key' => '<supersecret-accesskey>',
'secret' => '<superdupersecret-key>',
'hostname' => 'ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx.fsn1.your-objectstorage.com',
'use_ssl' => true,
'use_path_style' => true,
You likely do not want use_path_style
on given the rest of your provided config: https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html#simple-storage-service-s3
I'm actually surprised your storage is working at all, let alone versioning.
When I delete use_path_style
the S3 storage doesnt work:
'bucket' => 'ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
'key' => '<supersecret-accesskey>',
'secret' => '<superdupersecret-key>',
'hostname' => 'ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx.fsn1.your-objectstorage.com',
'use_ssl' => true,
'use_path_style' => false,
'autocreate' => true,
'verify_bucket_exists' => true,
'sse_c_key' => '<supersecret32bitkey>',
``` \[index\] Fehler: Exception thrown: OCP\\Files\\GenericFileException GET /apps/theming/icon/settings?v=0 von x.x.x.x von user um 05.10.2024, 10:51:32 \[PHP\] Fehler: fopen(): SSL operation failed with code 1. OpenSSL Error messages: error:0A000086:SSL routines::certificate verify failed at /var/www/nc/lib/private/Files/ObjectStore/S3ObjectTrait.php#72 GET /apps/theming/icon/settings?v=0 von x.x.x.x von user um 05.10.2024, 10:51:38 \[PHP\] Fehler: fopen(): Failed to enable crypto at /var/www/nc/lib/private/Files/ObjectStore/S3ObjectTrait.php#72 GET /apps/theming/icon/settings?v=0 von x.x.x.x von user um 05.10.2024, 10:51:38 \[PHP\] Fehler: fopen(https://xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx.xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx.fsn1.your-objectstorage.com/urn%3Aoid%3A559): Failed to open stream: operation failed at /var/www/nc/lib/private/Files/ObjectStore/S3ObjectTrait.php#72 GET /apps/theming/icon/settings?v=0 von x.x.x.x von user um 05.10.2024, 10:51:38 \[PHP\] Fehler: fopen(httpseek://): Failed to open stream: "OC\\Files\\Stream\\SeekableHttpStream::stream_open" call failed at /var/www/nc/lib/private/Files/Stream/SeekableHttpStream.php#49 GET /apps/theming/icon/settings?v=0 von x.x.x.x von user um 05.10.2024, 10:51:38 \[objectstore\] Fehler: Could not get object urn:oid:559 for file appdata_ocz3g7tcm4z2/theming/global/0/touchIcon-settings#00679e GET /apps/theming/icon/settings?v=0 von x.x.x.x von user um 05.10.2024, 10:51:38 ```
'bucket' => 'ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
'key' => '<supersecret-accesskey>',
'secret' => '<superdupersecret-key>',
'hostname' => 'fsn1.your-objectstorage.com',
'use_ssl' => true,
'use_path_style' => false,
'autocreate' => true,
'verify_bucket_exists' => true,
'sse_c_key' => '<supersecret32bitkey>',
``` [PHP] Fehler: fopen(https://ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx.your-objectstorage.com/urn%3Aoid%3A528): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found at /var/www/nc/lib/private/Files/ObjectStore/S3ObjectTrait.php#72 PUT /apps/text/session/461/create von x.x.x.x von test um 05.10.2024, 11:07:32 ```
I my opinion the path in the last eample should be https://ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx.your-objectstorage.com/ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx/urn%3Aoid%3A528
. Nextcloud creates a subfolder with the bucket name...
This can be done with the config in the first post:
'bucket' => 'ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
'key' => '<supersecret-accesskey>',
'secret' => '<superdupersecret-key>',
'hostname' => 'ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx.fsn1.your-objectstorage.com',
'use_ssl' => true,
'use_path_style' => true,
'autocreate' => true,
'verify_bucket_exists' => true,
'sse_c_key' => '<supersecret32bitkey>',
But when I create a "new version" I see only the current version... and get this confusing log entry
``` [PHP] Fehler: fopen(https://ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx/ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx/urn%3Aoid%3A461): Failed to open stream: php_network_getaddresses: getaddrinfo for 0a20899a-59d9-1c5f-0734-cddcfdea3dfe failed: Temporary failure in name resolution at /var/www/nc/lib/private/Files/ObjectStore/S3ObjectTrait.php#72 POST /apps/text/session/461/save von x.x.x.x von test um 05.10.2024, 12:15:54 ```
Seems like the S3 implementation from Nextcloud doesn't match the Hetzner Object Storage (minio) https://docs.hetzner.com/storage/object-storage/getting-started/using-s3-api-tools
Hello,
I spin up a new instance with nginx, php-fpm 8.3 and Nextcloud 30.0 to test the new Hetzner S3 Object Storage (Minio) The primary S3 Storage is working great but I don't see any versions with files_versions_s3.
Steps to reproduce
ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
from hostname inconfig.php
In WrappedHttpHandler.php line 196:
Error executing "GetBucketVersioning" on "https://ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx.fsn1.your-objectstorage.com/ ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx?versioning"; AWS HTTP error: Client error:ef3fdd38-xxxx-xxxx-xxx (truncated...)
NoSuchKey (client): - <?xml version="1.0" encoding="UTF-8"?> <Buck
etName>ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-fsn1-pr
od1-ceph3 xxxxa-fsn1-prod1-ceph3-fsn1-prod1
GET https://ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx.fsn1.your-objectstorage.com/ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx?versioning
resulted in a404 Not Found
response: <?xml version="1.0" encoding="UTF-8"?>NoSuchKey
NoSuchKey
root@host:/var/www/nc# sudo -u www-data php occ files_versions_s3:status
root@host:/var/www/nc# sudo -u www-data php occ files_versions_s3:enable primary
root@host:/var/www/nc# sudo -u www-data php occ files_versions_s3:status
root@host2:~/minio$ ./mc version enable CLOUD/ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx CLOUD/ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx versioning is enabled
root@host2:~/minio$ ./mc stat CLOUD/ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx Name : ef3fdd38-xxxx-xxxx-xxxx-xxxxxxxxxxxx Date : 2024-10-01 21:56:20 UTC Size : N/A Type : folder
Properties: Versioning: Enabled Location: fsn1-prod1 Anonymous: Disabled ILM: Enabled
Usage: Total size: 0 B Objects count: 0 Versions count: 0
root@host:/var/www/nc# sudo -u www-data php occ app:list Enabled:
Browser
Browser name: Vivaldi
Browser version: 6.9.3447.48
Operating system: Windows