Wednesday, 29 November 2017

DB2 - The Hanging Creation of Instances

Having freshly installed the latest DB2 11.1 on a Linux VM, I found that the instance creation process: -

/opt/ibm/db2/V11.1/instance/db2icrt -a SERVER -u db2fenc1 db2inst1

kept hanging e.g.

...
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) 

...

even after a reboot: -

...
DBI1446I  The db2icrt command is running.


DB2 installation is being initialized.

….

I had a quick bit of inspiration, and checked whether I could ping the box's hostname: -

 ping `hostname`

which ran for ever, and failed to respond :-(

So I added the hostname to /etc/hosts : -

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4  ucd.uk.ibm.com  ucd

( noting that I'm merely mapping the hostnames to the loopback / localhost address of 127.0.0.1 which is typically not good practice )

I re-tested using ping: -

ping `hostname`

PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.048 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.128 ms
^C
--- localhost ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.048/0.088/0.128/0.040 ms


and then retried the db2icrt process: -

/opt/ibm/db2/V11.1/instance/db2icrt -a SERVER -u db2fenc1 db2inst1


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 

The execution completed successfully.

For more information see the DB2 installation log at "/tmp/db2icrt.log.2059".
DBI1070I  Program db2icrt completed successfully.

So YAY!

No comments: