Results 1 to 13 of 13
  1. #1
    Join Date
    Nov 2007
    Posts
    265

    Unanswered: Error creating instance

    Hi,

    I just put a clean installation of Db2 UDB 8.1 64-bit on one of our Linux servers. After installing db, I tried to create the instance but keep getting this error -- any idea what could be causing this and how I can fix it? thanks!!


    ./db2icrt -u db2inst1 db2inst1
    ./db2icrt: 93: /opt/IBM/db2/V8.1/bin/db2langdir: not found
    ./db2icrt: 93: /opt/IBM/db2/V8.1/bin/db2langdir: not found
    ./db2icrt: 94: /opt/IBM/db2/V8.1/bin/db2usrinf: not found
    [: 94: -ne: unexpected operator
    ./db2icrt: 235: /opt/IBM/db2/V8.1/bin/db2usrinf: not found
    /opt/IBM/db2/V8.1/instance/db2ilist: 82: /opt/IBM/db2/V8.1/bin/db2langdir: not found
    /opt/IBM/db2/V8.1/instance/db2ilist: 82: /opt/IBM/db2/V8.1/bin/db2langdir: not found
    ./db2icrt: 243: /opt/IBM/db2/V8.1/bin/db2usrinf: not found
    ./db2icrt: 248: /opt/IBM/db2/V8.1/instance/disp_msg: not found

  2. #2
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Verify that root's environment (env command) doesn't contain any references to db2.

  3. #3
    Join Date
    Nov 2007
    Posts
    265
    thanks, here is what i get after running env from the command prompt.. does it look ok? Really not sure what's wrong with the db2icrt command.. was working just fine yesterday..


    TERM=xterm-color
    SHELL=/bin/bash
    SSH_CLIENT=<IPAddress> 63099 22
    SSH_TTY=/dev/pts/1
    USER=root
    MAIL=/var/mail/root
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    PWD=/opt/IBM/db2/V8.1/instance
    LANG=en_US.UTF-8
    SHLVL=1
    HOME=/root
    LOGNAME=root
    SSH_CONNECTION=<IPAddress> 63099 <IPAddress>
    _=/usr/bin/env
    OLDPWD=/etc
    Last edited by db2user24; 04-22-11 at 18:50.

  4. #4
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    It looks ok. Did the installation complete successfully? Do you login directly as root? Did db2icrt return success at the end or failed with some error?

    This technote looks similar, but root's env is clean based on your output:
    https://www-304.ibm.com/support/docv...id=swg21253192

  5. #5
    Join Date
    Nov 2007
    Posts
    265
    Actually, it had to do with some 32 bit libraries missing.. thanks for the help!

  6. #6
    Join Date
    Nov 2007
    Posts
    265
    On another note, here is another question --- I have a backup image from 32 bit 8.1 FP 15 Db2 UDB on Debian Etch ( Linux) and am trying to restore on one of other servers that is 64 bit 8.2 Db2 UDB on Debian Squeeze ( Linux). The db resides under / on both servers and the directory name / structure is the same. For some reason, the restore hangs even though the completed work shows the total size of the backup image after a few hours. I also tried it without the logtarget option and it still hung. Do I need to do a redirected restore or try something else.. not sure what is causing this problem.

    Here is what I tried --


    time db2 restore db DBNAME from /DBDATA/backup taken at 20110403050002 logtarget /home/db2inst1/logs/ REPLACE EXISTING COMPRLIB /home/db2inst1/sqllib/lib/libdb2compr.so


    then i tried without the logtarget --

    time db2 restore db DBNAME from /DBDATA/backup taken at 20110403050002 REPLACE EXISTING COMPRLIB /home/db2inst1/sqllib/lib/libdb2compr.so

  7. #7
    Join Date
    Nov 2007
    Posts
    265
    I also tried an installation of 32 bit 8.1 FP 15 Db2 UDB on Debian Squeeze ( Linux) so that the versions / bits of DB2 matched but that restore failed on me too!

  8. #8
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Attach your db2diag.log

  9. #9
    Join Date
    Nov 2007
    Posts
    265
    Quote Originally Posted by BELLO4KA View Post
    Attach your db2diag.log
    Here is what the db2diag.log shows ---( this is part of it .. but all the errors are the same while the restore is running)

    2011-04-24-00.55.09.992360-300 I2406673E378 LEVEL: Warning
    PID : 7012 TID : 140409372239616PROC : db2agent (DBNAME)
    INSTANCE: db2inst1 NODE : 000 DB : DBNAME
    APPHDL : 0-955 APPID: *LOCAL.db2inst1.110424055512
    FUNCTION: DB2 UDB, base sys utilities, sqleCheckForBackupRestore, probe:10
    RETCODE : ZRC=0xFFFFFBA1=-1119

    2011-04-24-00.55.09.992439-300 I2407052E379 LEVEL: Severe
    PID : 7012 TID : 140409372239616PROC : db2agent (DBNAME)
    INSTANCE: db2inst1 NODE : 000 DB : DBNAME
    APPHDL : 0-955 APPID: *LOCAL.db2inst1.110424055512
    FUNCTION: DB2 UDB, base sys utilities, sqlePrepareForSerialization, probe:20
    RETCODE : ZRC=0xFFFFFBA1=-1119

    2011-04-24-00.55.09.992519-300 I2407432E360 LEVEL: Severe
    PID : 7012 TID : 140409372239616PROC : db2agent (DBNAME)
    INSTANCE: db2inst1 NODE : 000 DB : DBNAME
    APPHDL : 0-955 APPID: *LOCAL.db2inst1.110424055512
    FUNCTION: DB2 UDB, base sys utilities, sqleserl, probe:10
    RETCODE : ZRC=0xFFFFFBA1=-1119

    2011-04-24-00.59.09.159348-300 I2407793E378 LEVEL: Warning
    PID : 7013 TID : 140409372239616PROC : db2agent (DBNAME)
    INSTANCE: db2inst1 NODE : 000 DB : DBNAME
    APPHDL : 0-957 APPID: *LOCAL.db2inst1.110424055910
    FUNCTION: DB2 UDB, base sys utilities, sqleCheckForBackupRestore, probe:10
    RETCODE : ZRC=0xFFFFFBA1=-1119

    2011-04-24-00.59.09.159446-300 I2408172E379 LEVEL: Severe
    PID : 7013 TID : 140409372239616PROC : db2agent (DBNAME)
    INSTANCE: db2inst1 NODE : 000 DB : DBNAME
    APPHDL : 0-957 APPID: *LOCAL.db2inst1.110424055910
    FUNCTION: DB2 UDB, base sys utilities, sqlePrepareForSerialization, probe:20
    RETCODE : ZRC=0xFFFFFBA1=-1119

    2011-04-24-00.59.09.159546-300 I2408552E360 LEVEL: Severe
    PID : 7013 TID : 140409372239616PROC : db2agent (DBNAME)
    INSTANCE: db2inst1 NODE : 000 DB : DBNAME
    APPHDL : 0-957 APPID: *LOCAL.db2inst1.110424055910
    FUNCTION: DB2 UDB, base sys utilities, sqleserl, probe:10
    RETCODE : ZRC=0xFFFFFBA1=-1119

    2011-04-24-00.59.09.159814-300 I2408913E405 LEVEL: Error
    PID : 6983 TID : 140348054673152PROC : db2hmon
    INSTANCE: db2inst1 NODE : 000
    FUNCTION: DB2 UDB, Health Monitor, HmonMainCB::refreshDbAutonomicSwitches, probe:160
    MESSAGE : Failed connecting to database "DBNAME "
    DATA #1 : Hexdump, 4 bytes
    0x00007FA553F15C9C : A1FB FFFF

  10. #10
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Check/update your kernel parameters. v8 InfoCenter doesn't contain much info so maybe check v9.7 InfoCenter instead

    Also, check that your Linux env is supported as per:
    DB2 UDB V8.2 Validated Linux Environments - Information Management - Wikis (UAT Theme)


    Perform the following:

    db2 update dbm cfg using HEALTH_MON OFF
    db2set DB2_FMP_COMM_HEAPSZ=0
    db2set DB2_USE_LATCH_TRACKING=TRUE

    db2stop
    ipclean / kill / ipcrm all instance related processes/resources
    clean up your DIAGPATH (where you have db2diag.log)


    Capture:
    ps -ef | grep <instance name>
    ipcs | grep <instance name>


    db2start

    start restore (omit logtarget option)
    wait 5 min and then capture:

    ps -ef | grep <instance name>
    db2 list applications show detail
    db2 list utilities show detail



    When you think restore is hung, capture:

    ps -ef | grep <instance name>
    db2 list applications show detail
    db2 list utilities show detail
    db2pd -stacks
    Repeat this db2pd command 2 more times 5 min apart


    Tar up all files in the DIAGPATH (db2diag.log, some trap files) and attach it here. I'll try to see what's happening.

  11. #11
    Join Date
    Nov 2007
    Posts
    265
    Wow, thanks.. you're so helpful! Am running the test now.. should have the file ready in a few hours!

  12. #12
    Join Date
    Nov 2007
    Posts
    265
    Hi Bella,

    I just finished running the test and have attached a zip file with db2dump tar file along with a file that has the commands you gave to run and their results. It probably is extra but I wanted to make sure that you had all the info.

    Let me know if you find anything.. thanks!!
    Attached Files Attached Files

  13. #13
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    At 10:58, there are 3 IPC resources listed in the ipcs output while the instance is down. Why? You need to remove them prior to starting the instance.
    At 1:36, db2med is no longer listed in the output (as before).

    db2pd -stacks didn't collect any info for db2agent(DBNAME) and db2bm's (we don't have any trap files for those PIDs). The ones we got look normal.

    I'm not really sure why db2med disappeared while restore is still executing.


    Try the following:
    create sample db using db2sampl, then try to backup and restore it (just to see if this works).


    Back to the original db, we can try it one more time:

    stop the instance and remove all IPC resources and processes owned by the instance. There should be nothing listed in the ipcs | grep <instance> output.

    clean-up DIAGPATH

    start restore
    wait for 5 min and then:

    capture ps -ef | grep <instance>
    issue "kill -23 <PID>" where PID is the PID of db2agent(DBNAME), db2bm's, db2med, db2bp
    db2pd -stacks



    When restore seems to hang:
    capture ps -ef | grep <instance>
    issue "kill -23 <PID>" where PID is the PID of db2agent(DBNAME), db2bm's, db2med (if it exists), db2bp
    db2pd -stacks


    Also, check about kernel parameters and whether your Linux env is supported. You can also try upgrading to the latest fixpak to see if it makes any difference.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •