Author |
Message
|
Peter_MQ |
Posted: Mon May 20, 2019 1:10 am Post subject: DB2+MQ; cannot create db2mq.tmp: Permission denied |
|
|
Newbie
Joined: 20 May 2019 Posts: 4
|
Hello all,
I want create a trigger (in my database DB2) sending message to queue.
I use dockerfile to create build with IBM MQ, IBM DB2express-c and IBM IIB in Docker.
After I used command enable_MQFunctions (It creates DB2MQ tables+configuration, yep?) I got:
sh: 1: cannot create db2mq.tmp: Permission denied
Using command chown I gave my user permission to /tmp and var/tmp but no possitive effect after, but mu user is listed (drwxrwxrwt) after I type ls -ld tmp command.
So after first try enable_MQFunctions I got:
Command crtmqm -lf 1024 DB2MQ_DEFAULT_MQM 2>db2mq.tmp failed, rc=512, errno=0
So, I created manually default MQ and then typed again enable_MQFunctions:
sh: 1: cannot create db2mq.tmp: Permission denied
-- Create MQ Functions ...
SQLExecDirect - SELECT COUNT(*) FROM DB2MQ.MQPOLICY
-- (-1)
SQL error or warning occurred. Processing can continue...
Inspect the SQL error or warning conditions that occurred.
UNEXPECTED FAILURE (SQLSTATE=42S02) (SQLCODE=4294967092)
(errorMsg: [IBM][CLI Driver][DB2/LINUXX8664] SQL0204N "DB2MQ.MQPOLICY" is an undefined name. SQLSTATE=42704
)
An error occurred during a configuration check,
The MQPolicy table does not exist, or the table is empty.
Create the configuration database objects using the script that is provided
before you issue the command again.
Validate MQ Functions ...
SQL error or warning occurred. Processing can continue...
*** Error -- while validating MQ functions using the default configuration.
Please ensure that the following actions are complete:
1. You created the configuration tables and objects in the database.
2. The 'DB2.DEFAULT.SERVICE' entry in the MQService table has the following values: queueMgrName: DB2MQ_DEFAULT_MQM
queueName: DB2MQ_DEFAULT_Q
3. The 'DB2.DEFAULT.POLICY' entry in the MQPolicy table has the following value:
connectionName: connectionDB2MQ
4. Ensure that the MQHost table has an entry for connectionDB2MQ and the queueMgrName is: DB2MQ_DEFAULT_MQM.
5. You enabled federation on DB Manager if '-v 1pc', '-v all', or no -v is specified.
*** enable_MQFunction finished with error
Version usage in Docker build:
DB2express-c: db2exc_970_LNX_x86_64.tar.gz
MQ: mqadv_dev80_linux_x86-64.tar.gz
IIB: 10.0.0.7-IIB-LINUX64-DEVELOPER.tar.gz
Ubuntu 16.04 amd64 |
|
Back to top |
|
 |
Vitor |
Posted: Mon May 20, 2019 5:13 am Post subject: Re: DB2+MQ; cannot create db2mq.tmp: Permission denied |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Peter_MQ wrote: |
Using command chown I gave my user permission to /tmp and var/tmp but no possitive effect after, but mu user is listed (drwxrwxrwt) after I type ls -ld tmp command.
|
Odd choice - it looks to me more like you're missing permissions within DB2 rather than the OS _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
markt |
Posted: Mon May 20, 2019 5:34 am Post subject: |
|
|
 Knight
Joined: 14 May 2002 Posts: 508
|
And what makes you think it's trying to use /var/tmp or /tmp? Nothing in what you've posted has either of those directories |
|
Back to top |
|
 |
Peter_MQ |
Posted: Mon May 20, 2019 5:44 am Post subject: |
|
|
Newbie
Joined: 20 May 2019 Posts: 4
|
I logged in root and chmod -R 1777 to all folders and this .tmp file no permission error disappair. But I have new error. DBname=TEST is for sure exist and active instance (db2 list db directory shows it). Pass/user are also good
(IIB_10:)db2inst1@980df9a30c0e:/$ enable_MQFunctions -n TEST -u db2inst1 -p pass
*** Error -- while connecting to TEST
Make sure that user(db2inst1) and password(pass) are valid and that the DB2
instance has started.
*** enable_MQFunction finished with error
Any help? |
|
Back to top |
|
 |
Vitor |
Posted: Mon May 20, 2019 5:57 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Peter_MQ wrote: |
I logged in root and chmod -R 1777 to all folders and this .tmp file no permission error disappair. |
Well yes, removing all the security on your file system will make any permissions problems disappear. It's also a contact admin of an assumption that a .tmp file is being written to /tmp or /var/tmp.
Peter_MQ wrote: |
But I have new error. DBname=TEST is for sure exist and active instance (db2 list db directory shows it). Pass/user are also good |
And if you try actually looking at the error, it doesn't say "does not exist" nor does it say 'invalid password". It says "cannot connect"
Peter_MQ wrote: |
Any help? |
- Don't remove all the security on your OS to fix permissions problems
- Figure out the connection issue. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Peter_MQ |
Posted: Mon May 20, 2019 6:25 am Post subject: |
|
|
Newbie
Joined: 20 May 2019 Posts: 4
|
Vitor wrote: |
And if you try actually looking at the error, it doesn't say "does not exist" nor does it say 'invalid password". It says "cannot connect" |
No offence but it says Make sure that user(db2inst1) and password(pass) are valid and that the DB2 instance has started.
And it's a bit strange error(connection issue) because before I manage to save db2mq.tmp file command enable_MQFunctions clearly saw my database... |
|
Back to top |
|
 |
Vitor |
Posted: Mon May 20, 2019 6:42 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Peter_MQ wrote: |
No offence but it says Make sure that user(db2inst1) and password(pass) are valid and that the DB2 instance has started. |
And you've been very adamant that the credentials are correct.....
Peter_MQ wrote: |
And it's a bit strange error(connection issue) because before I manage to save db2mq.tmp file command enable_MQFunctions clearly saw my database... |
You were expecting something else? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon May 20, 2019 7:09 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Vitor wrote: |
- Don't remove all the security on your OS to fix permissions problems. |
MQ and DB2 installation procedures correctly set file system permission bits. Unless specifically directed by IBM, you should never alter o/s file system permission bits. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
Peter_MQ |
Posted: Mon May 20, 2019 11:45 am Post subject: |
|
|
Newbie
Joined: 20 May 2019 Posts: 4
|
Vitor wrote: |
You were expecting something else? |
Yes..before (while geting .tmp permission error) command enable_MQFunctions it's creates connecting to my database but can;t creat DB2MQ tables.
I guees DB2MQ.tmp is preperaing to create all DB2MQ tables (policy, service etc) or I am wrong ? |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed May 22, 2019 5:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Peter_MQ wrote: |
Vitor wrote: |
You were expecting something else? |
Yes..before (while geting .tmp permission error) command enable_MQFunctions it's creates connecting to my database but can;t creat DB2MQ tables.
I guees DB2MQ.tmp is preperaing to create all DB2MQ tables (policy, service etc) or I am wrong ? |
It could just be that you are missing DB permissions. If you set yourself as DB owner does that permission problem go away?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|