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 » OBDCINI - Linux Boot

Post new topic  Reply to topic Goto page 1, 2  Next
 OBDCINI - Linux Boot « View previous topic :: View next topic » 
Author Message
lancelotlinc
PostPosted: Tue Mar 15, 2011 11:47 am    Post subject: OBDCINI - Linux Boot Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Hi gang. Need your help.

I'm running WMB 7.0.0.1 on RHEL 5.5. If I manually start the Broker "mqsistart" with the ODBCINI variable set, Broker works. If I autostart Broker at system boot time, I get this error:

Quote:
Mar 15 15:34:18 chpsbxvmlin-206 WebSphere Broker v7001[5464]: (SOMEBROKER.EG13)[21]BIP2393E: Database error: ODBC return code '-1' from data source 'D1SP' using ODBC driver manager 'libbipodbc.so'. : CHP206BROKER.874f10b5-2e01-0000-0080-ff3a79fc8506: /build/S700_P/src/DataFlowEngine/ImbOdbc.cpp: 341: ImbOdbcHandle::checkRcInner: :
Mar 15 15:34:18 chpsbxvmlin-206 WebSphere Broker v7001[5464]: (SOMEBROKER.EG13)[21]BIP2322E: Database error: SQL State 'IM002'; Native Error Code '0'; Error Text '[DataDirect][ODBC lib] System information file not found. Please check the ODBCINI environment variable.'. : CHP206BROKER.874f10b5-2e01-0000-0080-ff3a79fc8506: /build/S700_P/src/DataFlowEngine/ImbOdbc.cpp: 480: ImbOdbcHandle::checkRcInner: :


Any help or pointers would be good.

For example, could someone please post their rc.broker file (from /etc/init.d directory -- the service file that starts and stops their Broker at boot time ? )

Lance
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Tue Mar 15, 2011 12:04 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

I normally do the following:-

1) Create an account under which broker is going to run.
2) Setup the .bashrc to define $ODBCINI
3) Then in my /etc/init.d script do the following

Code:

  su - <broker account name> -c "mqsistart <broker_Name>"


As an alternative you could execute a script in the target account. This way you can log with timestamps the actions taken.

There are many alternatives that may or may not be suitable for your system. The above is IMHO the easiest and the minimum risk.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Mar 15, 2011 12:23 pm    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Thanks for the reply. My .bashrc is posted below.

Code:

# .bashrc

. /opt/ibm/mqsi/7.0/bin/mqsiprofile
ODBCINI=/var/mqsi/odbc/odbc64.ini; export ODBCINI


# Source global definitions
if [ -f /etc/bashrc ]; then
   . /etc/bashrc
fi

# User specific aliases and functions


If you could post a full rc.broker script, I could compare yours to mine. Many thanks in advance.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue Mar 15, 2011 12:44 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

put a script that exports ODBCINI into common/profiles.

Then mqsiprofile will execute it as part of being sourced.

Then when your rc script sources mqsiprofile, the ODBCINI will be set before you issue mqsistart.

in v7.0.0.2 there's a mechanism for executing a different set of scripts for each EG, after scripts in common/profiles are run.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Mar 15, 2011 12:48 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

I base the script on the WMQ Support pack that is used to start WMQ Queue Managers.
I can't get hold of a copy of my broker script at the moment. I'm on a train...
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Mar 15, 2011 12:56 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Again, I would advocate taking advantage of the common/profiles feature of mqsiprofile.

In this way you create one script that is specific to broker and you know that it will be run in any context where broker is needed.

Rather than having one script in <svcuser>/.bash_profile and one script in /etc/rc and one script in... and and and...
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Mar 15, 2011 1:14 pm    Post subject: Reply with quote

Grand High Poobah

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

For MQ we have the startup script calling a script in /var/mqm/bin.
That script uses su - mqm to call then the script that will start the qmgrs.
The advantage for the MQADMIN is to controll the qmgrs starting automatically on the box without having to involve the SYSADMINs for every change.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Wed Mar 16, 2011 12:19 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Ok. Here is my script. It is as I said based upon the one in the WMQ startup on Linux support pack.

Code:

#!/bin/bash
#
# wbibkr      This shell script takes care of starting and stopping
#             Websphere Message Broker(s) and configmgrs.
#
# chkconfig: - 90 90
# description: startup and shutdown control of WBI Brokers
# processname: mqsistart
# config: /etc/wbibroker/wbi_control.conf

# Source function library.
. /etc/rc.d/init.d/functions
. /lib/lsb/init-functions
# Source networking configuration.
. /etc/sysconfig/network

export WBI_USER=wbiadmin

[ -f /opt/ibm/mqsi/6.1/bin/mqsistart ] || exit 0

# define WBI symbols etc
. /opt/ibm/mqsi/6.0/bin/mqsiprofile
RETVAL=0
prog="vsftpd"

start() {
        # Start daemons.

        if [ -d /etc/wbibroker ] ; then
                for i in `cat /etc/wbibroker/wbi_control.conf`; do
                        echo -n $"Starting WBI Component : $i: "
                        su - $WBI_USER -c "mqsistart $i &2>1 >> mqsistart.log"
                        STAT=$?
                        if test $STAT -eq 0; then
                          log_success_msg "Started"
         elif test $STAT -eg 18; then
            log_success_msg "Already Running"
         else
                          printf "\n WBI STAT = %d\n" $STAT
         fi
                done
        else
                RETVAL=1
        fi
        return $RETVAL
}

stop() {
         if [ -d /etc/wbibroker ] ; then
                for i in `cat /etc/wbibroker/wbi_control.conf`; do
                        echo -n $"Stopping WBI Component : $i: "
                        su - $WBI_USER -c "mqsistop -i $i >> mqsistop.log"
                        STAT=$?
                        if test $STAT -eq 0; then
                          log_success_msg "Stopped"
                        elif test $STAT -eg 18; then
                          log_success_msg "Not Running"
                        else
                          printf "\n WBI STAT = %d\n" $STAT
                        fi
                       

                done
        fi

return $RETVAL
}

# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart|reload)
        stop
        start
        RETVAL=$?
        ;;
  condrestart)
        if [ -f /var/lock/subsys/$prog ]; then
            stop
            start
            RETVAL=$?
        fi
        ;;
  status)
        status $prog
        RETVAL=$?
        ;;
  *)
        echo $"Usage: $0 {start|stop|restart|condrestart|status}"
        exit 1
esac

exit $RETVAL


This is specifically for a RH based distro (RHEL, CentOS, Fedora etc).

Instructions.(from memory)

1) copy this script to /etc/init.d/wbi_startup
2) chmod 755 /etc/init/d/wbi_startup
3) chconfig --add wbi_startup
4) chconfig wbi_startup on

5) Create a directory and a file called /etc/wbibroker/wbi_control.conf
Add the names of the components you want to control to this file. One per line.

6) service wbi_startup start

Enjoy. (no support implied or given)
Anyone can take this script and modify it for their own needs. If you do something clever then I'd love to know about it.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Mar 16, 2011 12:39 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Jeff - where are these common/profiles to be found?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Mar 16, 2011 1:53 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

System wide Profiles.

Linux
/etc/profile
/etc/profile.d
/etc/bashrc

solaris
/etc/profile

Remember.....
If you add stuff to these files then they will more than likely affect EVERY user on the system. I only use these for genuine SYSTEM wide stuff. As they are held in /etc you have to remember to take backups of these files when you do the user backups. I consider them to be part of the user environment even though thay are in /etc/

I normally recommend that there is a .bashrc or .profile file setup for the WMQ & Broker users held in a SVN(or other repository). This can be use and modified by the users themselves. For example you could have one broker user who also needs DB access. They would add the ORACLE_HOME etc definitions to their .bashrc (or appropriate DB setup stuff).
It is easy to create templates for the different types of access. Then the users can mix & match as required.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Mar 16, 2011 5:15 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

zpat wrote:
Jeff - where are these common/profiles to be found?


/var/mqsi

NOT /etc anything.

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/an26230_.htm

Or otherwise <broker workpath>/common/profiles.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Mar 16, 2011 6:39 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

As mqjeff has indicated there are two sorts of profles.

those in /var/mqsi for broker use

those in /etc for general unix/linux use.

As with many things it is important to get the right ones....
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Mar 16, 2011 7:40 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Yes, and since ODBCINI is basically a Broker specific ENV variable, it makes sense to use the Broker profile to set it so that it is always available for Broker.

Rather than trying to set it in several different Unix locations so that different Unix shells will find the right thing when Unix tries to run broker commands.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Mar 21, 2011 8:50 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Ok, I got this DB2 Connect client configured, but now its giving me an error:

Quote:
SQL8002N An attempt to connect to a host failed due to a missing DB2 Connect product or invalid license. SQLSTATE=42968


I was under the impression that WMB came with an ODBC license. Is this not the same?

Does this mean I have to order a separate license so that WMB v7 on Linux can connect to DB2 on z/OS?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Mar 21, 2011 8:55 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Broker v7 does not come with any database entitlement, since Broker v7 does not have a database pre-requisite for its own purposes.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » OBDCINI - Linux Boot
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.