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

Still need help?

The Atlassian Community is here for you.

Ask the community

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:

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'.

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.

(info) Additional information on this error can be found within this SQL Server Protocols Blog.

Last modified on Nov 1, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.