It looks like it’s ping-ponging between two versions of the storage format for Data Hub installation settings. This also contains the encrypted licence key.
Could you try upgrading the 20.0.11 to a recent 20.0 release, for example 20.0.114? 20.0.11 is one of the first versions within 20.0.
And then try again.
RSA Implementation Used
If it still doesn’t work after that, it’s possible that two different RSA implementations are interfering with each other.
So please check what the value is of the environment variable INVANTIVE_RSA? Is it empty/absent or equal to INVANTIVE?
If the value of INVANTIVE_RSA is empty or different from INVANTIVE, please set it to INVANTIVE. Then reload the licence key on both 20.0 and 20.1 BETA if a licence key error occurs at startup. And then run the jobs again:
- first a random job with 20.0
- then a random 20.1 BETA job
- then a 20.0 job again
- and once more a 20.1 BETA
Does it work then?
Background
At least in 17.32 we used the built-in RSA encryption of Windows, but that turned out to be unreliably implemented or too difficult for our limited brain capacity. With Windows server patches, keys would regularly — but unpredictably — become invalid, and after patch Tuesday it was always a case of waiting to see whether we’d get flooded with calls because the servers could no longer process the jobs. This problem occurred on both on-premise and Azure and AWS servers. The most common error was something like:
Could not instantiate RSA crypto service provider for container 'InvantiveDevice' due to System.Security.Cryptography.CryptographicException: Key not valid for use in specified state.
at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer)
at System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle)
at System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair()
at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize)
at (Int32 , CspParameters )
at IBC.IDJ.U(Int32 , CspParameters )
at Invantive.Basics.StrongAsymmetricKey.CreateWindowsCryptoProvider(GlobalState owner, ExecutionOptions executionOptions, String keyContainerName)
Under Linux, Mac OSX, Android and iOS, Invantive SQL has had its own RSA implementation built in since the very first releases. Given the ongoing issues with Windows, at some point the default setting for Windows was also switched from the built-in RSA encryption to the in-house implementation.
Passing the Licence Key
An alternative option is to explicitly pass the licence key in every batch job. This can be done via the licensekey command-line option with Invantive Data Hub. An example of a batch job:
set INVANTIVE_TRACE_FOLDER=c:\trace\xxacme
set INVANTIVE_CONFIGURATION_DATABASES_FOLDER=c:\jobs\xxacme\cfg
set INVANTIVE_PRG=C:\Program Files (x86)\Invantive Software BV\Invantive Data Hub 20.0\Invantive.Producer.QueryEngine.exe
set INVANTIVE_CONN=groep\database
set INVANTIVE_SQL_FILE=c:\jobs\xxacme\sql\job.sql
set INVANTIVE_LOG_FILE=c:\jobs\xxacme\log\job-%%Y%%m.log
set INVANTIVE_LOG_FILE_OVERWRITE=False
set INVANTIVE_INTERACTIVE=False
set INVANTIVE_LICENSE_KEY=lhGCN...CBAcg==
"%INVANTIVE_PRG%" /verbose /database:"%INVANTIVE_CONN%" /file:"%INVANTIVE_SQL_FILE%" /logfile:"%INVANTIVE_LOG_FILE%" /logoverwrite:"%INVANTIVE_LOG_FILE_OVERWRITE%" /interactive:%INVANTIVE_INTERACTIVE% /licensekey:%INVANTIVE_LICENSE_KEY%
IF %ERRORLEVEL% NEQ 0 (
echo Failed Data Hub job with exit code %ERRORLEVEL%.
exit /b %ERRORLEVEL%
)
echo Completed Data Hub job with exit code %ERRORLEVEL%.
I can’t say in advance whether this will work completely, and certainly not for the combination of versions mentioned. That can only be determined through testing. It’s possible that it still keeps ping-ponging between the two versions and that, as a result, startup continues to give an itgenale014 error message.