ODBC and JDBC encryption and certificates

Last Updated : Sep 19, 2024 |

This section provides the resolution for common ODBC and JDBC client and server communication issues:

Failure 1

You see the following error message:

Microsoft .NET Framework Unhandled exception: Access to registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SqlHosts

This exception might occur when executing the ODBC Data Sources program or the Informix Client-SDK ConnectTest program. A permission issue exists for the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SqlHosts.

Resolution 1

Run the ODBC Data Sources program or Informix Client-SDK ConnectTest program as an administrator.

When you run the programs as administrator, an unhandled JIT exception may occur after resolution. This exception can be ignored and you can click Continue to finish running the program.

Failure 2

You see the following error message:
IBM Informix ODBC Error Message: GSK_KEYRING_OPEN_ERROR

This error occurs when executing an ODBC connection. This typically occurs when configuring the System DSN in the ODBC Data Sources program (and executing Apply & Test) or executing query in the ConnectTest program. An access issue exists to the file cli_cms_ol.p12 or cli_cms_ol.sth, which are both referenced in the conssl.conf file.

Resolution 2

Verify the following:
  • Double or single quotes are not used.

  • The short path name is correct.

  • There are no spaces in the path.

  • The SSL_KEYSTORE_FILE and SSL_KEYSTORE_STH must have Read permissions at minimum.

Failure 3

You see the following error message:
HCL Informix ODBC Error Message: GSK_BAD_KEYFILE_PASSWORD

This error occurs when executing the ODBC Data Sources program or the Informix Client SDK ConnectTest program and you attempt to access the database. There is an access issue with the cms_ol.sth file, which is referenced in the conssl.conf file.

Resolution 3

Set Read permissions or higher for the cms_ol.sth file.

Failure 4

You see the following error message:
HCL Informix ODBC Error Message: GSK_ERROR_BAD_CERT

This error occurs with the ODBC connection. This typically occurs when configuring the System DSN in the ODBC Data Sources program or running a query in the ConnectTest program. The configured client certificate in the cms_ol.p12 file, referenced in the conssl.conf file, is inconsistent with the CMS server database certificate.

Resolution 4

Failure 5

You see the following error message:
HCL Informix ODBC Error Message: INFORMIXSERVER does not match either INFORMIXSERVER
or DATABASESERVERALIASES

This error occurs when trying to select a database or when running a query.

Resolution 5

The Server field must be cms_net or cms_<hostname>.

Failure 6

You see the following error message:

HCL Informix ODBC Error Message: Invalid message received during connection attempt

This error occurs when trying to connect or when running a query.

Resolution 6

If using an encrypted ODBC or JDBC connection, select olsocssl in the Protocol list.

When using a plain non-encrypted TCP ODBC or JDBC connection, select olsoctcp in the Protocol list.

Failure 7

You see the following error message:

HCL Informix ODBC Error Message: Database Locale mismatch.

Resolution 7

In the ODBC Data Sources program:

  1. Click the Environment tab.

  2. Click Use Database Locale.

  3. Click Apply.

  4. Run ConnectTest.

    The database connection is verified, so you can ignore the error.