nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.94k stars 4.02k forks source link

GCP Cloud Storage Doesn't work w/ NC 13 #9716

Closed cloudguy23 closed 6 years ago

cloudguy23 commented 6 years ago

Steps to reproduce

  1. Create GCP Cloud Storage Bucket, enable Interoperability, generate storage access keys.
  2. Add New S3 External Storage bucket in NC. Use credentials + bucket name from 1. Host = storage.googleapis.com
  3. Add files using NC. Refresh view, files do not show up. Browse bucket using s3cmd, GCP console, other S3 tools (e.g. Transmit, Cyberduck, etc) -- files show up.

Expected behaviour

List / interact with content stored on GCP Cloud Storage via NC External Storage app.

Actual behaviour

Bucket show up as empty. nextcloud.log contains errors:

Server configuration

Operating system: CentOS 7.5

Web server: Apache 2.4.6 -- httpd-2.4.6-80.el7.centos.x86_64.rpm

Database: MariaDB 5.5.26 -- mariadb-server-5.5.56-2.el7.x86_64.rpm

PHP version: PHP 7.2.5 php72w-gd-7.2.5-1.w7.x86_64 php72w-pear-1.10.4-1.w7.noarch php72w-process-7.2.5-1.w7.x86_64 php72w-opcache-7.2.5-1.w7.x86_64 mod_php72w-7.2.5-1.w7.x86_64 php72w-mysql-7.2.5-1.w7.x86_64 php72w-mbstring-7.2.5-1.w7.x86_64 php72w-pdo-7.2.5-1.w7.x86_64 php72w-cli-7.2.5-1.w7.x86_64 php72w-pecl-apcu-5.1.9-1.w7.x86_64 php72w-common-7.2.5-1.w7.x86_64 php72w-xml-7.2.5-1.w7.x86_64

Nextcloud version: 13.0.2

Updated from an older Nextcloud/ownCloud or fresh install: Fresh install

Where did you install Nextcloud from: tar.gz

Signing status:

Signing status ``` Login as admin user into your Nextcloud and access http://example.com/index.php/settings/integrity/failed paste the results here. No errors have been found. ```

List of activated apps:

App list ``` If you have access to your command line run e.g.: sudo -u www-data php occ app:list from within your Nextcloud installation folder Enabled: - activity: 2.6.1 - admin_audit: 1.3.0 - bruteforcesettings: 1.0.3 - comments: 1.3.0 - dav: 1.4.6 - deck: 0.3.1 - federatedfilesharing: 1.3.1 - federation: 1.3.0 - files: 1.8.0 - files_external: 1.4.1 - files_pdfviewer: 1.2.1 - files_sharing: 1.5.0 - files_texteditor: 2.5.1 - files_trashbin: 1.3.0 - files_versions: 1.6.0 - files_videoplayer: 1.2.0 - firstrunwizard: 2.2.1 - logreader: 2.0.0 - lookup_server_connector: 1.1.0 - nextcloud_announcements: 1.2.0 - notifications: 2.1.2 - oauth2: 1.1.0 - password_policy: 1.3.0 - provisioning_api: 1.3.0 - serverinfo: 1.3.0 - sharebymail: 1.3.0 - survey_client: 1.1.0 - systemtags: 1.3.0 - theming: 1.4.5 - twofactor_backupcodes: 1.2.3 - updatenotification: 1.3.0 - user_external: 0.4 - workflowengine: 1.3.0 Disabled: - encryption - files_retention - gallery - user_ldap - user_saml ```

Nextcloud configuration:

Config report ``` If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your Nextcloud installation folder or Insert your config.php content here. Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …) { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "***REMOVED SENSITIVE VALUE***", "***REMOVED SENSITIVE VALUE***" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "http:\/\/***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "13.0.2.1", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "logfile": "\/var\/log\/nextcloud.log", "loglevel": "2", "log_rotate_size": "104857600", "installed": true, "memcache.local": "\\OC\\Memcache\\APCu", "maintenance": false, "theme": "" } } ```

Are you using external storage, if yes which one: local/smb/sftp/...

S3

Are you using encryption: yes/no

YES

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

NO

LDAP configuration (delete this part if not used)

LDAP config ``` With access to your command line run e.g.: sudo -u www-data php occ ldap:show-config from within your Nextcloud installation folder Without access to your command line download the data/owncloud.db to your local computer or access your SQL server remotely and run the select query: SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap'; Eventually replace sensitive data as the name/IP-address of your LDAP server or groups. ```

Client configuration

Browser:

Operating system:

Logs

Web server error log

Web server error log ``` Insert your webserver log here ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` Insert your Nextcloud log here {"reqId":"WxKOOHFAAgD1U3sq66xYhAAAAAg","level":3,"time":"2018-06-02T12:31: 53+00:00","remoteAddr":"****","user":"****"," app":"files_external","method":"GET","url":"\/index.php\/apps\/files\/ajax\ /getstoragestats.php?dir=****","message":"Exception : {\"Exception\":\"Aws\\\\S3\\\\Exception\\\\S3Exception\",\"Message\":\" Error executing \\\"ListObjects\\\" on \\\"https:\\\/\\\/****.storage. googleapis.com\\\/?delimiter=%2F&prefix=&encoding-type=url\\\"; AWS HTTP error: Client error response [url] https:\\\/\\\/****.storage. googleapis.com\\\/?delimiter=%2F&prefix=&encoding-type=url [status code] 400 [reason phrase] Bad Request InvalidArgument (client): Invalid argument. - InvalidArgument<\\\/Code>Invalid argument.<\\\/Message>
Invalid query parameter(s): [encoding-type]<\\\/Details><\\\/Error>\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/aws\\\/aws-sdk-php\\\/ src\\\/WrappedHttpHandler.php(101): Aws\\\\WrappedHttpHandler->parseError(Array, Object(GuzzleHttp\\\\Psr7\\\\Request), Object(Aws\\\\Command), Array)\\n#1 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/promises\\ \/src\\\/Promise.php(203): Aws\\\\WrappedHttpHandler->Aws\\\\{closure}(*** sensitive parameters replaced ***)\\n#2 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/promises\\ \/src\\\/Promise.php(174): GuzzleHttp\\\\Promise\\\\Promise::callHandler(2, Array, Array)\\n#3 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/promises\\ \/src\\\/RejectedPromise.php(40): GuzzleHttp\\\\Promise\\\\Promise::GuzzleHttp\\\\Promise\\\\{closure}(*** sensitive parameters replaced ***)\\n#4 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/promises\\ \/src\\\/TaskQueue.php(47): GuzzleHttp\\\\Promise\\\\RejectedPromise::GuzzleHttp\\\\Promise\\\\{closure }(*** sensitive parameters replaced ***)\\n#5 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/promises\\ \/src\\\/Promise.php(234): GuzzleHttp\\\\Promise\\\\TaskQueue->run()\\n#6 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/promises\\ \/src\\\/Promise.php(267): GuzzleHttp\\\\Promise\\\\Promise->waitIfPending()\\n#7 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/promises\\ \/src\\\/Promise.php(225): GuzzleHttp\\\\Promise\\\\Promise->invokeWaitList()\\n#8 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/promises\\ \/src\\\/Promise.php(267): GuzzleHttp\\\\Promise\\\\Promise->waitIfPending()\\n#9 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/promises\\ \/src\\\/Promise.php(225): GuzzleHttp\\\\Promise\\\\Promise->invokeWaitList()\\n#10 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/promises\\ \/src\\\/Promise.php(62): GuzzleHttp\\\\Promise\\\\Promise->waitIfPending()\\n#11 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/aws\\\/aws-sdk-php\\\/ src\\\/AwsClientTrait.php(59): GuzzleHttp\\\\Promise\\\\Promise->wait()\\n#12 \\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/aws\\\/aws-sdk-php\\\/ src\\\/ResultPaginator.php(127): Aws\\\\AwsClient->execute(Object(Aws\\\\Command))\\n#13 \\\/var\\\/www\\\/html\\\/nextcloud\\\/apps\\\/files_external\\\/lib\\\/Lib \\\/Storage\\\/AmazonS3.php(288): Aws\\\\ResultPaginator->valid()\\n#14 \\\/var\\\/www\\\/html\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Storage\\ \/Wrapper\\\/Wrapper.php(101): OCA\\\\Files_External\\\\Lib\\\\Storage\\\\AmazonS3->opendir('')\\n#15 \\\/var\\\/www\\\/html\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Storage\\ \/Wrapper\\\/Availability.php(109): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->opendir('')\\n#16 \\\/var\\\/www\\\/html\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Storage\\ \/Wrapper\\\/Wrapper.php(101): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Availability->opendir('')\\n#17 \\\/var\\\/www\\\/html\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/ Scanner.php(372): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->opendir('')\\n#18 \\\/var\\\/www\\\/html\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/ Scanner.php(423): OC\\\\Files\\\\Cache\\\\Scanner->getNewChildren('')\\n#19 \\\/var\\\/www\\\/html\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/ Scanner.php(403): OC\\\\Files\\\\Cache\\\\Scanner->handleChildren('', false, 3, '1478', true, 0)\\n#20 \\\/var\\\/www\\\/html\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/ Scanner.php(337): OC\\\\Files\\\\Cache\\\\Scanner->scanChildren('', false, 3, '1478', true)\\n#21 \\\/var\\\/www\\\/html\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/ Watcher.php(104): OC\\\\Files\\\\Cache\\\\Scanner->scan('', false)\\n#22 \\\/var\\\/www\\\/html\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/View.php( 1332): OC\\\\Files\\\\Cache\\\\Watcher->update('', Object(OC\\\\Files\\\\Cache\\\\CacheEntry))\\n#23 \\\/var\\\/www\\\/html\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/View.php( 1371): OC\\\\Files\\\\View->getCacheEntry(Object(OCA\\\\Files_Trashbin\\\\Storage) , '', '\\\/**** ...')\\n#24 \\\/var\\\/www\\\/html\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/ Filesystem.php(866): OC\\\\Files\\\\View->getFileInfo('\\\/****...', false)\\n#25 \\\/var\\\/www\\\/html\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/helper. php(541): OC\\\\Files\\\\Filesystem::getFileInfo('\\\/**** ...', false)\\n#26 \\\/var\\\/www\\\/html\\\/nextcloud\\\/apps\\\/files\\\/lib\\\/Helper.php( 49): OC_Helper::getStorageInfo('\\\/**** ...')\\n#27 \\\/var\\\/www\\\/html\\\/nextcloud\\\/apps\\\/files\\\/ajax\\\/ getstoragestats.php(37): OCA\\\\Files\\\\Helper::buildFileStorageStatistics('\\\/**** ...')\\n#28 \\\/var\\\/www\\\/html\\\/nextcloud\\\/lib\\\/private\\\/Route\\\/Route.php (155): require_once('\\\/var\\\/www\\\/html\\\/n...')\\n#29 [internal function]: OC\\\\Route\\\\Route->OC\\\\Route\\\\{closure}(*** sensitive parameters replaced ***)\\n#30 \\\/var\\\/www\\\/html\\\/nextcloud\\\/lib\\\/private\\\/Route\\\/Router. php(297): call_user_func(Object(Closure), Array)\\n#31 \\\/var\\\/www\\\/html\\\/nextcloud\\\/lib\\\/base.php(999): OC\\\\Route\\\\Router->match('\\\/apps\\\/files\\\/aja...')\\n#32 \\\/var\\\/www\\\/html\\\/nextcloud\\\/index.php(37): OC::handleRequest()\\n#33 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/nextcloud\\\/3rdparty\\\/aws\ \\/aws-sdk-php\\\/src\\\/WrappedHttpHandler.php\",\"Line\":192}","userAgent ":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit\/605.1.15 (KHTML, like Gecko) Version\/11.1 Safari\/605.1.15","version":"13.0.2.1"} ```

Browser log

Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
MorrisJobke commented 6 years ago

cc @icewind1991