Repository navigation
Closed
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapbugfeature: filesystemneeds info
Description
Hi,
We use successfully Nextcloud11 together with swift object storage as primary storage. However, using Nextcloud12, this seems to be broken.
Cheers,
Ron
Steps to reproduce
Expected behaviour
Tell us what should happen
Actual behaviour
Tell us what happens instead
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) ...
Reacted by Myros, JinsYin and gondaz
Metadata
Metadata
Assignees
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapbugfeature: filesystemneeds info
Activity
MorrisJobke commentedon Jul 25, 2017
We have multiple instances running with Swift as well as with S3 (they share a lot of code) and both work just fine. Are there more details what is not working?
jmdeboer-surfsara commentedon Jul 25, 2017
We have a nextcloud 11.0.3.2 install that we updated to 12, I unpacked the tarball on top on the old one and ran the updater. Now, the site gives a 500 server error, which goes away when I remove the multibucket-object store configuration from config.php
Here is the config:
Without the 'objectstore_multibucket' entry, I get no errors, but with that enabled I get a 500 server error.
Log:
jmdeboer-surfsara commentedon Jul 25, 2017
I also seem to run into trouble with a clean install of nextcloud 12 as well as the 13 master branch checked out.
Edit: Just to confirm, I unpacked the 12.0.0 tar in a clean directory, copied just the above config.php and data directory from the updated install, I get the same error. It's worth noting the Swift config has not changed from when it was working in Nextcloud 11.
MorrisJobke commentedon Jul 25, 2017
Weird. because we fixed the multi bucket config for 12.0.0: #4798
Could you try to use a single bucket option and check if it is broken there as well? And then maybe disable debug log? For 12.0.1 we also improved a bit the debug log for the primary object storage. (you need to install the daily-stable12 or the latest RC of 12.0.1 to get those changes - 12.0.1 is about to release soon).
MorrisJobke commentedon Jul 25, 2017
And the urlType needs to be internalUrl or publicUrl:
server/lib/private/Files/ObjectStore/Swift.php
Line 126 in c54a59d
This is the reason for the log messages.
jmdeboer-surfsara commentedon Jul 25, 2017
I will change the urlType but the docs appear to be incorrect:
https://docs.nextcloud.com/server/12/admin_manual/configuration_files/primary_storage.html
That is, 'urlType' => 'internal' is mentioned in the single bucket config snippet, no mention in the multi-bucket section.
jmdeboer-surfsara commentedon Jul 25, 2017
I installed a fresh copy of N C12.0.0.29, with a fresh database. Initially I set it up via the web interface, so it has 'normal' storage. This works, including redis, memcache etc. So it's basically the config as listed above.
When adding the config sections for single or multi bucket swift (and performing a filescan), the web interface only partially renders.
I see the top bar and the sidebar, but the main section of the page remains empty. The dropdown from the gear icon top-right no longer appears. My browser tells me:
Log files say nothing.
Syncing with the desktop client and the android client works.
jmdeboer-surfsara commentedon Jul 26, 2017
Well, for some reason I don't quite understand the webinterface did not render correctly with object storage enabled, tested on linux with firefox and chromium, and windows 10 with IE and firefox. I then upgraded to 12.0.1 RC2 and then it renders across the board.
However... in 12.0.1 RC2 storing objects no longer works :(
Reverting to 12.0.0.29 makes it work again (android and desktop, browser still no-go), using the exact same config save the version number. (I 'downgrade' by switching apache's document root, which might not be recommended practice but I am pragmatic)
Edit: Clearing the browser cache seems to have fixed the rendering problem, at least after downgrading. Which is still a bit weird, since I tested with clean browser install on a VM before. And strangely, 12.0.1 now works too.
I suppose the only 'real' issue that remains in the incorrect value for urlType in the documentation, maybe the updater should also check for it so as not to break the upgrade from version 11.
KodeStar commentedon Jul 28, 2017
I just did a clean install of nextcloud 12 on Ubuntu 16.04, copy pasted the s3 configuration details from https://docs.nextcloud.com/server/12/admin_manual/configuration_files/primary_storage.html changed the details to my details, server breaks, comment those details out and it comes up fine.
With that config the tab just whirls and whirls, and nothing get set in the apache2 error.log
I also tried commenting out hostname, port and region as these are supposedly optional, at which point it gets an error 500 instead
I was getting
Could not create object: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint: \"nextcloud-s3.s3.amazonaws.com\so I changed the hostname to nextcloud-s3.s3.amazonaws.com, then I started gettingCould not create object: The request signature we calculated does not match the signature you provided. Check your key and signing method.I've tried creating a new IAM user and creating new keys and secret and the same thing
KodeStar commentedon Jul 28, 2017
Made some progress, set use_path_style to false now at least the login comes up, it now error 500's on index.php/apps/files/ after logging in I'd also updated to 12.0.1 RC3
I've tried the same settings with Nextcloud 11, and it seems to work with that ok.
Darkknight33 commentedon Aug 5, 2017
For me, a fresh docker pull from the latest offical Nextcloud docker breaks with 500 error when setting Object storage as primary. I did some experimentation with Linuxserver's builds because they had less problems getting it running, and the release versions were easier for me to parse.
Cmd (v11.0.3 works with S3 backend):
docker run -d --name="nextcl" --net="bridge" -e TZ="America/New_York" -e "PUID"="99" -e "PGID"="100" -p 8086:443/tcp -v "/data":"/data":rw -v "/appdata/nextcloud":"/config":rw linuxserver/nextcloud:59
Cmd (v12 Broken with S3 backend)
docker run -d --name="nextcl" --net="bridge" -e TZ="America/New_York" -e "PUID"="99" -e "PGID"="100" -p 8086:443/tcp -v "/data":"/data":rw -v "/appdata/nextcloud":"/config":rw linuxserver/nextcloud:63
KroniK907 commentedon Aug 29, 2017
Can confirm that v12 with S3 backend is broken and does not work.
my config.php:
When I use the above config I get a nextcloud 500 error screen. If I comment out the objectstore section everything works fine.
Here is the log I got:
If I use the exact same S3 info using the external files plugin it mounts it just fine, so I know that my credentials and everything works correctly.
9 remaining items
spacemonkey commentedon Dec 30, 2017
I cannot get S3 support no matter whose example code I try, even with wiping the database and reinstalling clean. My creds have been tested with other apps, so it is definitely an issue with the S3 primaryStorage.
Does anyone have working, tested config+steps that I can duplicate for a running setup?
martinsah commentedon Jan 12, 2018
I was able to get this to work after following the instructions that @MorrisJobke wrote. I did not re-extract the archive. I did the following:
1. dropped the nextcloud database (I am using MySQL. This may be excessive behavior but it's a new install for me so I didn't care if I lost the DB)
# mysql -uroot -pmysql> drop database nextcloud;mysql> quit2. created the alternate config file for objectstore (Region must be set correctly)
File config/objectstore.config.php:
<?php$CONFIG = array ('objectstore' => array('class' => 'OC\\Files\\ObjectStore\\S3','arguments' => array('bucket' => 'bucketname','autocreate' => true,'key' => 'keystring','secret' => 'secretstring','use_ssl' => true,'region' => 'us-east-1'),),);3. ran the occ maintenance:install command.
sudo -u www-data php occ maintenance:install --database "mysql" --database-name "nextcloud" --database-user "root" --database-pass "dbpassword" --admin-user "admin" --admin-pass "newpass"ibr123 commentedon Jan 15, 2018
Hi,
i tried to make Amazon S3 as my primary storage as well following the link
keep in mind i have NextCloud 12.0.4.3, is it also broken for this version?
this is what i have added to the config.php
any idea?
KroniK907 commentedon Jan 16, 2018
@ibr123 Did you do this on a fresh install? You cant switch from a standard POSIX setup to an S3 setup. You must re-install nextcloud using one of the methods mentioned in the comments above to get the S3 setup working. Please read through the comments in this thread for a few different methods of doing that.
ibr123 commentedon Jan 17, 2018
@KroniK907 actually the first time I tried it, the part of configuring (shared in my previous comment) wasn't in the config file, maybe I didn't save or when I restarted apache it wasn't saved, but I tired it again on a fresh install, and it worked fine, for knowing how to configure the S3 the following link is useful
Thanks
maxwowpow commentedon Jan 17, 2018
I've been tweaking a nextcloudPI installation at the beginning but done the php installer fresh install as well. Different config options tried.
RPI3 Debian + S3 CEPH Rados, so maybe this has any relevance. Thank you.
nextcloud.log
Found this: #7570
MorrisJobke commentedon Nov 29, 2018
With 13+ we heavily improved the functionality of object storage as primary storage. Please test again with this version and report back if you have problems. We have multiple big instances that work fine with S3 and Swift on 13 or 14. Thanks for the feedback anyway.
klaatuic commentedon Nov 6, 2019
Just because we battled with this for some time and found the solution in this thread:
With version 17 and working owith an already functioning site using local storage we switched to Swift Object Storage as primary storage with no problem using MorrisJoke's seperate config.php suggestion above.
No database commands needed; it just worked. We did go in and out of maintenance mode but not sure even that is necessary.
array( 'class' => '\\OC\\Files\\ObjectStore\\Swift', 'arguments' => array( 'username' => 'xxx', 'password' => 'xxx', 'bucket' => 'xxx', 'autocreate' => true, 'region' => 'xxx', 'url' => 'xxx', 'tenantName' => 'xxx', 'serviceName' => 'swift', ), ), ); Warning - all existing files and folders are deleted from NextCloud however they remain in the local storage folder. Files in the (fresh) bucket are renamed and look like urn:oid:xxxcinghaman commentedon Apr 1, 2020
Did not work for me I am on Nextcloud 18.0.3 and seems it still has this same issue
I did a new installation (didn't know we have to create an additional file for bucket) and landed on this page followed everything but seems maintenance: install is no longer available
gondaz commentedon Apr 14, 2020
Bumped into the same issue (18.0.3). Nothing from the workarounds above helped me to get it working with S3 whether on fresh install or old if using k8s. Looks like the bug still persists and keeps traveling from one version to another without any improvements...
cinghaman commentedon Apr 14, 2020
Hi I finally got it working
1: Install a fresh copy
2: Once installed logged into the admin dashboard > apps > enable external storage
3: Go back to your command line
4: Edit the config.php file change install to false
5: create a storage.config.php file add objectstorage details (bucket/api keys)
6: Run Maintenance occ command
PS: Make sure the bucket name you are adding is not already existing
This now works for me but it created another problem When I delete anything in nextcloud it does not get deleted in the bucket so it keeps on storing everything even if i permanently remove it.