Author |
Message
|
santhoshramesh |
Posted: Sat Aug 08, 2015 10:36 pm Post subject: Message flow locking odbc.ini file in NFS |
|
|
Novice
Joined: 26 Feb 2014 Posts: 17
|
Hi,
I have developed a message flow which picks text message from MQ and process the message and inserts the required data in to SQL database. The flow is working fine in local environment. I have deployed the flow in UNIX environment and faced the following issue.
Whenever the flow tries to interact with DB, the flow is locking entire folder where odbc.ini file is present. The flow is not allowing other flows to interact with odbc.ini file. The files are present in NFS version 4 environment. The above lock is happening only in NFS environment and the lock is not happening in local environment.
Can some one please let me know what would be the reason for the lock and how to get rid of the issue.
The flow is deployed in broker version 8.0.0.1 |
|
Back to top |
|
 |
smdavies99 |
Posted: Sat Aug 08, 2015 11:38 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
What version of NFS are you using? _________________ 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 |
|
 |
santhoshramesh |
Posted: Sun Aug 09, 2015 12:32 am Post subject: |
|
|
Novice
Joined: 26 Feb 2014 Posts: 17
|
|
Back to top |
|
 |
smdavies99 |
Posted: Sun Aug 09, 2015 12:55 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
I am puzzled by this:-
Quote: |
The flow is not allowing other flows to interact with odbc.ini file.
|
Flows don't interact with the odbc.ini file UNLESS they have been programmed to do this specifically.
Can you clarify this please?
What do you mean interact with the odbc.ini file? _________________ 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 |
|
 |
santhoshramesh |
Posted: Sun Aug 09, 2015 2:14 am Post subject: |
|
|
Novice
Joined: 26 Feb 2014 Posts: 17
|
Whenever the flow starts processing the file and inserting records into database, the broker folder present in the NFS are locked and not able to access or browse the broker related files inside the folder. Once the flow completes the process and all the records are inserted into DB, the lock is getting released.
The flow has MQ Input node and compute node to process the message and insert the records into DB.
Also in the programme I didnt mention anything explicitly to interact with odbc.ini. I am using compute node with ESQL coding.
The following is the result I got when I used grep lock command :
mqsi 12678 12676 12 Aug05 ? 09:46:14 DataFlowEngine BRK 4121af4e-4d01-0000-0080-f4b1fa1c77a9 EG1
[root@LLLL tmp]# lsof | grep 17520 | grep HAshare | grep lock
startData 17520 mqsi 15u REG 0,23 14 8299598 /HAshare/wmb/mqsi/components/BRK/locks/aa_active.lock
[root@LLLL tmp]# lsof | grep 12678 | grep HAshare | grep lock
DataFlowE 12678 mqsi 15u REG 0,23 14 8299598 /HAshare/wmb/mqsi/components/BRK/locks/aa_active.lock
DataFlowE 12678 mqsi 258uW REG 0,23 14 8528062 /HAshare/wmb/mqsi/components/BRK/4121af4e-4d01-0000-0080-f4b1fa1c77a9/repository/repository_ha_active.lock
[root@LLLL tmp]# lsof | grep 12676 | grep HAshare | grep lock
startData 12676 mqsi 15u REG 0,23 14 8299598 /HAshare/wmb/mqsi/components/BRK/locks/aa_active.lock
[root@LLLL tmp]# ps -ef | grep 12676
mqsi 12676 17358 0 Aug05 ? 00:00:00 /bin/bash /opt/ibm/mqsi/8/bin/startDataFlowEngine BRK 4121af4e-4d01-0000-0080-f4b1fa1c77a9 EG1
mqsi 12678 12676 12 Aug05 ? 09:46:14 DataFlowEngine BRK 4121af4e-4d01-0000-0080-f4b1fa1c77a9 EG1
root 26875 22576 0 00:05 pts/2 00:00:00 grep 12676 |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 10, 2015 4:39 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
santhoshramesh wrote: |
the broker folder present in the NFS are locked and not able to access or browse the broker related files inside the folder. |
What exactly is not able to access or browse the other broker related files in the folder?
Also:
santhoshramesh wrote: |
the flow is locking entire folder where odbc.ini file is present. The flow is not allowing other flows to interact with odbc.ini file |
As my associate points out, flows do not interact with the odbc.ini file. All db access is controlled by the broker itself and this uses a memory cached copy of odbc.ini pulled in at broker start, not the copy on the disc.
So do you mean by this statement that if you have multiple flows with DB access, only 1 flow can use 1 ODBC entry at a time? Because that's nothing to do with NFS locking and everything to do with ODBC/DB configuration. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Aug 10, 2015 4:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Looking at the set up of multi-instance brokers, I would expect the files to be locked by the current active instance of the broker.
Are you trying to run the active and the failover instance in an active-active mode???  _________________ MQ & Broker admin |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Aug 10, 2015 5:12 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
fjb_saper wrote: |
Looking at the set up of multi-instance brokers, I would expect the files to be locked by the current active instance of the broker.
: |
I'd expect that the odbc.ini file would not be locked. Locking it would stop you from making changes that could be activated by a 'broker bounce'.
But other files would certainly be locked. _________________ 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 |
|
 |
santhoshramesh |
Posted: Mon Aug 10, 2015 10:55 pm Post subject: |
|
|
Novice
Joined: 26 Feb 2014 Posts: 17
|
Hi All,
/HAShare/wmb/.... is present in NFS version 4 environment. The problem I face is, whenever the flow starts processing file from MQ inserts into DB, we are not able to browse /HAShare/wmb/ folder. Once the flow completes the processing of messages, the folder is getting released and can able to browse the folder. But the flow is not at all referring any folders or files directly in /HAShare/.. folder
so I am not able to identify exactly where the issue (whether in flow level or environment level).
@fjb_saper: No multi instance broker has been set up in this environment. Two different brokers are set up (BRK1 and BRK2), out of which only one broker (BRK2) is running and other broker (BRK1) is stopped. /HAShare/ folder is present in NFS which was shared by two brokers. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Aug 11, 2015 4:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Is anything you did in your flow process explicitly reading / opening the odbc.ini file? This file is usually accessed through environment variables.
Do you have different users for both brokers so as to have a differently sourced environment and not pointing to the same odbc.ini for both brokers?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
santhoshramesh |
Posted: Tue Aug 11, 2015 4:34 am Post subject: |
|
|
Novice
Joined: 26 Feb 2014 Posts: 17
|
Didnt mention anywhere in the code to explicitly access odbc.ini. Also one of the broker is currently stopped and only one broker is running.
Initially i thought that everytime the flow tries to access database it will refer odbc.ini file, but as mentioned in the previous replies the broker refer the database connection through cache.
So now not able to identify the reason for (/HAShare/wmb/) folder lock whenever the flow starts processing.
The flow is having MQInputNode -> Error handler to handle exception and put it in MQ ->RCD(to parse EDIFACT message) -> Computenode(fetch data and inserts into DB)
Not using FileInput/FileOutput node to explicitly access any folders under /HAShare/wmb/ . |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Aug 11, 2015 5:02 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Is it just an oddity or does it prevent any other flow in the same broker from accessing the DB, or any other DB defined in odbc.ini?
Have you opened a PMR about this? (reference this thread in the PMR)  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Tue Aug 11, 2015 5:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fjb_saper wrote: |
Is it just an oddity or does it prevent any other flow in the same broker from accessing the DB, or any other DB defined in odbc.ini? |
So there's a lock - what problem does this cause? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
santhoshramesh |
Posted: Tue Sep 01, 2015 12:18 am Post subject: |
|
|
Novice
Joined: 26 Feb 2014 Posts: 17
|
The flow is preventing other flows in the same broker but different EG to process and hence other flows are not able to access their own databases. This is the only flow to interact with its mentioned database, other flows are interacting with other databases. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Sep 01, 2015 4:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
santhoshramesh wrote: |
The flow is preventing other flows in the same broker but different EG to process and hence other flows are not able to access their own databases. This is the only flow to interact with its mentioned database, other flows are interacting with other databases. |
How have you come to that conclusion? As many of us have said above, db access (and certainly the ODBC configuration) is controlled and maintained by the broker not the EG so what diagnostics have led you to this conclusion? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|