The following errors are observed when encryption is enabled on the Export on source:
Source:
sp_ctrl (alvsupl14:9111)> show log reverse
Info 2018-02-19 15:44:29.042149 23424 34894352 Export exited with code=1, pid = 15813 (exporting to alvsupl18 queue alvsupl14)
Warning 2018-02-19 15:44:29.040876 15813 1616960032 Export: Failed to enable encryption on target; check that the source and target encryption keys are the same (exporting to alvsupl18 queue alvsupl14) [module xpt]
Info 2018-02-19 15:44:28.972197 15813 1616960032 Export connected to import on alvsupl18
Info 2018-02-19 15:44:28.971103 15813 1616960032 Export connected to host on alvsupl18
Notice 2018-02-19 15:44:28.962004 15813 1616960032 Export: Encryption is enabled (exporting to alvsupl18 queue alvsupl14) [module xpt]
Info 2018-02-19 15:44:28.882062 15813 34894352 Export launched, pid = 15813 (exporting to alvsupl18 queue alvsupl14)
Target:
sp_ctrl (alvsupl18:9111)> show log reverse
Info 2018-02-19 15:45:58.443087 13894 924899168 Import exited with code=1, pid = 14289 (importing from alvsupl14)
Notice 2018-02-19 15:45:58.442088 14289 1522308960 Import: Set SP_IMP_ENABLE_AES=1 and set encryption key to the same value as export's encryption key on the source (importing from alvsupl14) [module imp]
Error 2018-02-19 15:45:58.441872 14289 1522308960 Import: Import encryption is not enabled (importing from alvsupl14) [module imp]
Notice 2018-02-19 15:45:58.441744 14289 1522308960 Import: Encryption is enabled (importing from alvsupl14) [module imp]
Info 2018-02-19 15:45:58.441548 14289 1522308960 Import connected to export on alvsupl14
Info 2018-02-19 15:45:58.366990 14289 924899168 Import launched, pid = 14289 (importing from alvsupl14)
The error message "Failed to enable encryption on target" and "check that the source and target encryption keys are the same" is somewhat a misnomer in our scenario. The following shows that we did set the same encryption key on source and target. This is what actually caused the error:
On source the parameter SP_XPT_ENABLE_AES was set to 1:
sp_ctrl (alvsupl14:9111)> set param SP_XPT_ENABLE_AES 1
An encryption key was then created on source:
sp_ctrl (alvsupl14:9111)> create encryption key
D59593A30657934EDFA6F073D616B01135502A095A1391273EF1AA7691BF0681
The encryption key was then set on source:
sp_ctrl (alvsupl14:9111)> set encryption key D59593A30657934EDFA6F073D616B01135502A095A1391273EF1AA7691BF0681
We then bounced Export on source:
sp_ctrl>stop export
sp_ctrl>start export
It was subsequently set on target as:
sp_ctrl (alvsupl18:9111)> set encryption key D59593A30657934EDFA6F073D616B01135502A095A1391273EF1AA7691BF0681
However, we omitted the step of setting the Import parameter SP_IMP_ENABLE_AES to 1 on target which should have been done as below:
sp_ctrl (alvsupl18:9111)> set param SP_IMP_ENABLE_AES 1
This omission resulted in the above error messages.
To correct the problem so that replication can continue without encryption, unset encryption on source as:
sp_ctrl (alvsupl14:9111)> set param SP_XPT_ENABLE_AES 1
Then bounce Export:
Export on source:
sp_ctrl>stop export
sp_ctrl>start export
Should you decide to re-enable the encryption, carry out the following outline of steps:
Set SP_XPT_ENABLE_AES to 1 on source
Create the encryption key on source
Set the encryption key on source
Bounce Export on source
Set the parameter SP_IMP_ENABLE_AES to 1 on target
Set the encryption key on target (by using the key value generated from “create encryption key” command on source)
Bounce Import process on target.
The problem would typically occur if one attempted to enable encryption on source but was oblivious to the new step of configuring SP_IMP_ENABLE_AES on target as a part of requirement in SharePlex verison 9.1 and up.