Connection to StorageGRID not possible

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 21.0.2.1
Operating system and version (eg, Ubuntu 20.04): CentOS 8
Apache or nginx version (eg, Apache 2.4.25): nginx/1.14.1
PHP version (eg, 7.4): 7.4.20

The issue you are facing:
After an upgrade of StorageGRID to version 11.5 I can’t connect to the external S3 storage.
I try to connect to the Nextcloud instance page and nothing happens. When I remove the objectstore configuration, everything works as expected.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Put the objectstore configuration snippet in config.php

The output of your Nextcloud log in Admin > Logging:

{"reqId":"9MYlPZUF4dB1tUpcvvbP","level":2,"time":"2021-06-21T08:40:06+00:00","remoteAddr":"192.168.103.17","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0","version":""}
{"reqId":"9MYlPZUF4dB1tUpcvvbP","level":2,"time":"2021-06-21T08:40:06+00:00","remoteAddr":"192.168.103.17","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0","version":""}
{"reqId":"cTaitjQjwfcGYNerbm7I","level":2,"time":"2021-06-21T08:42:44+00:00","remoteAddr":"192.168.103.17","user":"--","app":"no app in context","method":"POST","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0","version":""}
{"reqId":"cTaitjQjwfcGYNerbm7I","level":2,"time":"2021-06-21T08:42:44+00:00","remoteAddr":"192.168.103.17","user":"--","app":"no app in context","method":"POST","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0","version":""}
{"reqId":"ugJdKfy2IUVsZXj72Uoq","level":3,"time":"2021-06-21T08:52:14+00:00","remoteAddr":"192.168.103.17","user":"admin","app":"index","method":"GET","url":"/settings/ajax/checksetup","message":{"Exception":"Exception","Message":"Call to undefined function OCA\\Settings\\Controller\\posix_getuid()","Code":0,"Trace":[{"file":"/data/web/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/data/web/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/data/web/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/data/web/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/data/web/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":159,"Previous":{"Exception":"Error","Message":"Call to undefined function OCA\\Settings\\Controller\\posix_getuid()","Code":0,"Trace":[{"file":"/data/web/nextcloud/apps/settings/lib/Controller/CheckSetupController.php","line":757,"function":"getAppDirsWithDifferentOwner","class":"OCA\\Settings\\Controller\\CheckSetupController","type":"->"},{"file":"/data/web/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"check","class":"OCA\\Settings\\Controller\\CheckSetupController","type":"->"},{"file":"/data/web/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/data/web/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/data/web/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/data/web/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/data/web/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/data/web/nextcloud/apps/settings/lib/Controller/CheckSetupController.php","Line":560},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0","version":"21.0.2.1"}

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

<?php
$CONFIG = array (
  'instanceid' => '***REMOVED SENSITIVE VALUE***',
  'passwordsalt' => '***REMOVED SENSITIVE VALUE***',
  'secret' => '***REMOVED SENSITIVE VALUE***',
  'trusted_domains' =>
  array (
    0 => 'domain.lan:8080',
  ),
  'datadirectory' => '/data/web/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '21.0.2.1',
  'overwrite.cli.url' => 'http://domain.lan:8080',
  'dbname' => '***REMOVED SENSITIVE VALUE***',
  'dbhost' => '***REMOVED SENSITIVE VALUE***',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '***REMOVED SENSITIVE VALUE***',
  'dbpassword' => '***REMOVED SENSITIVE VALUE***',
  'installed' => true,
  'objectstore' =>
  array (
    'class' => '\\OC\\Files\\ObjectStore\\S3',
    'arguments' =>
    array (
      'bucket' => 'test-bucket',
      'autocreate' => true,
      'key' => '***REMOVED SENSITIVE VALUE***',
      'secret' => '***REMOVED SENSITIVE VALUE***',
      'hostname' => 's3storage.lan',
      'port' => 80,
      'use_ssl' => false,
      'region' => 'us-east-1',
      'use_path_style' => true,
    ),
  ),
);

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

nothing useful

First make sure you can access the bucket from the same (or similar) host using S3 CLI or some other client.

If that works with the same settings, then it could be something in the plugin or setup steps.

I can’t think of any changes in StorageGRID 11.5 that would make HTTP stop working. Noteworthy changes in SG 11.5 are documented here.

You could use tcpdump or wireshark to capture traffic to s3.storage.lan:80 to see what’s happening when NextCloud starts. Because you’re using HTTP and not HTTPS, it should be quite easy.