Some Users can not log in

Hello. We have owncloud version 10.0.10.4
before today we did not have any problems. Today we have faced a big problem. Our owncloud integrated with active directory so users logging in with active directory login.
today some users are not able to login,we have more than 3000 users but only 10-15 users facet that error: the server encountered an internal error and was unable to complete your request.


Please help in this case where i need to look. Thanks

Hey,

i think the posted screenshot would be the first thing where to look. It seems ownCloud is already giving you the advice “More details can be found in the server log” there.

Maybe you can also use the issue template which i’m getting presented when creating a new thread in this “Server” category?

I think others are probably better able to help you if you provide more information about your environment and excerpts of your logfiles (both asked in the mentioned template).

Thank you for your reply. Of course i looked at log and found nothing, also digged google and found same issue in this portal from many users but could not find any solution and then wrote there. Regards

{“reqId”:“XOomvVyNe2Ta5SGHUJwO0AAAAAw”,“level”:3,“time”:“2019-05-26T05:40:13+00:00”,“remoteAddr”:“xx.xx.xx.xx”,“user”:“D684B621-1BB1-4D36-BDFF-AB4C46A8C7C6”,“app”:“index”,“method”:“GET”,“url”:"/index.php/apps/files/",“message”:“Exception: {“Exception”:“OC\\Share20\\Exception\\ProviderException”,“Message”:“Parent of share should be unique”,“Code”:0,“Trace”:”#0 \/var\/www\/owncloud\/lib\/private\/Share20\/DefaultShareProvider.php(894): OC\\Share20\\DefaultShareProvider->resolveGroupShares(Array, ‘D684B621-1BB1-4…’)\n#1 \/var\/www\/owncloud\/lib\/private\/Share20\/Manager.php(1195): OC\\Share20\\DefaultShareProvider->getAllSharedWith(‘D684B621-1BB1-4…’, NULL)\n#2 \/var\/www\/owncloud\/apps\/files_sharing\/lib\/MountProvider.php(71): OC\\Share20\\Manager->getAllSharedWith(‘D684B621-1BB1-4…’, Array, NULL)\n#3 \/var\/www\/owncloud\/lib\/private\/Files\/Config\/MountProviderCollection.php(77): OCA\\Files_Sharing\\MountProvider->getMountsForUser(Object(OC\\User\\User), Object(OC\\Files\\Storage\\StorageFactory))\n#4 [internal function]: OC\\Files\\Config\\MountProviderCollection->OC\\Files\\Config\\{closure}(Object(OCA\\Files_Sharing\\MountProvider))\n#5 \/var\/www\/owncloud\/lib\/private\/Files\/Config\/MountProviderCollection.php(78): array_map(Object(Closure), Array)\n#6 \/var\/www\/owncloud\/lib\/private\/Files\/Filesystem.php(445): OC\\Files\\Config\\MountProviderCollection->getMountsForUser(Object(OC\\User\\User))\n#7 \/var\/www\/owncloud\/lib\/private\/Files\/Filesystem.php(374): OC\\Files\\Filesystem::initMountPoints(‘D684B621-1BB1-4…’)\n#8 \/var\/www\/owncloud\/lib\/private\/legacy\/util.php(294): OC\\Files\\Filesystem::init(‘D684B621-1BB1-4…’, ‘\/D684B621-1BB1-…’)\n#9 \/var\/www\/owncloud\/lib\/base.php(908): OC_Util::setupFS()\n#10 \/var\/www\/owncloud\/index.php(54): OC::handleRequest()\n#11 {main}",“File”:"\/var\/www\/owncloud\/lib\/private\/Share20\/DefaultShareProvider.php",“Line”:1060}"}

This is the error when User logins.

Guys please help it started on friday and today 3rd user has same error. We have more than 5000 users using owncloud so if we will not find what is the problem it will be serious for us. I can add any parameter and config if you want. Thanks

Hi,

when I entered “Parent of share should be unique” into google I received the following results:


So as a wild guess I’d try occ files:clean first.
Then look for duplicates as described in the second link.

In general I’d recommend to upgrade your ownCloud to the latest version and, when more than 5000 users are depending on your ownCloud, you might want to consider an enterprise subscription with support.

1 Like

Thank you for your response. Where do we need to run this command and does this affect any users data?

i found that script. But i am still confused about clean. what this command will exactly do? Thanks

I cannot tell you by heart, but anyway, when I am about to perform potentially risky actions on any live environment I make a copy of the instance first and perform the steps on the copy.

1 Like

Thank you again. Of course took backup and tried.
sudo -u apache ./occ files:cleanup
0 orphaned file cache entries deleted
not affected still get same error.

This happens when a user receives a share personally and additionally again through a group.

You’ll have to go into the database and remove the duplicated shares, I’ll see if I can find some example SQL queries for you.

I think the root cause of this problem was fixed in ownCloud version 10.0.10, however as you have the problem now, you’ll have to remove the duplicate shares first.

Make sure to take a database dump before, and put ownCloud in maintenance mode during this operation.

  1. select parent, count () from oc_share where share_type = 2 group by parent, share_with having count ()> 1;
  1. select * from oc_share where parent = xxx order by share_with; (where ‘xxx’ is an ID returned by the previous query)
  1. delete from oc_share where id = ‘xxx’; (where ‘xxx’ is the ID (the largest) of a share that exists in duplicate which is being returned by the previous query)
1 Like