DB2 Silent Install Error: The return value is “5121”.

I hit an interesting problem with DB2 yesterday. I’m a big user of the DB2 silent install. This is a system where you run the DB2 install once manually, and it generates a response file for you. Then you can pass the response file to the installer and run unattended installs. This is great if you want to run the install hundreds of times 🙂 .

One of the great things about how DB2 releases fixpacks is that they are installable. What I mean by this is that you don’t have to install the first version of the software and apply patches to it, you can just apply the patch at the outset.

When testing out DB2 9.7 fixpack 2 on Linux, I hit a weird error:


DBI1191I db2setup is installing and configuring DB2 according to the
response file provided. Please wait.

A minor error occurred while installing "DB2 Enterprise Server Edition " on
this computer. Some features may not function correctly.

For more information see the DB2 installation log at "/tmp/db2setup.log".

It was a bit more like a major error. The DB2 installer could not create the instance user and so could not create the instance. Which means the system is pretty much useless. The following turned up in the db2setup.log:


ERROR: An error occurred while creating the user "dasusr1" for the DB2
Administration Server. The return value is "5121".

ERROR: One or more errors occurred while creating the DB2 Administration
Server. The DB2 Administration Server may not function properly. Create the DB2
Administration Server manually. If the problem persists contact your technical
service representative.

Creating the DB2 Administration Server :.......Failure
Initializing instance list :.......Success
ERROR: One or more errors occurred while committing the changes to the user
"db2inst1". Create or make any changes to this user manually.

What was interesting was the installer would breeze through creating the groups, but baulk on creating the users. The problem turned out to be a mismatch between the algorithm used to encrypt and read back the passwords in the response file. Something changed in the algorithm in DB2 9.7 FP2 and I was using an old response file from the GA version of the code . Both versions are incompatible with each other. You can clearly see the differences below.

9.7 GA, 9.7 FP1 (also works with 9.5) .

INSTANCE = inst1
inst1.TYPE = ese
* Instance-owning user
inst1.NAME = db2inst1
inst1.GROUP_NAME = db2iadm1
inst1.HOME_DIRECTORY = /home/db2inst1
inst1.PASSWORD = 593230133242295434315043707434799413346823001425633741538145032334202723517094195256569
ENCRYPTED = inst1.PASSWORD

9.7 FP2

INSTANCE = inst1
inst1.TYPE = ese
* Instance-owning user
inst1.NAME = db2inst1
inst1.GROUP_NAME = db2iadm1
inst1.HOME_DIRECTORY = /home/db2inst1
inst1.PASSWORD = 333377148682264443740525262714481366605672981260304236138250671067315119230836024976809300232642443192164424364566092461990364794426528249626805585662932723454154505223133504126517289109622925732216931363336627325161387322413424782188354693567389513644491011426236242812854398233823216405116523748602223626725153057401514552431215907582326503484343543245585453652477658337667246270282392750290224467612813561667382216411648317659354574148559364624131307601139423363164272592837646746588233795445379795763335562194101711319501429563041430692347784922133738943433213046652867344146350193523632002344344968434509267453578515230295356956656970264132961230904523543431572425682015412550223268301328365218036730543424740299692654533629583623984282175520182920793232805290462441180635519113425850809653489466271627442347605434565555912103124813084156657044455642051333441444221049349683381306664113266463298589325748192428273032967352323550433224727201724533057720433345083348938615273614458562569435358516301810326296564555483465334307465096045451631234857628833344831302847557863641503469395590956642326285343632674204393455844314984023245416843221521387423661126412838802637787444011204021973003314770152575062831212231440453524156424162067084343531342553063362371223856227524359124365293692843255244177691321435376512151401304564523708552253510965360349256973548902836644206322692286234882874075305008643214554224269807724973657083122573975292329143605222957342981127836380521658560251613836011663326775931421125833685047046413195983740
ENCRYPTED = inst1.PASSWORD

Obviously security has been increased in FP2 because the password hash is so much longer. Please note that it’s not forwards compatible either. What I mean by this is that the newer version of the response file will not work with older versions of the code either.

To conclude, the solution in this case is simple. Rerun the installer that comes with DB2 9.7 FP2 and generate a new response file for use with this version. I looked through the DB2 APARs list trying to find the fix that changed the encryption algorithm, but couldn’t see it.

This entry was posted in solution and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *