IBM Support

75 ways to demystify DB2: # 36: db2icrt fails with, ERROR: DBI1281E The database manager configuration file could not be initialized.

Technical Blog Post


Abstract

75 ways to demystify DB2: # 36: db2icrt fails with, ERROR: DBI1281E The database manager configuration file could not be initialized.

Body

Today, I came across an interesting issue and I would like to walk through the problem and the details taken to resolve the issue.
 
Problem:
db2icrt fails with, ERROR: DBI1281E  The database manager configuration file could not be initialized.
 
I have a repro to illustrate this.
 
[root@hobbits instance]# ./db2icrt -d -u instedi instedi
DBI1446I  The db2icrt command is running.
 
 
DB2 installation is being initialized.
 
 Total number of tasks to be performed: 4
Total estimated time for all tasks to be performed: 309 second(s)
 
Task #1 start
Description: Setting default global profile registry variables
Estimated time 1 second(s)
Task #1 end
 
Task #2 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #2 end
 
Task #3 start
Description: Configuring DB2 instances
Estimated time 300 second(s)
Task #3 end
 
Task #4 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #4 end
 
A minor error occurred during the execution.
 
For more information see the DB2 installation log at "/tmp/db2icrt.log.32454".
DBI1264E  This program failed. Errors encountered during execution were
      written to the installation log file. Program name:
      db2icrt. Log file name: /tmp/db2icrt.log.32454.
 
Explanation:
 
This message is returned when some processes and operations have failed.
Detailed information about the error was written to the log file.
 
User response:
 
Contact IBM support to get assistance in resolving this issue. Keep the
log file intact as this file is an important reference for IBM support.
 
 
   Related information:
   Contacting IBM Software Support
 
 
Analysis:
 
Looking at: /tmp/db2icrt.log.32454
 
Setting default global profile registry variables :.......Success
The maximum number of logical nodes was not specified for the instance
"instedi". Default parameters will be used.
 
Initializing instance list :.......Success
ERROR: DBI1281E  The database manager configuration file could not be
      initialized.
 
Explanation:
 
An error occurred when attempting to initialize the database manager
configuration file. A DB2 instance could not be created or upgraded.
 
User response:
 
Refer to the log file for troubleshooting. Resolve the problem and try
the command again. If the problem persists, contact your IBM service
representative.
 
 
   Related information:
   Gathering diagnostic information for instance creation problems
 
ERROR: An error occurred while configuring the instance "instedi".
 
Configuring DB2 instances :.......Failure
Updating global profile registry :.......Success
 
db2icrt.trc: ( found under /tmp, when db2icrt is invoked with -d option)
 
+ PROFILE=' . /home/instedi/sqllib/db2profile 1>/dev/null 2>/dev/null; /opt/ibm/db2/V105fp5/instance/db2idbm instedi /home/instedi instedi 1 server /tmp/db2icrt_local.tmp1.18049'
+ '[' 1 -eq 0 ']'
+ PROCID=21034
+ TMPFILE=/tmp/db2iexec.tmp.21034
+ su - instedi -c ' . /home/instedi/sqllib/db2profile 1>/dev/null 2>/dev/null; /opt/ibm/db2/V105fp5/instance/db2idbm instedi /home/instedi instedi 1 server /tmp/db2icrt_local.tmp1.18049; echo $? > /tmp/db2iexec.tmp.21034'
++ cat /tmp/db2iexec.tmp.21034
+ return_code=126
+ rm -f /tmp/db2iexec.tmp.21034
+ '[' 0 -eq 0 ']'
+ '[' 126 -ne 0 ']'
+ '[' -f /home/instedi/sqllib/db2dump/db2diag.log ']'
+ exit 126
+ rc=126
+ '[' 0 -eq 0 ']'
+ tee -a /tmp/db2icrt_local.log.18049
/opt/ibm/db2/V105fp5/instance/db2iutil: line 4099: /tmp/db2icrt_local.tmp1.18049: No such file or directory
+ rm -f /tmp/db2icrt_local.tmp1.18049
+ '[' 126 -eq 2 ']'
+ '[' 126 -ne 0 ']'
+ display_msg /opt/ibm/db2/V105fp5/msg/en_US.iso88591/db2install.cat 281 'DBI1281E The database manager configuration file could not be initialized.\n'
+ set -x
 
Manual check up:

So, we know the command that resulted in DBI1281E.

If we can specifically run that command on command line:

[root@hobbits etc]# su - instedi -c ' . /home/instedi/sqllib/db2profile 1>/dev/null 2>/dev/null; /opt/ibm/db2/V105fp5/instance/db2idbm instedi /home/instedi instedi 1 server /tmp/db2icrt_local.tmp1.18049; echo $? > /tmp/foo.out'
-bash: /opt/ibm/db2/V105fp5/instance/db2idbm: Permission denied
[root@hobbits etc]# echo $?
130
[root@hobbits etc]# cat /tmp/foo.out
126
If we can quickly check the permission on the install directory,
 
[root@hobbits db2]# ls -al | grep V105fp5
drwxr-xr-- 43 root root       4096 Mar 11 10:52 V105fp5
 
Solution:

So, as we can see, the install directory does not have the default permission which gets sets by the DB2 installer. The current permission on the directory is 740, but the default permission should be 755.

Once you change back the permission to DB2's default permission , i.e : chmod 755 V105fp5 , instance creation would be successful. 

Note: 

This repro assumed we only tampered with the parent install directory. If you suspect that there could be other permission/ownership changes in the install directory, we can run 'db2val' from <installdir/bin> directory as root user to ensure it comes out clean.

 

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

UID

ibm11141102