User fails to login Bitbucket server application post OS update
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Admin user couldn't log in to Bitbucket server application after OS update. The login fails with the error:
Authentication failed because the user does not exist, the account is inactive, or the provided credentials are incorrect.
The issue may be seen for multiple users coming from either the Bitbucket internal directory or external LDAP directory.
Environment
- Bitbucket Data Center: Any supported Bitbucket version.
- Database: PostgreSQL.
- OS update on the database server that involves a
glibc
version upgrade >= 2.28.
Diagnosis
- Using Bitbucket lockout recovery process, reset the password for the admin user account to fix the problem. The admin user account may not be found. When trying to open user profile, a 404 error is seen in Bitbucket server UI.
- Navigating to users in Bitbucket server UI in recovery mode, their last authenticated time is not displayed.
- Create a temporary test admin user in recovery mode to log in to Bitbucket UI. Bitbucket can be successfully accessed by the original "admin user" post creating a temporary admin user. The last authenticated time for users is also displayed.
Cause
The potential root cause is the upgrade of the glibc
version to >=2.28 which causes issues with the search in the database itself. More details can be found in PostgreSQL - glibc upgrade.
Solution
- Stop the Bitbucket Data Center cluster.
Reindex the Bitbucket database schema:
REINDEX SCHEMA <SCHEMA_NAME>
- Start the Bitbucket Data Center cluster.
- If there's LDAP connector is configured, a full sync will happen after a restart - make sure this finishes successfully.
- Verify if the issue still persists.