Getting error message "This driver is not configured for integrated authentication" when trying to connect to a Microsoft SQL Server database

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

要約

When trying to use the option "integratedSecurity=true" for the database connection in <bamboo-home>/bamboo.cfg.xml:

<property name="hibernate.connection.url">jdbc:sqlserver://localhost:1433;databaseName=bamboo;integratedSecurity=true</property>

Bamboo shows in its logs (<bamboo-home>/logs/atlassian-bamboo.log) the following error message: 

This driver is not configured for integrated authentication" and doesn't establish a connection to the database.

環境

Observed in Bamboo 6 connected to a Microsoft SQL Server Database.

診断

Looking at the Bamboo logs (<bamboo-home>/logs/atlassian-bamboo.log), messages similar to the following can be seen:

2017-06-22 10:52:35,163 ERROR [localhost-startStop-1] [AbstractUpgradeManager] java.lang.RuntimeException: java.sql.SQLException: Connections could not be acquired from the underlying database!
java.lang.RuntimeException: java.sql.SQLException: Connections could not be acquired from the underlying database!
	at com.google.common.base.Throwables.propagate(Throwables.java:160)
	at com.atlassian.bamboo.upgrade.AbstractBootstrapUpgradeTask.getDatabaseConnection(AbstractBootstrapUpgradeTask.java:47)
…
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:0147495a-6902-4d38-8253-3cf3287759df
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1748)
	at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<init>(AuthenticationJNI.java:58)
…
Caused by: java.lang.UnsatisfiedLinkError: no sqljdbc_auth in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
	at java.lang.System.loadLibrary(System.java:1122)
	at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<clinit>(AuthenticationJNI.java:32)

原因

SQL Server Integrated Authentication isn't natively supported in Bamboo 6.0.x since the transition to Microsoft JDBC from JTDS.
BAM-18494 - Getting issue details... STATUS

Integrated authentication allows the driver to log in to the database server using Windows / Domain authentication. The credentials are assumed from the Bamboo Service user. For more details check this Microsoft page.

ソリューション

This workaround assumes the relevant attributes have already been added to the JDBC connection string in <bamboo-home>/bamboo.cfg.xml. E.g.:

<property name="hibernate.connection.url">jdbc:sqlserver://localhost:1433;databaseName=bamboo;integratedSecurity=true</property>
  1. Check <BAMBOO_INSTALL>\lib\ to find which version of the Microsoft SQL driver is bundled. For example, Bamboo 9.0 ships with mssql-jdbc-9.4.0.jre8.jar;
  2. Find the relevant release for the Microsoft JDBC driver downloads for that version: https://github.com/microsoft/mssql-jdbc/releases;
  3. Download the mssql-jdbc_auth.zip for the release that matches the version bundled with Bamboo;
  4. Copy the relevant DLL for your platform from the archive (e.g. x86 vs x64);
  5. Place it in a location on the java.library.path. For Windows, this is a location on your %PATH% environment variable or <bamboo-install>\bin;
  6. Bamboo を再起動します。
Last modified on Mar 23, 2023

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.