Entrust Datacard

Entrust Certificate Services Support Knowledge Base

Last Modified: 2017-08-16 14:13:01.0

Why do I receive the error "Inconsistent security configuration, java.lang.Exception: Cannot read private key from file"?

Article Number: 45737

User-added image

Error Log Example:

<000297> java.lang.Exception: Cannot read private key from file /usr/local/bea/weblogic70 0/server/bin/sol8rlecsts_testcertificates_com-key.der. Make sure password specified in environment property weblogic.management.pkpassword is valid. at weblogic.security.service.SSLManager.getServerPrivateKey(SSLManager.java:436) at weblogic.t3.srvr.SSLListenThread.(SSLListenThread.java:153) at weblogic.t3.srvr.SSLListenThread.(SSLListenThread.java:122) at weblogic.t3.srvr.T3Srvr.initializeListenThreads(T3Srvr.java:1548) at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:891) at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:300) at weblogic.Server.main(Server.java:32) <090034> <000354>

Steps to resolve this problem:

  1. If the private key is encrypted, convert the key to PEM format using the java utils der2pem command and modify the header as follows:
    ----------BEGIN ENCRYPTED PRIVATE KEY----------
    ...
    -----------END RSA PRIVATE KEY---------------------
     

    If the private key is not in PEM format, you receive the following exception:

    java.lang.Exception:Cannot read private key from file
    C:\bea700sp5\user_proects\mydomain\privatkey.der
    Make sure password specified in environnment property weblogic.management.pkpassword is valid.
     

    If the private key is unencrypted, use the java utils der.2pem command and modify the header as follows:

    ----------BEGIN RSA PRIVATE KEY----------
    ...
    ----------END RSA PRIVATE KEY----------

    Check to see if the digital certificate has an extra line at the end of the file. The following should be the last line of the certificate file:

  2. ----------END CERTIFICATE----------
    Remove any extra lines.

If the existing private key is not password protected, you do not need to specify the weblogic.management.pkpassword argument when starting the server.

When configuring the SSL protocol in the WebLogic Server Administration Console, note that the Key Encrypted attribute is not used to dictate whether or not the private key is password encrypted. The attribute is irrelevant if a password is not used for the private key passphrase.

If you want to import the converted private key and digital certificate into a keytore, use java utils.ImportPrivateKey.

If you have any questions or concerns please contact the Entrust Certificate Services Support department for further assistance: 

Hours of Operation: 
Sunday 8:00 PM ET to Friday 8:00 PM ET 
North America (toll free): 1-866-267-9297 
Outside North America: 1-613-270-2680 (or see the list below) 
NOTE: Smart Phone users may use the 1-800 numbers shown in the table below.
Otherwise, it is very important that international callers dial the UITF format exactly as indicated. Do not dial an extra "1" before the "800" or your call will not be accepted as an UITF toll free call. 

CountryNumber
Australia0011 - 800-3687-7863
1-800-767-513
Austria00 - 800-3687-7863
Belgium00 - 800-3687-7863
Denmark00 - 800-3687-7863
Finland990 - 800-3687-7863 (Telecom Finland)
00 - 800-3687-7863 (Finnet)
France00 - 800-3687-7863
Germany00 - 800-3687-7863
Hong Kong001 - 800-3687-7863 (Voice)
002 - 800-3687-7863 (Fax)
Ireland00 - 800-3687-7863
Israel014 - 800-3687-7863
Italy00 - 800-3687-7863
Japan001 - 800-3687-7863 (KDD)
004 - 800-3687-7863 (ITJ)
0061 - 800-3687-7863 (IDC)
Korea001 - 800-3687-7863 (Korea Telecom)
002 - 800-3687-7863 (Dacom)
Malaysia00 - 800-3687-7863
Netherlands00 - 800-3687-7863
New Zealand00 - 800-3687-7863
0800-4413101
Norway00 - 800-3687-7863
Singapore001 - 800-3687-7863
Spain00 - 800-3687-7863
Sweden00 - 800-3687-7863 (Telia)
00 - 800-3687-7863 (Tele2)
Switzerland00 - 800-3687-7863
Taiwan00 - 800-3687-7863
United Kingdom00 - 800-3687-7863
0800 121 6078
+44 (0) 118 953 3088

TN6031

Affected Products:

  • Entrust Certificate Services 1 Year Advantage SSL Certificate Version Not Applicable Language Not Applicable Platform Not Applicable
  • Entrust Certificate Services 1 Year SSL Certificate Version Not Applicable Language Not Applicable Platform Not Applicable
  • Entrust Certificate Services 2 Year Advantage SSL Certificate Version Not Applicable Language Not Applicable Platform Not Applicable
  • Entrust Certificate Services 2 Year SSL Certificate Version Not Applicable Language Not Applicable Platform Not Applicable
  • Entrust Certificate Services Cert Admin Advantage Server Certificate 1 Year Version Not Applicable Language Not Applicable Platform Not Applicable
  • Entrust Certificate Services Cert Admin Advantage Server Certificate 2 Year Version Not Applicable Language Not Applicable Platform Not Applicable