Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Connecting a domain user to MSSQL Instance with BitBucket on Linux

Tim Wisian October 11, 2018

Hi there,

I installed BitBucket 5.14 on Linux and I'm trying to configure it now via the browser. I have a Windows-domain user to connect to a MSSQL-Cluster named MSSQL\INSTANCE\.

The error message is 

Login failed for user 'domain-user'. ClientConnectionId:7a4bb350-69f1-4385-8068-eb8f69781783
	com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:217)
	com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:279)
	com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:99)


I remember nearly the same problems installing and configuering Jira with a domain user.... what's it like with BitBucket? How do I tell BitBucket and MSSQL to use domain users?

 

Thx in advance

Tim

 

 

1 answer

0 votes
VICTOR-OSEGHALE
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 11, 2018

Hey Tim,

Thanks for reaching out here.

The database user should not be the database owner, but should be in the db_owner role. It needs to be in this role during setup and at all points when Bitbucket Server is running. 

The Bitbucket Server database user should have permission to connect to the database, and to create and drop tables, indexes and other constraints, and insert and delete data, in the newly-created database.

You can find more resource about this in Connecting Bitbucket Server to SQL Server.

Kind Regards,
Victor.

Tim Wisian October 11, 2018

Hey Victor,

Thanks for the quick answer. I passed the link to my MSSQL-Collegues before I started to install BitBuckt. Never the less I asked them to check the things you mentioned.

 

We will see....

Kind Regards

Tim

VICTOR-OSEGHALE
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 11, 2018

Sure, let us know the outcome of this.

Tim Wisian October 11, 2018

Hi,

my collegues checked and double checked. 

The problem still persists.

I have two questions :

  1. How do I tell the BitBucket DB Connectiondialogue to use a MSSQL-Server with an Instance?
  2. How do I tell the BitBucket DB Connectionsdialogue to use an Windows domain user to log on the MSSQL DB?
Tim Wisian October 12, 2018

... and if BitBucket is not able to handle MSSQL-Instances from the installationprocess

https://confluence.atlassian.com/bitbucketserverkb/connecting-to-named-instances-in-sql-server-from-bitbucket-server-779171681.html

 

How do I connect with a windows doamin user?

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 17, 2018

Hi Tim,

I believe the answers to your follow up questions are actually explained inside the first setup document that Victor directed to you.  From that document:

Use Integrated Authentication or 'Windows Authentication Mode' (Optional)

Windows authentication is only available for Bitbucket Server instances running on Windows. It cannot be used on Linux because Microsoft does not provide shared objects for it. You will either need to run Bitbucket Server on Windows, allowing you to use Windows security, or you will need to enable mixed-mode authentication for SQL Server if you are running Bitbucket Server on Linux. Unfortunately, there are no other options at this time.

This is noted in the documentation https://confluence.atlassian.com/bitbucketserver/connecting-bitbucket-server-to-sql-server-776640385.html

Since you are using a Linux environment for Bitbucket installation, you actually won't be able to use the Integrated Windows Authentication here.  Which means you would need to confirm that your MSSQL server is running in mixed-mode authentication.  This settings allows both Windows and SQL user accounts to login.  In your case, for Linux servers, Bitbucket will need to use a SQL user account.  Meaning your Windows domain user account won't be able to login from a Linux server.

If your database can't be switched into mixed-mode, perhaps you can install Bitbucket to a Windows server instead in order to take advantage of the Microsoft libraries needed to handle this kind of authentication.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events