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

Excessive LDAP log messages #11624

Closed
gig13 opened this issue Oct 16, 2014 · 13 comments · Fixed by #13848
Closed

Excessive LDAP log messages #11624

gig13 opened this issue Oct 16, 2014 · 13 comments · Fixed by #13848

Comments

@gig13
Copy link

gig13 commented Oct 16, 2014

Expected behavior
Suppress LDAP log messages that are not fatal when the log level is set to 4 (Fatal only). Report fatal errors with useful audit information so we can determine which user(s) are having issues.

Actual behavior
The log displays an excessive amount of bind failed:19: Constraint violation messages. These messages appear to be coming mostly from Windows Sync client users who's password's have recently changed, or are incorrect, or during network hiccups and the Windows sync client attempts to reconnect multiple times a second which locks their LDAP account. (An anti-DoS setting in LDAP server)

Steps to reproduce

  1. Set the log level to 4 (Fatal only)
  2. Setup a sync client for an LDAP user
  3. Change password's for the LDAP user several times - observe the logs

Server Configuration
OS: RHEL6.6 x86_64
DB: MySQL 5.1.73-3.el6_5
PHP: php x86_64 5.3.3-38.el6 (Red Hat back ports security patches)

Log messages:

Oct 16 09:59:55 ldrive ownCloud[14461]: {user_ldap} Bind failed: 19: Constraint violation
Oct 16 09:59:55 ldrive ownCloud[14461]: {user_ldap} Bind failed: 19: Constraint violation
Oct 16 09:59:55 ldrive ownCloud[14809]: {user_ldap} Bind failed: 19: Constraint violation
Oct 16 09:59:56 ldrive ownCloud[14809]: {user_ldap} Bind failed: 19: Constraint violation
Oct 16 09:59:56 ldrive ownCloud[9618]: {user_ldap} Bind failed: 19: Constraint violation
Oct 16 09:59:56 ldrive ownCloud[9618]: {user_ldap} Bind failed: 19: Constraint violation
Oct 16 09:59:56 ldrive ownCloud[18988]: {user_ldap} Bind failed: 19: Constraint violation 
@karlitschek
Copy link
Contributor

@blizzz

@blizzz
Copy link
Contributor

blizzz commented Oct 17, 2014

The message is already level 3. Messages written to the log file are always at least level 3. I don't know the motiviation behind this, but most likely is to have errors available if something happens, which is valid IMHO.

cc @DeepDiver1975

@PVince81
Copy link
Contributor

"Contraint violation" already seems like something bad.
Is there a way to prevent that message in the first place, if it's expected ?

@blizzz
Copy link
Contributor

blizzz commented Oct 17, 2014

It actually is a bit bizarre that the servers replies with 19, since it actually is meant to be thrown in other use cases (writing to LDAP) which we do not do. 49 is usually the case when credentials are wrong, but that might be different on locked users on AD. We could catch this.

@cdamken
Copy link
Contributor

cdamken commented Oct 17, 2014

I think is the same problem and scenario like: #9383

Instead 19 appears 49, but the same behavior. ..

The solution: I'll better make a cron to erase all lines.

@blizzz
Copy link
Contributor

blizzz commented Oct 17, 2014

The problem is rather that the client does not ask for a new password, but retries again and again, see owncloud/client#2186

@gig13
Copy link
Author

gig13 commented Dec 30, 2014

@MorrisJobke

@MorrisJobke
Copy link
Contributor

@blizzz @dragotin Wasn't there also a issue that the client doesn't know if the LDAP server has gone, the password has changed or the password is correct and something other happened?

@MorrisJobke
Copy link
Contributor

owncloud/client#2615 Is this related?

@MorrisJobke
Copy link
Contributor

@blizzz The solution here is to catch erro 19 as well and don't log it?

@blizzz
Copy link
Contributor

blizzz commented Jan 13, 2015

Honestly, I do not see a point to prevent it from being logged. Because next time, there will be a reporter complaining that user x cannot login and no information about the cause is written to the log file.

I can offer to move this from ERROR to WARN level, if that helps?

@cdamken
Copy link
Contributor

cdamken commented Feb 3, 2015

@blizzz That was my wish list in #9383 😄

@MorrisJobke
Copy link
Contributor

Fix is here: #13848

@MorrisJobke MorrisJobke added this to the 8.1-next milestone Feb 3, 2015
MorrisJobke added a commit that referenced this issue Feb 7, 2015
Reduce log level of bind failed to WARN - fixes  #11624
@MorrisJobke MorrisJobke removed their assignment Oct 5, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants