Unable to Connect to SQL Server Due to Error: 18456, Severity: 14, State: 12 - Bitbucket Data Center
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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
The following error appears in the SQL Server log:
Login failed for user '<BITBUCKET_USER>'. Reason: Login-based server access validation failed with an infrastructure error. Check for previous errors. [Client: 127.0.0.1] Error: 18456, Severity: 14, State: 12
The following appears in the
atlassian-bitbucket.log
:2015-04-09 13:53:16,046 WARN [http-nio-80-exec-7] user @1BFSM6Dx833x1035x0 35ndgf 192.168.30.100 "POST /admin/db/edit HTTP/1.1" c.a.s.i.db.DefaultDatabaseManager A connection could not be opened with the DataSource org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user '<BITBUCKET_USER>'. ClientConnectionId:
Diagnosis
N/A
Cause
Error: 18456, Severity: 14, State: 12
means that the authentication is successful, but the server access fails due to permission.
Solution
Ensure that the SQL Server Authentication mode is enabled.
Assuming that the SQL Server username is
bitbucketuser
, run the following SQL query in a master database, to give the permission to connect via TCP/IP:GRANT CONNECT SQL TO "bitbucketuser" GRANT CONNECT ON ENDPOINT::"TSQL Default TCP" TO "bitbucketuser";
Was this helpful?