Troubleshooting issues when configuring ODBC & JDBC Drivers(配置 ODBC 和 JDBC 驱动程序时的故障排除)¶
"ODBC ERROR [IM003] Specified driver could not be loaded"¶
Problem¶
The following error is raised when trying to use the ODBC driver on Windows:
ODBC: ERROR [IM003] Specified driver could not be loaded due to system error 126: The specified module could not be found. (FoundrySqlDriver, C:\Program Files\Palantir\Foundry ODBC Driver\bin64\<ModuleName>.dll)
Solution¶
Ensure you have the latest Microsoft Visual C++ Redistributable ↗ installed on the host.
"FoundrySqlServer\:InvalidDatasetCannotAccess"¶
Problem¶
The following error is raised when running a SQL query with the ODBC driver, JDBC driver, or BI tool connectors for Palantir Foundry:
FoundrySqlServer:InvalidDatasetCannotAccess
Solution¶
The user account configured in the ODBC connection may not have permission to view the dataset(s) referenced in the query.
Take one of the following actions to verify access:
- Log into Foundry using the relevant user account, navigate to the relevant datasets, and ensure that data can be accessed as expected.
- Individuals with sufficient permissions may follow the instructions in the guide to checking permissions to verify access on behalf of the relevant account.
"FoundrySqlServer\:TooManyRows"¶
Problem¶
The following error is raised when running a SQL query with the ODBC driver, JDBC driver, or BI tool connectors for Palantir Foundry:
FoundrySqlServer:TooManyRows
Solution¶
Some SQL queries are subject to row limits for performance reasons. Review the documentation for Foundry SQL Server's execution engines to learn about these limits, and how to define queries that avoid them.
Connection errors with custom SSL certificates¶
Problem¶
When attempting to connect to Foundry using the JDBC or ODBC driver, you may encounter an error message indicating that the driver is unable to establish a secure connection with Foundry. The error message may look like the following:
Dialogue transport failure; PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
This error indicates that the driver, when connecting to your Foundry URL, was unable to verify that the server's SSL certificate was signed by a trusted Certificate Authority (CA). This can happen when the CA is not known to your operating system's truststore, or the driver is unable to access the operating system truststore.
You might encounter custom CAs and certificates in the following scenarios:
- Your Foundry URL uses your organization's domain instead of a Palantir-provided domain (for example,
foundry.[your-organization].cominstead of[your-organization].palantirfoundry.com). - Your organization's network is configured to perform TLS decryption/inspection, which causes the driver to see a different certificate than the one originally presented by Foundry.
Solution¶
Ensure that the driver has access to the custom certificate chain used by your organization, using one of the following methods.
Option 1: Load the custom certificate chain into your operating system truststore¶
By default, the driver uses your operating system's default truststore when verifying SSL certificates. Contact your organization's IT support to understand if your organization's custom certificate chain can be added to it. If so, the driver will be able to verify connections to Foundry without any additional configuration.
Option 2: Manually provide the custom certificate chain in PEM format¶
If your organization is unable to load the custom certificate chain into your operating system's default truststore, you can manually provide the certificate chain to the driver. To do this, obtain the certificate chain in PEM format and specify a path to that file using the TrustStorePath connection parameter of the JDBC or ODBC driver:
-
Obtain the certificate chain from a trusted connection. For example, if you can already access Foundry in Google Chrome, follow the instructions below to export the certificate chain in PEM format. If you use a different browser, refer to the browser's documentation for instructions on exporting the certificate chain.
-
Open Google Chrome and open your Foundry URL in a new tab.
- Select the padlock icon in the address bar, choose Connection is secure, then select Certificate is valid.
:::callout{theme="warning"} If Chrome reports that the connection is insecure and/or the certificate is invalid, there may be a separate issue causing certificate trust errors for all connections to Foundry from your computer. Consult your organization's IT support and Palantir support for assistance. :::
- Select the Details tab.
- Select Export....
- Choose Base64-encoded ASCII, certificate chain as the export format, and choose a location to save the certificate file. Select Save.
- Configure the driver to use the certificate chain by specifying the
TrustStorePathconnection parameter. The value of the property should be the full path to the file you exported in the previous step. Refer to ODBC & JDBC Drivers: Connection parameters to learn how to specify connection parameters.
中文翻译¶
配置 ODBC 和 JDBC 驱动程序时的故障排除¶
"ODBC 错误 [IM003] 无法加载指定的驱动程序"¶
问题¶
在 Windows 上尝试使用 ODBC 驱动程序时,会引发以下错误:
ODBC: ERROR [IM003] Specified driver could not be loaded due to system error 126: The specified module could not be found. (FoundrySqlDriver, C:\Program Files\Palantir\Foundry ODBC Driver\bin64\<ModuleName>.dll)
解决方案¶
确保主机上已安装最新的 Microsoft Visual C++ Redistributable ↗。
"FoundrySqlServer\:InvalidDatasetCannotAccess"¶
问题¶
使用 Palantir Foundry 的 ODBC 驱动程序、JDBC 驱动程序或 BI 工具连接器运行 SQL 查询时,会引发以下错误:
FoundrySqlServer:InvalidDatasetCannotAccess
解决方案¶
ODBC 连接中配置的用户账户可能没有权限查看查询中引用的数据集。
请执行以下任一操作来验证访问权限:
- 使用相关用户账户登录 Foundry,导航到相关数据集,并确保可以按预期访问数据。
- 拥有足够权限的个人可以按照权限检查指南中的说明,代表相关账户验证访问权限。
"FoundrySqlServer\:TooManyRows"¶
问题¶
使用 Palantir Foundry 的 ODBC 驱动程序、JDBC 驱动程序或 BI 工具连接器运行 SQL 查询时,会引发以下错误:
FoundrySqlServer:TooManyRows
解决方案¶
出于性能原因,某些 SQL 查询受到行数限制。请查阅 Foundry SQL Server 的执行引擎文档,了解这些限制以及如何定义避免这些限制的查询。
使用自定义 SSL 证书时的连接错误¶
问题¶
尝试使用 JDBC 或 ODBC 驱动程序连接到 Foundry 时,可能会遇到错误消息,指示驱动程序无法与 Foundry 建立安全连接。错误消息可能如下所示:
Dialogue transport failure; PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
此错误表明驱动程序在连接到您的 Foundry URL 时,无法验证服务器的 SSL 证书是否由受信任的证书颁发机构(CA)签名。当 CA 不被操作系统的信任库(truststore)识别,或者驱动程序无法访问操作系统信任库时,可能会发生这种情况。
在以下场景中,您可能会遇到自定义 CA 和证书:
- 您的 Foundry URL 使用您组织的域名,而不是 Palantir 提供的域名(例如,使用
foundry.[your-organization].com而不是[your-organization].palantirfoundry.com)。 - 您组织的网络配置为执行 TLS 解密/检查,这会导致驱动程序看到的证书与 Foundry 最初提供的证书不同。
解决方案¶
使用以下方法之一,确保驱动程序可以访问您组织使用的自定义证书链。
选项 1:将自定义证书链加载到操作系统信任库中¶
默认情况下,驱动程序在验证 SSL 证书时使用操作系统的默认信任库。请联系您组织的 IT 支持,了解是否可以将组织的自定义证书链添加到其中。如果可以,驱动程序无需任何额外配置即可验证与 Foundry 的连接。
选项 2:手动提供 PEM 格式的自定义证书链¶
如果您的组织无法将自定义证书链加载到操作系统的默认信任库中,您可以手动向驱动程序提供证书链。为此,请获取 PEM 格式的证书链,并使用 JDBC 或 ODBC 驱动程序的 TrustStorePath 连接参数指定该文件的路径:
-
从受信任的连接获取证书链。 例如,如果您已经可以在 Google Chrome 中访问 Foundry,请按照以下说明以 PEM 格式导出证书链。如果您使用其他浏览器,请参阅该浏览器的文档以获取导出证书链的说明。
-
打开 Google Chrome,并在新标签页中打开您的 Foundry URL。
- 选择地址栏中的挂锁图标,选择连接是安全的,然后选择证书有效。
:::callout{theme="warning"} 如果 Chrome 报告连接不安全且/或证书无效,则可能存在其他问题,导致从您的计算机到 Foundry 的所有连接都出现证书信任错误。请咨询您组织的 IT 支持和 Palantir 支持以获取帮助。 :::
- 选择详细信息选项卡。
- 选择导出...。
- 选择Base64 编码的 ASCII,证书链作为导出格式,并选择保存证书文件的位置。选择保存。
- 通过指定
TrustStorePath连接参数来配置驱动程序使用证书链。 该属性的值应为上一步中导出文件的完整路径。请参阅 ODBC 和 JDBC 驱动程序:连接参数了解如何指定连接参数。