Saturday, August 27, 2011

Content Server won't start with CSDS failing to get initialized in UCM 11g

Recently I got the below error, because of which my managed server (content server) in UCM 11g was getting started with errors but the application won't come up.

Failed to initialize the application 'CSDS' due to error com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding: invalid pad byte..

CSDS is the datasource for the DB that UCM connects to. The CSDS datasource configuration and test connection can be done from the Weblogic Server(WLS) console.

The configuration for CSDS that is viewed through the WLS console is stored in the file
cs-ds-jdbc.xml

The file is located in the below path
$MiddlewareHOME/user_projects/domains/YOUR_DOMAIN/config/jdbc/cs-ds-jdbc.xml

The above mentioned error is due to the encrypted password getting corrupted and to resolve it just replace the encrypted password with its corresponding clear text value in the file cs-ds-jdbc.xml

The password is the schema password to connect to the UCM schema.

Then restart the server, it should start without any errors and the application should come up.

Hope this helps someone.

Weblogic server won't start with invalid pad byte error

Many of us would have faced the below error and weblogic server won't start shortly after either extending a domain or creating a domain or done something related to domain.
weblogic.security.internal.encryption.EncryptionServiceException: com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding: invalid pad byte.

I use weblogic 10.3.4. This error occurs when the SerializedSystemIni.dat file gets corrupted. It simply means that the server is unable to decrypt the encrypted passwords because the file that has the hash value to decrypt it - SerializedSystemIni.dat - has got corrupted.

There is nothing to worry though, this error could be resolved easily.

All the encrypted passwords in the file config.xml should be replaced with its corresponding clear text (ordinary text) values and then start the server.

For example if weblogic@123 was your password for the server, then follow the below steps to solve the error.
1) In SecurityConfiguration tag, do the following.

i) Replace
<node-manager-password-encrypted>{3DES}Va1McYXiUPirK77U+SQfMg==</node-manager-password-encrypted>

with

<node-manager-password-encrypted>weblogic@123</node-manager-password-encrypted>

ii) Replace
<credential-encrypted>{3DES}diqufr0TEjlJuLvdnhvtCxEUbxr0yIm8dadNaJRqiefJgGQqcWagiY4tlLX3I3pWa/jpBKeMzyEJgufp/725y1/PXSt0mWOh</credential-encrypted>

with

<credential-encrypted>weblogic@123</credential-encrypted>

2) In the EmbeddedLDAP tag do the following.

Replace

<embedded-ldap>
<name>Your_Domain</name>
<credential-encrypted>{3DES}OVxKttua/KHdFNAxuTypkcPZFAcC8kSHQ4X/ZrhTRLUFLAGocQP0yBT7xX7qijqTBMcMBuXkPq0PC19KDuGy2/fAUXMUGpUn</credential-encrypted>
</embedded-ldap>

with

<embedded-ldap>
<name>Your_Domain</name>
<credential-encrypted>weblogic@123</credential-encrypted>
</embedded-ldap>

Now start your server. It should start without any error.

Note: A word of caution - don't change the order of any of the tags in the config.xml file because if you change it, then you get SchemaValidator error. Just replace the encrypted passwords with its corresponding clear text values.