Cannot move video to storage

Bonjour, j’essaie de passer au stockage s3 avec un serveur local sur minio. Je peux avoir accès à la console et y uploader un fichier. Par contre lorsque je publie un nouvau vidéo j’ai une erreur « Cannot move video ».

Le vidéo est tout de même accessible en local: https://tv.atmx.ca/w/7Dc56ugsAXye6Xzk9EbRg6

L’accès au bucket est public. Voyez vous des erreurs de config?

Voici ma config peertube:

object_storage:
  enabled: true
  endpoint: 's3.atmx.ca' 
  region: 'ca-central-1'
  upload_acl:
    public: 'null'
    private: 'null'
  proxy:
    proxify_private_files: true
  credentials:
    access_key_id: 'xxx'
    secret_access_key: 'xxx'
  max_upload_part: 100MB
  streaming_playlists:
    bucket_name: 'peertube'
    prefix: 'streaming-playlists/'
    base_url: ''
  web_videos:
    bucket_name: 'peertube'
    prefix: 'web-videos/'
    base_url: ''

Et l’erreur:

error[2024-01-02, 12:57:31 p.m.] Cannot move video https://tv.atmx.ca/videos/watch/35c82c87-d3d5-40f5-b94c-e3d7ed0b787f storage.

{
  "err": {
    "stack": "403: UnknownError\n    at throwDefaultError (/var/www/peertube/versions/peertube-v6.0.2/node_modules/@smithy/smithy-client/dist-cjs/default-error-handler.js:8:22)\n    at /var/www/peertube/versions/peertube-v6.0.2/node_modules/@smithy/smithy-client/dist-cjs/default-error-handler.js:18:39\n    at de_PutObjectCommandError (/var/www/peertube/versions/peertube-v6.0.2/node_modules/@aws-sdk/client-s3/dist-cjs/protocols/Aws_restXml.js:5721:12)\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async /var/www/peertube/versions/peertube-v6.0.2/node_modules/@smithy/middleware-serde/dist-cjs/deserializerMiddleware.js:7:24\n    at async /var/www/peertube/versions/peertube-v6.0.2/node_modules/@aws-sdk/middleware-signing/dist-cjs/awsAuthMiddleware.js:14:20\n    at async /var/www/peertube/versions/peertube-v6.0.2/node_modules/@smithy/middleware-retry/dist-cjs/retryMiddleware.js:27:46\n    at async /var/www/peertube/versions/peertube-v6.0.2/node_modules/@aws-sdk/middleware-flexible-checksums/dist-cjs/flexibleChecksumsMiddleware.js:57:20\n    at async /var/www/peertube/versions/peertube-v6.0.2/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/region-redirect-endpoint-middleware.js:14:24\n    at async /var/www/peertube/versions/peertube-v6.0.2/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/region-redirect-middleware.js:9:20\n    at async /var/www/peertube/versions/peertube-v6.0.2/node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js:7:26\n    at async Promise.all (index 0)\n    at async Upload.__uploadUsingPut (/var/www/peertube/versions/peertube-v6.0.2/node_modules/@aws-sdk/lib-storage/dist-cjs/Upload.js:66:26)\n    at async Upload.__doConcurrentUpload (/var/www/peertube/versions/peertube-v6.0.2/node_modules/@aws-sdk/lib-storage/dist-cjs/Upload.js:128:28)\n    at async Promise.all (index 0)\n    at async Upload.__doMultipartUpload (/var/www/peertube/versions/peertube-v6.0.2/node_modules/@aws-sdk/lib-storage/dist-cjs/Upload.js:211:9)\n    at async Upload.done (/var/www/peertube/versions/peertube-v6.0.2/node_modules/@aws-sdk/lib-storage/dist-cjs/Upload.js:39:16)\n    at async uploadToStorage (file:///var/www/peertube/versions/peertube-v6.0.2/dist/core/lib/object-storage/shared/object-storage-helpers.js:152:23)\n    at async moveHLSFiles (file:///var/www/peertube/versions/peertube-v6.0.2/dist/core/lib/job-queue/handlers/move-to-object-storage.js:51:13)\n    at async moveToJob (file:///var/www/peertube/versions/peertube-v6.0.2/dist/core/lib/job-queue/handlers/shared/move-video.js:23:13)\n    at async Object.processMoveToObjectStorage [as move-to-object-storage] (file:///var/www/peertube/versions/peertube-v6.0.2/dist/core/lib/job-queue/handlers/move-to-object-storage.js:16:5)\n    at async Object.wrapPromiseFun (file:///var/www/peertube/versions/peertube-v6.0.2/dist/core/lib/plugins/hooks.js:8:24)\n    at async Worker.processJob (/var/www/peertube/versions/peertube-v6.0.2/node_modules/bullmq/dist/cjs/classes/worker.js:350:28)\n    at async Worker.retryIfFailed (/var/www/peertube/versions/peertube-v6.0.2/node_modules/bullmq/dist/cjs/classes/worker.js:535:24)",
    "name": "403",
    "$fault": "client",
    "$metadata": {
      "httpStatusCode": 403,
      "attempts": 1,
      "totalRetryDelay": 0
    },
    "message": "UnknownError",
    "$response": {
      "statusCode": 403,
      "reason": "Forbidden",
      "headers": {
        "date": "Tue, 02 Jan 2024 17:57:31 GMT",
        "content-type": "text/html; charset=UTF-8",
        "content-length": "0",
        "connection": "keep-alive"
      },
      "body": {
        "_readableState": {
          "objectMode": false,
          "highWaterMark": 16384,
          "buffer": {
            "head": null,
            "tail": null,
            "length": 0
          },
          "length": 0,
          "pipes": [],
          "flowing": false,
          "ended": true,
          "endEmitted": true,
          "reading": false,
          "constructed": true,
          "sync": true,
          "needReadable": false,
          "emittedReadable": false,
          "readableListening": false,
          "resumeScheduled": false,
          "errorEmitted": false,
          "emitClose": true,
          "autoDestroy": true,
          "destroyed": true,
          "errored": null,
          "closed": true,
          "closeEmitted": true,
          "defaultEncoding": "utf8",
          "awaitDrainWriters": null,
          "multiAwaitDrain": false,
          "readingMore": true,
          "dataEmitted": false,
          "decoder": null,
          "encoding": null
        },
        "_events": {},
        "_eventsCount": 2,
        "socket": null,
        "httpVersionMajor": 1,
        "httpVersionMinor": 1,
        "httpVersion": "1.1",
        "complete": true,
        "rawHeaders": [
          "Date",
          "Tue, 02 Jan 2024 17:57:31 GMT",
          "Content-Type",
          "text/html; charset=UTF-8",
          "Content-Length",
          "0",
          "Connection",
          "keep-alive"
        ],
        "rawTrailers": [],
        "aborted": false,
        "upgrade": false,
        "url": "",
        "method": null,
        "statusCode": 403,
        "statusMessage": "Forbidden",
        "client": {
          "_tlsOptions": {
            "pipe": false,
            "secureContext": {
              "context": {}
            },
            "isServer": false,
            "requestCert": true,
            "rejectUnauthorized": true,
            "session": {
              "type": "Buffer",
              "data": [
                48,
                130,
                5,
                185.....

Il faudrait voir du côté des logs minio, mais je pense qu’il faut remplacer 'null' par null pour public et private de upload_acl

1 Like