SQl Agent not starting: error 'java.security.InvalidKeyException: Cannot retrieve the PKCS8EncodedKeySpec'.
search cancel

SQl Agent not starting: error 'java.security.InvalidKeyException: Cannot retrieve the PKCS8EncodedKeySpec'.

book

Article ID: 244639

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

The SQL Agent doe snot start with the error message below in the log.


U02000295 Unable to load private key from file '\<Agent>\bin\.\security\<AgentName>.pem', error 'java.security.InvalidKeyException: Cannot retrieve the PKCS8EncodedKeySpec'.

U02000330 The private key cannot be read. Please check the given password and the encoding of the file.

- java.security.InvalidKeyException: Cannot retrieve the PKCS8EncodedKeySpec

- Caused by javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption

 

Environment

Product: CA Automic Workload Automation - Automation Engine v21.x, SQL Agent v21.x

Component :

Cause

The issue is with faulty *.PEM file.

Resolution

Please do the steps below:
 
-Backup all the files located in the agent's directory below
 
''\<Agent>\bin\.\security\
 
-Restart the agent