Error when set S3 bucket as primary storage

Hi.

I’m using nextcloud 16 and I try to use wasabi S3 as my primary storage and I get some error said can’t complete request.

Here’s the error from /var/www/nextcloud/data/nextcloud.log

{
  "reqId": "3Et4yKbuRiAjHJQcjFqV",
  "level": 3,
  "time": "2019-07-02T02:50:40+00:00",
  "remoteAddr": "173.245.48.174",
  "user": "orwill",
  "app": "index",
  "method": "GET",
  "url": "/apps/files/",
  "message": {
    "Exception": "OCP\\Files\\NotFoundException",
    "Message": "",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/apps/files/lib/Controller/ViewController.php",
        "line": 129,
        "function": "getStorageInfo",
        "class": "OC_Helper",
        "type": "::",
        "args": [
          "/",
          false
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/files/lib/Controller/ViewController.php",
        "line": 170,
        "function": "getStorageInfo",
        "class": "OCA\\Files\\Controller\\ViewController",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 166,
        "function": "index",
        "class": "OCA\\Files\\Controller\\ViewController",
        "type": "->",
        "args": [
          "",
          "",
          null,
          false
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 99,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Files\\Controller\\ViewController"
          },
          "index"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 126,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Files\\Controller\\ViewController"
          },
          "index"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php",
        "line": 47,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "ViewController",
          "index",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          {
            "_route": "files.view.index"
          }
        ]
      },
      {
        "function": "__invoke",
        "class": "OC\\AppFramework\\Routing\\RouteActionHandler",
        "type": "->",
        "args": [
          {
            "_route": "files.view.index"
          }
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 297,
        "function": "call_user_func",
        "args": [
          {
            "__class__": "OC\\AppFramework\\Routing\\RouteActionHandler"
          },
          {
            "_route": "files.view.index"
          }
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 975,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/files/"
        ]
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 42,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/nextcloud/lib/private/legacy/helper.php",
    "Line": 488,
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0",
  "version": "16.0.1.1"
}

And here’s my config.php

<?php
$CONFIG = array (
  'instanceid' => 'balabala',
  'passwordsalt' => 'balabala',
  'secret' => 'balabala',
  'trusted_domains' => 
  array (
    0 => 'balabala'
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'pgsql',
  'version' => '16.0.1.1',
  'overwrite.cli.url' => 'balabala',
  'dbname' => 'nextcloud',
  'dbhost' => '/var/run/postgresql',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'balabala',
  // Use wasabi as primary storage. 
  'objectstore' => array(
    'class' => '\\OC\\Files\\ObjectStore\\S3',
    'arguments' => array(
      'bucket' => 'balabala',
      'autocreate' => true,
      'key'    => 'balabala',
      'secret' => 'balabala',
      'hostname' => 'balabala',
      'port' => 443,
      'use_ssl' => true,
      'region' => 'balabala',
      // required for some non Amazon S3 implementations
      // 'use_path_style'=>true
    ),
  ),
  'installed' => true,
);

The S3 storage’s set up is right because there are some files named urn:oid:xxx been created in my bucket.

So why can’t I use it?

Thanks for your help.

hey there…

as you have openly posted your instance-id, passwordsalt, secret, dbpassword i personally would regard your instance as being comprimised. (even if you tried to blablabla-out everything the URL of your instance is evident as well, btw.

then: look at config.php - there’s a comment after

‘region’ => ‘balabala’,
// required for some non Amazon S3 implementations
// ‘use_path_style’=>true

try to set that variable.

then: have you searched the forum for s3 and primary storage as there are many entries

then: i tsill think there are missing some more informations about your server and environment, though.

cheers
jimmy

Hi.

Thanks for your remind. In the wasabi’s official’s docs, They said ‘use_path_style’ is not need.

But anyway I just set that variable and it still don’t work. Here’s what I got this time:

{
  "reqId": "eAcKDyYzKxCNM4mWattF",
  "level": 3,
  "time": "2019-07-02T09:13:34+00:00",
  "remoteAddr": "162.158.92.193",
  "user": "orwill",
  "app": "index",
  "method": "GET",
  "url": "/apps/files/",
  "message": {
    "Exception": "OCP\\Files\\NotFoundException",
    "Message": "",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/apps/files/lib/Controller/ViewController.php",
        "line": 129,
        "function": "getStorageInfo",
        "class": "OC_Helper",
        "type": "::",
        "args": [
          "/",
          false
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/files/lib/Controller/ViewController.php",
        "line": 170,
        "function": "getStorageInfo",
        "class": "OCA\\Files\\Controller\\ViewController",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 166,
        "function": "index",
        "class": "OCA\\Files\\Controller\\ViewController",
        "type": "->",
        "args": [
          "",
          "",
          null,
          false
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 99,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Files\\Controller\\ViewController"
          },
          "index"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 126,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Files\\Controller\\ViewController"
          },
          "index"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php",
        "line": 47,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "ViewController",
          "index",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          {
            "_route": "files.view.index"
          }
        ]
      },
      {
        "function": "__invoke",
        "class": "OC\\AppFramework\\Routing\\RouteActionHandler",
        "type": "->",
        "args": [
          {
            "_route": "files.view.index"
          }
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 297,
        "function": "call_user_func",
        "args": [
          {
            "__class__": "OC\\AppFramework\\Routing\\RouteActionHandler"
          },
          {
            "_route": "files.view.index"
          }
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 975,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/files/"
        ]
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 42,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/nextcloud/lib/private/legacy/helper.php",
    "Line": 488,
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0",
  "version": "16.0.1.1"
}

About my system information, I’m using centos 7.6(kernel is 3.10.0-957.21.3.el7.x86_64), rh-PHP 7.2 , pgsql 10.9 and nginx 1.16.0. Is there more information I should provide?

I did try to search that but those post I could found ether no answer or not as seam as my situation.

Thanks for your help.
Orwill Towne.

And I think I cloud access every page beside /apps/file and /setting/user.

And those urn:oid:xxx files are still growing. I random pick one and format it. And it looks just like i18n file write in json.

{
  "data": [
    {
      "id": "customization",
      "translations": {
        "en": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "af": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "ar": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "ast": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "az": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "bg": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "be": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "bn": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "br": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "bs": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "ca": {
          "name": "Personalització",
          "description": "Temes, disposició i apps de canvi d’UX"
        },
        "cs": {
          "name": "Přizpůsobení",
          "description": "Motivy vzhledu, schémata rozvržení a aplikace měnící dojem z používání uživatelského rozhraní"
        },
        "cy": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "da": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "de": {
          "name": "Anpassung",
          "description": "Apps zur Änderung von Design, Layout und Benutzererfahrung"
        },
        "dsb": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "el": {
          "name": "Προσαρμογή",
          "description": "Εφαρμογές αλλαγής θέματος, διάταξης και UX"
        },
        "eo": {
          "name": "Adaptado",
          "description": "Etosoj, aspekto kaj fasonado"
        },
        "es": {
          "name": "Personalización",
          "description": "Apps de temas, apariencia y cambio de interfaz"
        },
        "es-ar": {
          "name": "Personalización",
          "description": "Los temas, la disposición y UX cambian las aplicaciones"
        },
        "es-co": {
          "name": "Personalización",
          "description": "Los temas, la disposición y UX cambian las aplicaciones"
        },
        "es-mx": {
          "name": "Personalización",
          "description": "Los temas, la disposición y UX cambian las aplicaciones"
        },
        "es-ni": {
          "name": "Personalización",
          "description": "Los temas, la disposición y UX cambian las aplicaciones"
        },
        "es-ve": {
          "name": "Personalización",
          "description": "Apps de temas, apariencia y cambio de interfaz"
        },
        "et": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "eu": {
          "name": "Kustomizazioa",
          "description": "Gaiak, diseinua eta UX aldaketentzako app-ak"
        },
        "fa": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "fi": {
          "name": "Mukautus",
          "description": "Themes, layout and UX change apps"
        },
        "fr": {
          "name": "Personnalisation",
          "description": "Thèmes, apparence et applications modifiant l'expérience utilisateur"
        },
        "fy": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "ga": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "gd": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "gl": {
          "name": "Personalización",
          "description": "Aplicativos de temas, aparencia e cambio de interface"
        },
        "he": {
          "name": "התאמה אישית",
          "description": "יישומוני ערכות עיצוב, פריסה ושינויי חוויית משתמש"
        },
        "hi": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "hr": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "hsb": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "hu": {
          "name": "Személyre szabás",
          "description": "Témák, elrendezések felhasználói felület módosító alkalmazások"
        },
        "ia": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "id": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "io": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "is": {
          "name": "Sérsníðing",
          "description": "Þemu, framsetning og breytingar á viðmóti"
        },
        "it": {
          "name": "Personalizzazione",
          "description": "Applicazioni di temi, modifiche della disposizione e UX"
        },
        "ja": {
          "name": "カスタマイズ",
          "description": "アプリのテーマ、レイアウト、UX変更"
        },
        "ka": {
          "name": "პერსონალიზაცია",
          "description": "ვიზუალური თემები, მაკეტი და UX ცვლილების აპლიკაციები"
        },
        "kab": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "kk": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "km": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "kn": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "ko": {
          "name": "사용자 정의",
          "description": "테마, 레이아웃, UX를 변경하는 앱"
        },
        "lb": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "lt": {
          "name": "Tinkinimas",
          "description": "Temos, išdėstymas ir UX keitimo programos"
        },
        "lv": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "mk": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "ml": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "mn": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "mr": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "my": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "nb": {
          "name": "Tilpasning",
          "description": "Apper for å endre tema, utseende og brukeropplevelse"
        },
        "ne": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "nl": {
          "name": "Maatwerk",
          "description": "Thema's, layout en UX aanpassingsapps"
        },
        "nn": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "os": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "pa": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "pl": {
          "name": "Dostosowanie",
          "description": "Style, wygląd i zmniany UX"
        },
        "pt": {
          "name": "Personalizar",
          "description": "Temas, disposição e aplicações de alteração de UX"
        },
        "pt-br": {
          "name": "Personalização",
          "description": "Aplicativos para mudar Temas, layout e UX "
        },
        "ro": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "ru": {
          "name": "Настройка",
          "description": "Темы, раскладки и приложения для изменения интерфейса"
        },
        "sk": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "sl": {
          "name": "Prilagajanje sistema",
          "description": "Teme, razporeditve in spremembe vmesnika"
        },
        "sq": {
          "name": "Përshtatje",
          "description": "Temat, pamja dhe Ndërfaqja e Përdoruesit ndryshojnë aplikacionet"
        },
        "sr": {
          "name": "Прилагођавање",
          "description": "Теме, распоред елемената и апликације које мењају кориснички интерфејс"
        },
        "sr-latn": {
          "name": "Прилагођавање",
          "description": "Теме, распоред елемената и апликације које мењају кориснички интерфејс"
        },
        "sv": {
          "name": "Anpassa",
          "description": "Tema, layout och UX-ändringsappar"
        },
        "sw": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "ta": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "te": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "th": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "tr": {
          "name": "Uyarlama",
          "description": "Temalar, görünüm ve kullanıcı arayüzünü değiştiren uygulamalar"
        },
        "tt": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "udm": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "uk": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "ur": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "vi": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "zh-hans": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        },
        "zh-hant": {
          "name": "Customization",
          "description": "Themes, layout and UX change apps"
        }
      }
...........

how did you setup the s3 storage?
did you just add 'objectstore' => array ...?
was it ever working?

the following config is working:

  // Use wasabi as primary storage.
  'objectstore' => array(
    'class' => '\\OC\\Files\\ObjectStore\\S3',
    'arguments' => array(
      'bucket' => 'dummy',
      'autocreate' => true,
      'key'    => '1TDOYBMT3OXO44YULEBY',
      'secret' => '***************************',
      'hostname' => 's3.eu-central-1.wasabisys.com',
      'port' => 443,
      'use_ssl' => true,
      'region' => 'eu-central-1',
      // required for some non Amazon S3 implementations
      // 'use_path_style'=>true
    ),
  ),