Skip to content

Nextcloud 12.0.4 and 13 doesn't support S3 Backend using V2 authentication #7569

Description

@EdwardWu7

Steps to reproduce

  1. Upgrade Nextcloud from 12.0.3 to 12.0.4 or 13.0.0 Beta
  2. Use S3 as backed which only support V2 authentication

Expected behaviour

Should work as normal

Actual behaviour

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

Server configuration

Operating system:

Web server:

Database:

PHP version:

Nextcloud version: (see Nextcloud admin page)

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from:

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.

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

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, …)

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

Are you using encryption: yes/no

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

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

Browser log

Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

Activity

  1. MorrisJobke commented on Dec 19, 2017

    @MorrisJobke
    Member

    Please provide the Nextcloud log, because it contains the information we need.

  2. MorrisJobke commented on Dec 19, 2017

    @MorrisJobke
    Member
  3. EdwardWu7 commented on Dec 19, 2017

    @EdwardWu7
    Author

    It is a problem with the AWS SDK, just can not send v2 auth request to backed S3 storage. We tried to modify the code, downgrading the SDK, but it doesn't work... I just created a 12.0.3, auth is normal now... but I am struggling to get all the data back to users...

  4. MorrisJobke commented on Dec 19, 2017

    @MorrisJobke
    Member

    It is a problem with the AWS SDK, just can not send v2 auth request to backed S3 storage. We tried to modify the code, downgrading the SDK, but it doesn't work... I just created a 12.0.3, auth is normal now... but I am struggling to get all the data back to users...

    Yes - we got complains, that the old SDK does not support newer AWS regions. So we upgraded to allow all AWS regions.

  5. MorrisJobke commented on Dec 19, 2017

    @MorrisJobke
    Member

    12.0.3 has the old SDK
    12.0.4 has the new SDK

  6. EdwardWu7 commented on Dec 19, 2017

    @EdwardWu7
    Author
  7. EdwardWu7 commented on Dec 19, 2017

    @EdwardWu7
    Author

    @MorrisJobke but it affected homegrown ceph users... Is there way to downgrade data in database from 13 to 12.0.3?

  8. MorrisJobke commented on Dec 19, 2017

    @MorrisJobke
    Member

    @MorrisJobke but it affected homegrown ceph users... Is there way to downgrade data in database from 13 to 12.0.3?

    Not really, beside using a backup.

  9. EdwardWu7 commented on Dec 19, 2017

    @EdwardWu7
    Author

    thanks...

  10. added this to the Nextcloud 12.0.5 milestone on Dec 19, 2017
  11. icewind1991 commented on Dec 19, 2017

    @icewind1991
    Member

    @EdwardWu7 can you see if #7570 solves the problem (you can enable legacy auth in the external storage settings).

    Also what s3 implementation are you using?

  12. EdwardWu7 commented on Dec 19, 2017

    @EdwardWu7
    Author

    @icewind1991 We are using Ceph as backend and the version is not updated so only support v2, where can I add the setting? just 'version' => 'v2'?
    'objectstore' =>
    array (
    'class' => 'OC\Files\ObjectStore\S3',
    'arguments' =>
    array (
    'bucket' => 'prd-share-nextcloud',
    'autocreate' => false,
    'key' => '',
    'secret' => '
    ',
    'hostname' => '10.0.126.211',
    'port' => 80,
    'use_ssl' => false,
    'use_path_style' => true,
    ),
    ),

  13. MorrisJobke commented on Dec 19, 2017

    @MorrisJobke
    Member

    @icewind1991 We are using Ceph as backend and the version is not updated so only support v2, where can I add the setting? just 'version' => 'v2'?

    Exactly - add it t o the arguments array. Right beside the use_path_style.

  14. EdwardWu7 commented on Dec 19, 2017

    @EdwardWu7
    Author

    ok, let me try it, I will post the result as soon as I get it.
    BTW, I disabled the version check in 12.0.3 and our production environment recovered, I will set up a same test environment next time for new version and upgrade...

  15. EdwardWu7 commented on Dec 19, 2017

    @EdwardWu7
    Author

    Unfortunately it doesn't work...
    Using option 'legacy_auth' => true, in config.php
    But it shows in blue screen with below message
    Your data directory is invalid
    Ensure there is a file called ".ocdata" in the root of the data directory.
    From the backend I found NC is parsing correct format of auth request to Object Storage..

    Attached is the nextcloud.log, I used a fresh NC13 and just updated code from #7570
    nextcloud.log
    If using option 'version' => 'v2' in config.php, the internal server error page come up, and I think this parameter is not correct.

  16. EdwardWu7 commented on Dec 19, 2017

    @EdwardWu7
    Author

    And the other 12.0.3 NC using same backend storage and database is working normally

  17. EdwardWu7 commented on Dec 19, 2017

    @EdwardWu7
    Author

    I just added an empty .ocdata to data directory and it works now... thanks guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions