Unable to Connect to SQL Server due to Login from an Untrusted Domain Error

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

Symptoms

JIRA is unable to start or access the database and displays the error "Login failed. The login is from an untrusted domain and cannot be used with Windows authentication".

The following appears in the atlassian-jira.log:

1 2 3 4 5 6 7 2012-12-18 20:27:24,962 localhost-startStop-1 ERROR [NoModule] Error getting datasource via DBCP: JdbcDatasourceInfo{uri='jdbc:jtds:sqlserver://srv-mssql1:1433/JiraDB;domain=AVENGERS;instance=INITIATIVE', driverClassName='net.sourceforge.jtds.jdbc.Driver', username='aquaman', password='********', isolationLevel='null', connectionProperties=null, connectionPoolInfo=ConnectionPoolInfo{maxSize=15, minSize=2, initialSize=null, maxIdle=15, maxWait=60000, sleepTime=300000, lifeTime=600000, deadLockMaxWait=600000, deadLockRetryWait=10000, validationQuery=null, minEvictableTimeMillis=null, timeBetweenEvictionRunsMillis=null, poolPreparedStatements=null, testOnBorrow=null, testOnReturn=null, testWhileIdle=null, maxOpenPreparedStatements=null, numTestsPerEvictionRun=null, removeAbandonedTimeout=null, validationQueryTimeout=null, defaultCatalog=null}} org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.) at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) at org.apache.commons.dbcp.BasicDataSource.setLogWriter(BasicDataSource.java:1134) at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.getConnection(DBCPConnectionFactory.java:109) at org.ofbiz.core.entity.ConnectionFactory.tryGenericConnectionSources(ConnectionFactory.java:69)

Diagnosis

The JIRA instance is configured to connect to SQL Server using the default 'Windows Authentication Mode'.

Cause

The JIRA database connection does not support 'Windows Authentication Mode'.

Solution

Resolution

  1. Stop JIRA.

  2. Switch the SQL Server to 'Mixed Authentication Mode'. Further information on configuring SQL Server for JIRA can be found in our SQL Server Documentation:

  3. Modify the database connection Using the JIRA Configuration Tool or directly in the server.xml manually so that the JDBC connection string is correctly configured.

  4. Start JIRA and verify it is able to authentication successfully against the database.

ℹ️ Additional information on this error can be found within this SQL Server Protocols Blog.

Updated on April 15, 2025

Still need help?

The Atlassian Community is here for you.