Issue with Wasabi external storage

Nextcloud version - 18.0.4:
Operating system and version - Ubuntu 18.04.4 LTS:
Apache or nginx version : nginx 1.14:
PHP version 7.4.5:

The issue you are facing:

I’m facing with a issue about external storage. I’ve got an s3 bucket registered at Wasabi.com and I try to link it with several methods to Nextcloud but I always have a problem with it :

  • with the integrated s3 external storage of Nextcloud, I’ve got an issue with permission : I can’t delete or move folder inside my bucket
  • I’ve tried to mount my bucket with s3fs but one folder is mounted as a file… everything is explained here : (https://github.com/s3fs-fuse/s3fs-fuse/issues/1284)
  • I have also tried to use goofys but folders with accented characters not showing and UI is slow

Steps to replicate it:

  1. Install Nextcloud with PHP 7.4.5
  2. Try to link it with Wasabi Cloud Storage

The output of your Nextcloud log in Admin > Logging:

  • Same error as many people related to PHP 7.4
{"reqId":"x1vaiMush2OYPJVgFOMx","level":3,"time":"2020-05-01T06:25:44+00:00","remoteAddr":"91.173.228.42","user":"user8979","app":"PHP","method":"GET","url":"/apps/files/","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36","version":"18.0.4.2"}
{"reqId":"7VWKsgTLUg13hj8vbTma","level":3,"time":"2020-05-01T06:25:59+00:00","remoteAddr":"91.173.228.42","user":"user8979","app":"PHP","method":"GET","url":"/apps/text/session/create?fileId=10565&guestName=null&forceRecreate=false","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/aws/aws-sdk-php/src/RetryMiddleware.php#144","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36","version":"18.0.4.2"}
{"reqId":"b5KQvYvk1saqBQHfiihn","level":3,"time":"2020-05-01T06:25:59+00:00","remoteAddr":"91.173.228.42","user":"user8979","app":"PHP","method":"GET","url":"/core/preview?fileId=10565&c=5eab06e3ab975&x=500&y=500&forceIcon=0","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/aws/aws-sdk-php/src/RetryMiddleware.php#144","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36","version":"18.0.4.2"}
{"reqId":"WWcLjTF3m3t5tWrBkL4L","level":3,"time":"2020-05-01T06:26:15+00:00","remoteAddr":"91.173.228.42","user":"user8979","app":"PHP","method":"GET","url":"/core/preview?fileId=10565&c=5eab06e3ab975&x=500&y=500&forceIcon=0","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/aws/aws-sdk-php/src/RetryMiddleware.php#144","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36","version":"18.0.4.2"}
{"reqId":"Th2NkVZ9LeziLGK02Kt4","level":3,"time":"2020-05-01T06:26:29+00:00","remoteAddr":"91.173.228.42","user":"user8979","app":"PHP","method":"GET","url":"/settings/user","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36","version":"18.0.4.2"}
{"reqId":"Th2NkVZ9LeziLGK02Kt4","level":3,"time":"2020-05-01T06:26:29+00:00","remoteAddr":"91.173.228.42","user":"user8979","app":"PHP","method":"GET","url":"/settings/user","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36","version":"18.0.4.2"}
{"reqId":"Th2NkVZ9LeziLGK02Kt4","level":3,"time":"2020-05-01T06:26:29+00:00","remoteAddr":"91.173.228.42","user":"user8979","app":"PHP","method":"GET","url":"/settings/user","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36","version":"18.0.4.2"}
{"reqId":"Th2NkVZ9LeziLGK02Kt4","level":3,"time":"2020-05-01T06:26:29+00:00","remoteAddr":"91.173.228.42","user":"user8979","app":"PHP","method":"GET","url":"/settings/user","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36","version":"18.0.4.2"}
{"reqId":"Th2NkVZ9LeziLGK02Kt4","level":3,"time":"2020-05-01T06:26:29+00:00","remoteAddr":"91.173.228.42","user":"user8979","app":"PHP","method":"GET","url":"/settings/user","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36","version":"18.0.4.2"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'oc0qs6a28a73',
  'passwordsalt' => 'GHUWfLzB8/pDw9XfO8tzhGpPb2Dkod',
  'secret' => 'Yu/CJCO/GJ6LV9W2YqY9xlFnhAzNKpjHx7fhRUmTOBpbuVqu',
  'trusted_domains' =>
  array (
    0 => 'localhost',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '18.0.4.2',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextclouduser',
  'dbpassword' => 'gJ5hrYq2aomQp',
  'installed' => true,
  'maintenance' => false,
  'mysql.utf8mb4' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Memcached',
  'memcached_servers' =>
  array (
    0 =>
    array (
      0 => 'localhost',
      1 => 11211,
    ),
  ),
);

The output of your Apache/nginx/system log in /var/log/____:

#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(117): PDOStatement->execute()
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1054): Doctrine\DBAL\Driver\PDOStatement->execute()
#2 /var/www/nextcloud/lib/private/DB/Connection.php(220): Doctrine\DBAL\Connection->executeUpdate()
#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(203): OC\DB\Connection->executeUpdate()
#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(215): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /var/www/nextcloud/lib/private/Lock/DBLockingProvider.php(316): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 [internal function]: OC\Lock\DBLockingP" while reading upstream, client: 91.173.228.42, server: cloud.4runners.fr, request: "PROPFIND /remote.php/dav/files/user8979/local HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "cloud.4runners.fr"
2020/05/01 00:13:38 [crit] 6448#6448: *14222 SSL_do_handshake() failed (SSL: error:14209102:SSL routines:tls_early_post_process_client_hello:unsupported protocol) while SSL handshaking, client: 212.83.175.129, server: 0.0.0.0:443
2020/05/01 00:21:26 [error] 6448#6448: *14141 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 91.173.228.42, server: cloud.4runners.fr, request: "GET /cron.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock", host: "cloud.4runners.fr"
2020/05/01 00:59:13 [crit] 6448#6448: *14749 SSL_do_handshake() failed (SSL: error:1420918C:SSL routines:tls_early_post_process_client_hello:version too low) while SSL handshaking, client: 208.93.152.17, server: 0.0.0.0:443
2020/05/01 00:59:14 [crit] 6448#6448: *14750 SSL_do_handshake() failed (SSL: error:14209102:SSL routines:tls_early_post_process_client_hello:unsupported protocol) while SSL handshaking, client: 208.93.152.17, server: 0.0.0.0:443
2020/05/01 00:59:14 [crit] 6448#6448: *14751 SSL_do_handshake() failed (SSL: error:14209102:SSL routines:tls_early_post_process_client_hello:unsupported protocol) while SSL handshaking, client: 208.93.152.17, server: 0.0.0.0:443
2020/05/01 01:45:43 [crit] 6448#6448: *14782 SSL_do_handshake() failed (SSL: error:14209102:SSL routines:tls_early_post_process_client_hello:unsupported protocol) while SSL handshaking, client: 45.227.255.233, server: 0.0.0.0:443
2020/05/01 06:28:50 [crit] 6448#6448: *14908 SSL_do_handshake() failed (SSL: error:1420918C:SSL routines:tls_early_post_process_client_hello:version too low) while SSL handshaking, client: 74.82.47.4, server: 0.0.0.0:443
2020/05/01 08:26:32 [error] 6448#6448: *14967 access forbidden by rule, client: 91.173.228.42, server: cloud.4runners.fr, request: "GET /data/.ocdata?t=1588314392114 HTTP/2.0", host: "cloud.4runners.fr"
louis@ubuntu-2gb-nbg1-4:/var/log/nginx$ sudo tail -50 error.log
2020/04/30 22:04:43 [error] 6448#6448: *12066 access forbidden by rule, client: 91.173.228.42, server: cloud.4runners.fr, request: "GET /data/.ocdata?t=1588277083560 HTTP/2.0", host: "cloud.4runners.fr"
2020/04/30 22:13:31 [error] 6448#6448: *12066 access forbidden by rule, client: 91.173.228.42, server: cloud.4runners.fr, request: "GET /data/.ocdata?t=1588277611803 HTTP/2.0", host: "cloud.4runners.fr"
2020/04/30 22:14:29 [error] 6448#6448: *12066 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught PDOException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction in /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(117): PDOStatement->execute()
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1054): Doctrine\DBAL\Driver\PDOStatement->execute()
#2 /var/www/nextcloud/lib/private/DB/Connection.php(220): Doctrine\DBAL\Connection->executeUpdate()
#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(203): OC\DB\Connection->executeUpdate()
#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(215): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /var/www/nextcloud/lib/private/Lock/DBLockingProvider.php(316): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 [internal function]: OC\Lock\DBLockingP" while reading upstream, client: 91.173.228.42, server: cloud.4runners.fr, request: "PROPFIND /remote.php/dav/files/user8979/local HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "cloud.4runners.fr"
2020/05/01 00:13:38 [crit] 6448#6448: *14222 SSL_do_handshake() failed (SSL: error:14209102:SSL routines:tls_early_post_process_client_hello:unsupported protocol) while SSL handshaking, client: 212.83.175.129, server: 0.0.0.0:443
2020/05/01 00:21:26 [error] 6448#6448: *14141 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 91.173.228.42, server: cloud.4runners.fr, request: "GET /cron.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock", host: "cloud.4runners.fr"
2020/05/01 00:59:13 [crit] 6448#6448: *14749 SSL_do_handshake() failed (SSL: error:1420918C:SSL routines:tls_early_post_process_client_hello:version too low) while SSL handshaking, client: 208.93.152.17, server: 0.0.0.0:443
2020/05/01 00:59:14 [crit] 6448#6448: *14750 SSL_do_handshake() failed (SSL: error:14209102:SSL routines:tls_early_post_process_client_hello:unsupported protocol) while SSL handshaking, client: 208.93.152.17, server: 0.0.0.0:443
2020/05/01 00:59:14 [crit] 6448#6448: *14751 SSL_do_handshake() failed (SSL: error:14209102:SSL routines:tls_early_post_process_client_hello:unsupported protocol) while SSL handshaking, client: 208.93.152.17, server: 0.0.0.0:443
2020/05/01 01:45:43 [crit] 6448#6448: *14782 SSL_do_handshake() failed (SSL: error:14209102:SSL routines:tls_early_post_process_client_hello:unsupported protocol) while SSL handshaking, client: 45.227.255.233, server: 0.0.0.0:443
2020/05/01 06:28:50 [crit] 6448#6448: *14908 SSL_do_handshake() failed (SSL: error:1420918C:SSL routines:tls_early_post_process_client_hello:version too low) while SSL handshaking, client: 74.82.47.4, server: 0.0.0.0:443
2020/05/01 08:26:32 [error] 6448#6448: *14967 access forbidden by rule, client: 91.173.228.42, server: cloud.4runners.fr, request: "GET /data/.ocdata?t=1588314392114 HTTP/2.0", host: "cloud.4runners.fr"```

I find a lot of S3 and/or Wasabi storage related questions on this forum but very few discussions or answers. I am also encountering the problem of being unable to delete or move files created on Wasabi S3 bucket mounted as external storage. Did you ever find a solution @LouisBertin ?