ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Setting LD_LIBRARY_PATH with Broker created with -d defined

Post new topic  Reply to topic
 Setting LD_LIBRARY_PATH with Broker created with -d defined « View previous topic :: View next topic » 
Author Message
mlc
PostPosted: Mon Jun 20, 2016 8:51 am    Post subject: Setting LD_LIBRARY_PATH with Broker created with -d defined Reply with quote

Newbie

Joined: 20 Jun 2016
Posts: 3

IIB v10.0.0.4

Integration node must access Informix via ODBC.

iibadmin has primary group of mqbrkrs and is a member of mqm. mqm has primary group of mqm and is a member of mqbrkrs.

INFORMIX environment vars and LD_LIBRARY_PATH are set in iibadmin's .bash_profile.

IN is created using iibadmin and "-d defined" is NOT specified. Everything works fine when IN is started by iibadmin.

For multi-instance, IN is created using iibadmin and "-d defined" IS specified. Informix shared object files are missing from LD_LIBRARY_PATH.

cat /proc/{PID of DataFlowEngine}/environ shows the INFORMIX env vars that are set in iibadmin's .bash_profile, but Informix .so files are not in LD_LIBRARY_PATH.

With "-d defined" IN starts as MQ Service by mqm. But Enivronment for DFE has INFORMIX env vars set in iibadmin's .bash_profile.

We want to use "-d fined" so IN will auto-start when QM fails over and to have IN start/stop with QMgr. And we want to use one account -- iibadmin -- to administrate IN and QMgr.

We've found 2 ways to correct this problem:

Update LD_LIBRARY_PATH in /opt/IBM/iib-10.0.0.4/server/bin/mqsiprofile. Starting Qmgr using iibadmin and everything works fine.
PRO: iibadmin can administrate IN and Qmgr. CON: modifying mqsiprofile. There are warning about modifying mqsiprofile,
but the concern is losing modifications during software update. We don't see that as a problem.

Move setting of INFORMIX env vars and LD_LIBRARY_PATH from iibadmin's .bash_profile to mqm's .bash_profile. CON: mqm must start the Qmgr, LD_LIBRARY_PATH is incorrect if QMGr is started by iibadmin. Must use mqm and iibadmin to administer the IN and Qmgr.

Are there other options to solve this problem? Is there a known best-practice?

Thanks in advance....
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jun 20, 2016 8:55 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Alter the service to use a script that sets the environment variables and starts the broker too..
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jun 20, 2016 9:20 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Look at the IIB Workpath /common/profiles

You can there add stuff that will be loaded when mqsiprofile runs, or if at broker level when the broker starts.

This is where IE02 support pack scripts get called and in general where the DB additional environment info really belongs.

Search the infocenter about creating a command environment for the broker.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mlc
PostPosted: Mon Jun 20, 2016 9:59 am    Post subject: Reply with quote

Newbie

Joined: 20 Jun 2016
Posts: 3

Thanks jeff and FJ for options.

Looked at /opt/IBM/iib-10.0.0.4/server/bin/runMQService investigating jeff's suggestion. All runMQService does is unset some vars, cd to ..../server/bin, source mqsiprofile and run mqsistart BK. So, I could make a copy of runMQService and add INFORMIX var and LD_LIBRARY_PATH to it, then change the MQ Service object to run my copy. Seems like it would work, though I'd need to test to make sure LD_LIBRARY_PATH is correct when Broker is started with iibadmin.

Found KC article on setting up iib command env. The article mentions using this approach of setting up db env's. So, this method looks the best. A simple script that sets INFORMIX vars and LD_LIBRARY_PATH is all that is needed. Need to test to validate that it works when starting Broker using iibadmin.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jun 20, 2016 10:04 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

FJ's approach of using the common.profiles is the correct one.

Just put a script that does the right exports in there, and you'll be fine.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jun 20, 2016 11:04 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

mlc wrote:

Found KC article on setting up iib command env. The article mentions using this approach of setting up db env's. So, this method looks the best. A simple script that sets INFORMIX vars and LD_LIBRARY_PATH is all that is needed. Need to test to validate that it works when starting Broker using iibadmin.


This should work regardless of the user, as it gets incorporated into the mqsiprofile. The mqsiprofile explicitly checks the directory there for any scritps and runs them.
Using the broker's environment variables, this is how I check the current version and set the MQ Version accordingly...

Works like a charm.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Setting LD_LIBRARY_PATH with Broker created with -d defined
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.