# Bug OP-10515 - LDAP error: LdapError: Connection timed out - user specified timeout

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-10515

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module |  |
| Target versions |  |
| Observed in versions | 12.1.0 |
| Sprint |  |
| Backlog bucket |  |
| Bug found in version (deprecated) | 12.1.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

1.  Login as a user with LDAP authentication backend enabled
2.  Login will fail with Error 500 on the web page and in the logs:

> LDAP initializing search (BASE=\*\*\*\*\*\*\*\*\*\*), (FILTER=\*\*\*\*\*\*\*\*\*\*)  
> user=2 LdapError: Connection timed out - user specifid timeout: LdapError: Connection timed out - user specified timeout  
> \[AuthSource::Error\] LdapError: Connection timed out - user specified timeout: app/models/ldap\_auth\_source.rb:56:in 'rescue in authenticate'; app/models/ldap\_auth\_source.rb:46:in 'authenticate'; app/models/user.rb:208:in 'try\_authentication\_for\_existing\_user'; app/models/user.rb:188:in 'try\_to\_login'; app/controllers/account\_controller.rb:406:in 'password\_authentication'; app/controllers/account\_controller.rb:401:in 'authenticate\_user'; app/controllers/account\_controller.rb:55:in 'login'

    3. If the user tries to log in again within 5-10 seconds, the login will suceed. After that time, this same error happens again.

### What is the buggy behavior?

  - Trying to log in will fail most of the times when using LDAP authentication backend.
  - See error in block quote in section above.
  - Logging in quickly (within a few seconds) a second time will work and the user will log in.

### What is the expected behavior?

1.  User logs in succesfully with their AD credentials.

### Notes

This AD/LDAP works well for many other projects. OpenProject seems to be the only one having these time out issues.

AD/LDAP logs show no errors or warnings with the OpenProject connections.

Since the connection and log in works on the second try, the credentials are known to be valid and other parameters (ssl, base dn, filter string, etc.) work as well.

Our firewall logs do not show any packets being blocked or failing.

### **Logs**

#### OpenProject web container logs:

LDAP initializing search (BASE=\*\*\*\*\*\*\*\*\*\*), (FILTER=\*\*\*\*\*\*\*\*\*\*)  
user=2 LdapError: Connection timed out - user specifid timeout: LdapError: Connection timed out - user specified timeout  
\[AuthSource::Error\] LdapError: Connection timed out - user specified timeout: app/models/ldap\_auth\_source.rb:56:in 'rescue in authenticate'; app/models/ldap\_auth\_source.rb:46:in 'authenticate'; app/models/user.rb:208:in 'try\_authentication\_for\_existing\_user'; app/models/user.rb:188:in 'try\_to\_login'; app/controllers/account\_controller.rb:406:in 'password\_authentication'; app/controllers/account\_controller.rb:401:in 'authenticate\_user'; app/controllers/account\_controller.rb:55:in 'login'

#### Failed login message on web page:

\[Error 500\] An error occurred on the page you were trying to access. If you continue to experience problems please contact your OpenProject administrator for assistance.

### Environment information

**OpenProject installation type**

- [ ] Hosted cloud edition
- [ ] Packaged installation
    - What distribution?
- [ ] Docker All-in-one container
- [x] Docker-compose installation
- [ ] Other (please specify)

**OpenProject version**

v12.1.4

**Browser**

- [x] Chrome
- [x] Firefox
- [ ] Safari
- [ ] Mobile Safari
- [ ] Other (please specify)

**Language**

English
