Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log file flooded with apps/user_ldap/lib/Access.php#1852 #7804

Closed
buttle opened this issue Jan 12, 2018 · 7 comments
Closed

Log file flooded with apps/user_ldap/lib/Access.php#1852 #7804

buttle opened this issue Jan 12, 2018 · 7 comments
Labels
Milestone

Comments

@buttle
Copy link

buttle commented Jan 12, 2018

Hello,

We’ve recently started using LDAP with more than just test users. I am seeing this error in the log.

Nextcloud version (eg, 12.0.2): 12.0.4.3
Operating system and version (eg, Ubuntu 17.04): ubuntu xenial
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.18 (Ubuntu)
PHP version (eg, 7.1): PHP 7.0.22-0ubuntu0.16.04.1 (cli) ( NTS )

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it: Unknown

The output of your Nextcloud log in Admin > Logging:
The log file is absolutely flooded with this message
Invalid argument supplied for foreach() at /var/www/nextcloud/apps/user_ldap/lib/Access.php#1852

The output of config.php file

$CONFIG = array (
  'instanceid' => 'xxxxxxxxxxxxxx',
  'passwordsalt' => 'xxxxxxxxxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx,
  'trusted_domains' => 
  array (
    0 => 'my_domain.com',
  ),
  'datadirectory' => '/opt/nextcloud-data',
  'overwriteprotocol' => 'https',
  'overwrite.cli.url' => 'http://my_domain.com',
  'htaccess.RewriteBase' => '/',
  'dbtype' => 'mysql',
  'version' => '12.0.4.3',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'installed' => true,
  'ldapIgnoreNamingRules' => false,
  'default_language' => 'ca',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'redis' => 
  array ( 
    'host' => 'localhost',
    'port' => 6379,
  ),
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'mail_smtpmode' => 'sendmail',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'no-reply',
  'mail_domain' => 'mydomain.com',
);

Thanks for any help!

@MorrisJobke
Copy link
Member

cc @nextcloud/ldap

@MorrisJobke MorrisJobke added feature: ldap 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Jan 30, 2018
@blizzz
Copy link
Member

blizzz commented Jan 31, 2018

Seems to be an LDAP config issue, please check your bases.

@MorrisJobke
Copy link
Member

Could this one be catched a bit more nicely? To avoid such strange errors in the logs (because a wrong configuration should not lead to exceptions like this IMO).

@buttle
Copy link
Author

buttle commented Feb 1, 2018

Hi,
I've checked my config again. All tests in the wizard pass Ok.
We can login and use groups defined in the DIT without any problem.

I've noticed that every login generates two log entries (sometimes just one)

Error | PHP | Invalid argument supplied for foreach() at /var/www/nextcloud/apps/user_ldap/lib/Access.php#1855 | 2018-02-01T13:14:18+0100
Error | PHP | Invalid argument supplied for foreach() at /var/www/nextcloud/apps/user_ldap/lib/Access.php#1855 | 2018-02-01T13:14:18+0100

I also see these ocasionally

Error | PHP | ldap_search(): Partial search results returned: Sizelimit exceeded at /var/www/nextcloud/apps/user_ldap/lib/LDAP.php#293 | 2018-02-01T13:11:49+0100
Error | PHP | ldap_search(): Partial search results returned: Sizelimit exceeded at /var/www/nextcloud/apps/user_ldap/lib/LDAP.php#293 | 2018-02-01T13:11:32+0100

If you tell me how, I'll be pleased to provide more info.

Thanks.

@buttle
Copy link
Author

buttle commented Feb 6, 2018

Hi,
Just updated to nextcloud 13.0.0

Error | PHP | Invalid argument supplied for foreach() at /var/www/nextcloud/apps/user_ldap/lib/Access.php#1913 | 2018-02-06T14:51:58+0100
Error | PHP | Invalid argument supplied for foreach() at /var/www/nextcloud/apps/user_ldap/lib/Access.php#1913 | 2018-02-06T14:51:58+0100

I have removed the "Default password policy DN" policy I use (which seemed to test ok), and the error has stopped!
I hope that helps debug this.

Cheers.

@blizzz
Copy link
Member

blizzz commented Feb 27, 2018

@GitHubUser4234 any chance you could look into it?

@GitHubUser4234
Copy link
Contributor

Somehow this didn't trigger error logs in NC 12.0.0, but since I now upgraded to NC 13, I found the error, too. Fixed it in #9360

@MorrisJobke MorrisJobke added bug 3. to review Waiting for reviews and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels May 2, 2018
@MorrisJobke MorrisJobke added this to the Nextcloud 14 milestone May 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants