Closed krakazyabra closed 3 years ago
Why do you think that's an issue for nextcloud/server? I guess if social_login (the user_backend) says the user exist there is not much we can do.
hi @kesselb
It is nextcloud, who is reporting that, because I'm calling to /ocs/v1.php/cloud/users
. And this endpoint reports, that user exists. Social login doesn't create users (it can, but this function is disabled). Because this is disabled by me, I have to create a user manually, before user can login, for that I'm using Nextcloud API and executing curl -X POST https://admin:<VERYSTRONGPASSWORD>@nc-api.domain.org/ocs/v1.php/cloud/users -H "OCS-APIRequest: true" -d userid="USER ID" -d password="USER PASSWORD"
May be I was not clear, let me explain it again:
curl -X POST https://admin:<VERYSTRONGPASSWORD>@nc-api.domain.org/ocs/v1.php/cloud/users -H "OCS-APIRequest: true" -d userid="USER ID" -d password="USER PASSWORD"
) I receive error
<?xml version="1.0"?>
<ocs>
<meta>
<status>failure</status>
<statuscode>102</statuscode>
<message>User already exists</message>
<totalitems></totalitems>
<itemsperpage></itemsperpage>
</meta>
<data/>
</ocs>
@zorn-v am I right, that in this process social login does not take part?
am I right, that in this process social login does not take part?
Yes, it use default "user backend" and does not provide own
cc @rullzer @ChristophWurst
@kesselb @rullzer @ChristophWurst Is there any progress with it?
nope
More context - AFAIR this problem is "floating", may occur and may not. I think problem maybe in some "cloud config" (like k8s) and several distributed servers/containers.
Yesterday I got idea: we're running nextcloud in 3 replicas with shared config and common DB, there is service in front of them, which is pointing to random replica of nextcloud. Can it be the cause of such message?
Em, with that message user actually created ? If yes - of course can. Some two requests to different servers from "proxy", return first received response and gotcha.
we're running nextcloud in 3 replicas with shared config and common DB, there is service in front of them, which is pointing to random replica of nextcloud. Can it be the cause of such message?
do you also share the session data?
do you also share the session data?
Should I do it manually? I thought such kind of data should be in redis.
nah redis is perfectly fine. you just shouldn't use local files on each of the nodes :)
local files on each of the nodes
No, there is NFS filesystem (read-write-many) with nextcloud, which mounts in /var/www/nextcloud of each replica :)
Today I created dedicated replica of the same nextcloud (same nfs, db, redis, config), use separate url to access exactly this replica. Will try to point api requests to this single-replica. If error will go away - then the deal is in multi-replicas.
After 5 months started to get this error again.
Month ago upgraded Nextcloud to 19.0.10.
Have no idea, why it appeared again. And have no idea, how to debug.
Is this Issue still valid in NC21.0.3? If not, please close this issue. Thanks! :)
I don't know about 21st version, I'm using 19th. And will use it until the end-of-life. So, please, try to find the solution for 19th version.
that was unexpected xD I'll upgrade to 20th and update current issue, or will close it.
This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.
Steps to reproduce
Array ( [password] => PASSWORD [userid] => USER ID )
<?xml version="1.0"?>
<?xml version="1.0"?>
No messages
Enabled:
Nextcloud configuration:
Config report
``` { "system": { "theme": "mytheme", "blacklisted_files": [], "mail_smtpmode": "sendmail", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": 25, "mail_smtptimeout": 10, "mail_smtpsecure": "", "mail_smtpauth": false, "mail_smtpauthtype": "LOGIN", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "logfile": "\/dev\/stdout", "enable_previews": true, "preview_max_filesize_image": 4096, "preview_max_y": 4096, "preview_max_x": 4096, "enabledPreviewProviders": [ "OC\\Preview\\PNG", "OC\\Preview\\JPEG", "OC\\Preview\\GIF", "OC\\Preview\\HEIC", "OC\\Preview\\BMP", "OC\\Preview\\XBitmap", "OC\\Preview\\MP3", "OC\\Preview\\TXT", "OC\\Preview\\MarkDown", "OC\\Preview\\Illustrator", "OC\\Preview\\Photoshop" ], "logtimezone": "Europe\/Prague", "social_login_auto_redirect": true, "updatechecker": false, "has_internet_connection": true, "objectstore_multibucket": { "class": "\\OC\\Files\\ObjectStore\\S3", "arguments": { "num_buckets": 15000, "bucket": "nextcloud-", "autocreate": true, "key": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "use_ssl": true, "hostname": "***REMOVED SENSITIVE VALUE***", "port": 443, "use_path_style": true } }, "onlyoffice": { "jwt_header": "Authorization", "verify_peer_off": true }, "loglevel": 3, "trusted_domains": [ "nc.domain.org", "localhost", "10.*.*.*", "onlyoffice.domain.org", "nc-api.domain.org", "*cluster.local" ], "memcache.local": "\\OC\\Memcache\\APCu", "memcache.distributed": "\\OC\\Memcache\\Redis", "memcache.locking": "\\OC\\Memcache\\Redis", "filelocking.enabled": false, "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": "6379", "timeout": 0 }, "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "19.0.1.1", "overwrite.cli.url": "https:\/\/nc.domain.com", "overwriteprotocol": "https", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "updater.release.channel": "stable", "maintenance": false } } ```Are you using external storage, if yes which one: local/smb/sftp/... Minio S3 as default backend
Are you using encryption: yes/no No
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... Keyclak and Social login app in NC
Logs
Nextcloud log (data/nextcloud.log)
Nothing criminal for this operation
For me it is similar to https://github.com/nextcloud/server/issues/14796 but I'm using SSO instead of LDAP For automated user creation I'm using such command: