OnDemand Users Group

Support Forums => CMOD for Multiplatforms => Topic started by: teeraw on August 16, 2015, 09:20:30 AM

Title: CMOD Linux 9.5 cannot create instance
Post by: teeraw on August 16, 2015, 09:20:30 AM
I have installed CMOD 9.5 on SLES11_SP3 (SuSE Linux Enterprise Server) with DB2 ESE 10.5.
But when I create instance by command "arsdb -gcv -I archive", it was error like this:
arsdb: ARS4012E: Unable to initialize environment, Return code: 158

I tried to enable trace but also not found any log for investigate.
Have anyone found this problem?
Title: Re: CMOD Linux 9.5 cannot create instance
Post by: jeffs42885 on August 17, 2015, 12:37:36 PM
Try Fixpack 9.5.0.2, stop ARSSOCKD, then connect to the database and run:

db2 update cfg for "INSTANCE" using NEWLOGPATH NULL

I had the same issue and doing the above worked.
Title: Re: CMOD Linux 9.5 cannot create instance
Post by: Alessandro Perucchi on August 17, 2015, 12:42:53 PM
Hello Teeraw,

what is the name of your CMOD instance owner? db2inst1?

What is the exact version of CMOD and DB2?

From the user you are using the command "arsdb ..." (I suppose again db2inst1 since this is what is define in ars.ini), do you have the profile of DB2 loaded?
. ~/sqllib/db2profile
??
Title: Re: CMOD Linux 9.5 cannot create instance
Post by: Justin Derrick on August 17, 2015, 02:08:52 PM
And the host name is missing from ars.ini.  Set that to your Fully Qualified Domain Name (ondemand.xyzcompany.com).

Did you follow the instructions in the Installation Guide?

-JD.
Title: Re: CMOD Linux 9.5 cannot create instance
Post by: Alessandro Perucchi on August 20, 2015, 12:13:41 PM
Hello Justin,

in fact if your ars.ini is on the same server as the CMOD server, the entry in HOST is optional.

Meaning that you could have that:


[@SRV@_ARCHIVE]
HOST=
PROTOCOL=2
PORT=0
SRVR_INSTANCE=ARCHIVE
SRVR_INSTANCE_OWNER=archive
SRVR_OD_CFG=/data/ars/archive/cfg/ars.cfg
SRVR_DB_CFG=/data/ars/archive/cfg/ars.dbfs
SRVR_SM_CFG=/data/ars/archive/cfg/ars.cache


and still have a working CMOD instance.

BTW, this is my configuration on my test laptop that has following me since CMOD 7.1!!!
Title: Re: CMOD Linux 9.5 cannot create instance
Post by: Justin Derrick on August 20, 2015, 08:04:20 PM
Ah.  I've always populated the HOST field.  Force of habit, I guess.  :)

-JD.
Title: Re: CMOD Linux 9.5 cannot create instance
Post by: teeraw on August 30, 2015, 07:37:44 AM
Dear all,

Unfortunately, I still cannot create instance after try on recommended solution:
- db2 update cfg for "INSTANCE" using NEWLOGPATH NULL
- Enter full hostname in ars.ini

arsdb:   ARS4012E Unable to initialize environment. The return code is 158


Can I opened full trace for arsdb command during create instance?

This is my ars.ini file:
[@SRV@_ARCHIVE]
HOST=db2v105
PROTOCOL=2
PORT=0
SRVR_INSTANCE=ARCHIVE
SRVR_INSTANCE_OWNER=db2inst1
SRVR_OD_CFG=/opt/ibm/ondemand/V9.0/config/ars.cfg
SRVR_DB_CFG=/opt/ibm/ondemand/V9.0/config/ars.dbfs
SRVR_SM_CFG=/opt/ibm/ondemand/V9.0/config/ars.cache

[@SRV@_DD]
PROTOCOL=1


Title: Re: CMOD Linux 9.5 cannot create instance
Post by: teeraw on August 30, 2015, 08:27:21 AM
For more information, my trace log file shown as below:
# arsdb -gcv -I ARCHIVE -v -1 /tmp/mylog.log -2 ALL=15
arsdb:   ARS4012E Unable to initialize environment. The return code is 158


# arstfmt -i /tmp/mylog.log
Linux-#1 SMP Tue Aug 27 08:44:18 UTC 2013 (70ed288).3.0.93-0.8-default-ARSDB-9.5.0.3-08/30/2015 04:25:27
8773:140553845319456 08/30/2015 04:25:27:771043 FLOW arsdb.c(6409)ArsDB_Main:Enter
8773:140553845319456 08/30/2015 04:25:27:771602 FLOW arsdb.c(268)ArcDBP_FailedMsg:Enter
8773:140553845319456 08/30/2015 04:25:27:771730 FLOW arsdb.c(238)ArcDBP_CheckDeactivate:Enter
8773:140553845319456 08/30/2015 04:25:27:771735 FLOW arsdb.c(256)ArcDBP_CheckDeactivate:Return

Title: Re: CMOD Linux 9.5 cannot create instance
Post by: Justin Derrick on August 30, 2015, 10:35:58 AM
Try doing these DB2 steps manually to see where the problem is, and to get more diagnostic info:

db2 start database manager
db2 create database archive on <path to your arsdb directory>
db2 backup db archive to <path to your backup directory>
db2 activate db archive
db2 connect to archive


If any of those commands fail, there should be more diagnostic info, paste the error messages in so we can help.

To undo these steps, run these commands:

db2 terminate
db2 deactivate db archive
db2 drop database archive
db2 stop database manager


-JD.
Title: Re: CMOD Linux 9.5 cannot create instance
Post by: Alessandro Perucchi on August 31, 2015, 08:10:06 AM
Hello Teeraw,

can you answer my questions? Otherwise I won't be able to help you efficiently:

Quote
what is the name of your CMOD instance owner? db2inst1?

What is the exact version of CMOD and DB2?

From the user you are using the command "arsdb ..." (I suppose again db2inst1 since this is what is define in ars.ini), do you have the profile of DB2 loaded?
. ~/sqllib/db2profile
??
Title: Re: CMOD Linux 9.5 cannot create instance
Post by: teeraw on August 21, 2016, 10:45:37 AM
Hi everyone,

Currently, I have found actual solution for this error. (arsdb:   ARS4012E Unable to initialize environment. The return code is 158)

We need to revise the ars.ini in /opt/IBM/ondemand/V9.5/config that default path will be V9.0.

SRVR_OD_CFG=/opt/ibm/ondemand/V9.0/config/ars.cfg
SRVR_DB_CFG=/opt/ibm/ondemand/V9.0/config/ars.dbfs
SRVR_SM_CFG=/opt/ibm/ondemand/V9.0/config/ars.cache

We need to changed it to:
SRVR_OD_CFG=/opt/ibm/ondemand/V9.5/config/ars.cfg
SRVR_DB_CFG=/opt/ibm/ondemand/V9.5/config/ars.dbfs
SRVR_SM_CFG=/opt/ibm/ondemand/V9.5/config/ars.cache

I'm not sure why IBM put V9.0 as initialize value.  :P :P :P :P :P :P :P

This problem also occurred in CMOD AIX, and can solve by same solution.

Thanks.

Title: Re: CMOD Linux 9.5 cannot create instance
Post by: Alessandro Perucchi on August 21, 2016, 02:30:55 PM
Quote from: teeraw on August 21, 2016, 10:45:37 AM
Hi everyone,

Currently, I have found actual solution for this error. (arsdb:   ARS4012E Unable to initialize environment. The return code is 158)

We need to revise the ars.ini in /opt/IBM/ondemand/V9.5/config that default path will be V9.0.

SRVR_OD_CFG=/opt/ibm/ondemand/V9.0/config/ars.cfg
SRVR_DB_CFG=/opt/ibm/ondemand/V9.0/config/ars.dbfs
SRVR_SM_CFG=/opt/ibm/ondemand/V9.0/config/ars.cache

We need to changed it to:
SRVR_OD_CFG=/opt/ibm/ondemand/V9.5/config/ars.cfg
SRVR_DB_CFG=/opt/ibm/ondemand/V9.5/config/ars.dbfs
SRVR_SM_CFG=/opt/ibm/ondemand/V9.5/config/ars.cache

I'm not sure why IBM put V9.0 as initialize value.  :P :P :P :P :P :P :P

This problem also occurred in CMOD AIX, and can solve by same solution.

Thanks.

Thanks for your feedback.

Just for your information, I consider BAD practise to use the standard (sample) configuration files for your setup.
It would be way more cleaner and clearer, in addition to not be tied with a version to CMOD, to have your own configuration and path to them somewhere else. And doing so, you will remove a LOT of problems, like the one you had.

For example:

SRVR_OD_CFG=/myODInstance/cfg/ars.test.cfg
SRVR_DB_CFG=/myODInstance/cfg/ars.test.dbfs
SRVR_SM_CFG=/myODInstance/cfg/ars.test.cache
Title: Re: CMOD Linux 9.5 cannot create instance
Post by: Justin Derrick on August 22, 2016, 02:08:45 PM
Further to Alessandro's recommendation, if you have multiple CMOD instances on a single machine (Dev, Test, QA, UAT) that you put the configuration files into each user's home directory.

  /home/oddev/config/ars.cfg
  /home/odqa/config/ars.cfg
  /home/oduat/config/ars.cfg


Like that. :)

-JD.
Title: Re: CMOD Linux 9.5 cannot create instance
Post by: teeraw on September 17, 2016, 02:31:08 PM
Thank you for your recommened.  :D