Author |
Message
|
mickey1691 |
Posted: Wed Jun 12, 2013 6:27 am Post subject: Broker Connecting to Database on Linux |
|
|
Novice
Joined: 04 Jun 2013 Posts: 19
|
Hi. We're working on two brokers, one that listens in on a port below 1024 (Broker A)and one on the default (on 7080, calling it Broker B). The brokers are running on Linux, so root had to start the Broker A, while we had another user start the other one.
We also set up an OBDC connection for the brokers and the users. The bashprofiles of both users are pointing to the same odbc.ini and odbcinst.ini.
We deployed an application that makes use of Database nodes and Stored Procedure calls on both brokers, but there seems to be a problem. While the application in Broker B can access the database and execute the database functions without any problem, the application in Broker A is unable to.
When we run the mqsicvp command for Broker A with the data source in odbc.ini, it seems to connect. Any ideas on how to solve this? |
|
Back to top |
|
|
McueMart |
Posted: Wed Jun 12, 2013 6:31 am Post subject: |
|
|
Chevalier
Joined: 29 Nov 2011 Posts: 490 Location: UK...somewhere
|
|
Back to top |
|
|
mqjeff |
Posted: Wed Jun 12, 2013 6:34 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
presumably the root user does not have access to the odbc.ini file. |
|
Back to top |
|
|
mickey1691 |
Posted: Wed Jun 12, 2013 6:41 am Post subject: |
|
|
Novice
Joined: 04 Jun 2013 Posts: 19
|
McueMart wrote: |
What error do you get? |
Something along the lines of "Data source name or driver not found." |
|
Back to top |
|
|
mickey1691 |
Posted: Wed Jun 12, 2013 6:46 am Post subject: |
|
|
Novice
Joined: 04 Jun 2013 Posts: 19
|
mqjeff wrote: |
presumably the root user does not have access to the odbc.ini file. |
Even if it has superuser priveleges? |
|
Back to top |
|
|
lancelotlinc |
Posted: Wed Jun 12, 2013 6:54 am Post subject: Re: Broker Connecting to Database on Linux |
|
|
Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
mickey1691 wrote: |
When we run the mqsicvp command for Broker A with the data source in odbc.ini, it seems to connect. Any ideas on how to solve this? |
You may be running mqsicvp in a different user context than the Broker service Id, which by the way should not be mqm.
That may be why mqsicvp works interactively but Broker runtime is unable to connect. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
|
mickey1691 |
Posted: Wed Jun 12, 2013 4:16 pm Post subject: Re: Broker Connecting to Database on Linux |
|
|
Novice
Joined: 04 Jun 2013 Posts: 19
|
lancelotlinc wrote: |
You may be running mqsicvp in a different user context than the Broker service Id, which by the way should not be mqm.
That may be why mqsicvp works interactively but Broker runtime is unable to connect. |
The service id is root, and we also used the mqsicvp command under root. Same result, but broker runtime is still unable to connect. |
|
Back to top |
|
|
Tibor |
Posted: Thu Jun 13, 2013 5:36 am Post subject: |
|
|
Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
I know this is only a workaround, but using a proxy / redirector seems to me a more future-proof and simpler solution. Everything would be simpler... |
|
Back to top |
|
|
mqjeff |
Posted: Thu Jun 13, 2013 5:40 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
|
mickey1691 |
Posted: Thu Jun 13, 2013 7:55 pm Post subject: |
|
|
Novice
Joined: 04 Jun 2013 Posts: 19
|
I searched the logs, apparently, it's a BIP2347.
Database error: SQL State <insert_1>; Native Error Code <insert_2>; Error Text 'System information file not found. Please check the ODBCINI and the ODBCSYSINI environment variables are correctly set.'
Though the question now is how can root not find the file when both user bash_profiles are pointing at the same files? |
|
Back to top |
|
|
Tibor |
Posted: Thu Jun 13, 2013 9:47 pm Post subject: |
|
|
Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
For double-checking you can display the environment of the running DataFlowEngine process:
Code: |
cat /proc/<PID>/environ | strings | grep ODBC |
Last edited by Tibor on Thu Jun 13, 2013 11:52 pm; edited 1 time in total |
|
Back to top |
|
|
mickey1691 |
Posted: Thu Jun 13, 2013 10:58 pm Post subject: |
|
|
Novice
Joined: 04 Jun 2013 Posts: 19
|
Tibor wrote: |
For double-checking you can display the environment of the running DataFlowEngine process:
Code: |
cat /proc/<PID>>/environ | strings | grep ODBC |
|
Thanks. I used that command, and I found out that there's no define ODBCINI for the dataflowengine and the ODBCSYSINI is pointing to a wrong file.
Though, when I echo ODBCINI and ODBCSYSINI, they refer to the correct files. |
|
Back to top |
|
|
|