ot4i / iib-docker

Eclipse Public License 1.0
62 stars 115 forks source link

mqsicreateexecutiongroup command is not working in docker container #32

Closed vivekbisengrk closed 7 years ago

vivekbisengrk commented 7 years ago

Hi,

I am trying to create the Integration server inside the node , node is created in the docker container. I have tried couple of options but all have failed .One of the sample failed command is below one .

  1. sudo docker exec 3c093a9d8846 /bin/bash -c mqsicreateexecutiongroup -n 'IIBV10NODE' -i "http://3c093a9d8846:4414" -e IntServer

Here is the output of the command as below..


Sourcing profile

BIP1121I: Creates an integration server.

Syntax:
mqsicreateexecutiongroup integrationNodeSpec -e integrationServerName [-w timeoutSecs] [-v traceFileName]

Command options:
'integrationNodeSpec' is one of:
(a) 'integrationNodeName' : Name of a locally defined integration node
(b) '-n integrationNodeFileName' : File containing remote integration node connection parameters (*.broker)
(c) '[integrationNodeName] -i ipAddress -p port' : hostname and port of a remote integration node. 'integrationNodeName' optional for validation.
(d) '[integrationNodeName] -i uri' : URI for the remote integration node in the form tcp://[user>[:<password>]@]<host:
If a user name and password are supplied, any URI Reserved characters in the password must be percent-encoded.
'-e integrationServerName' name of the new integration server
'-w timeoutSecs' maximum number of seconds to wait for the integration server to be created (default is 60)
'-v traceFileName' send verbose internal trace to the specified file.

Please let me know if you have this working sample command which can be executed from the docker command prompt.

bthomps commented 7 years ago

Hi Vivek, when you use the docker exec command to run a bash command in your container, you should be executing the mqsicreateexecutiongroup command against the local IIB node which you created in that container. If you started the docker container using a command like in the readme, then the environment variable "NODENAME" will have provided this value. So if you ran this command:

docker run --name myNode -e LICENSE=accept -e NODENAME=MYNODE -P iibv10image

... then when you use docker exec you should use a command like this:

sudo docker exec 3c093a9d8846 /bin/bash -c mqsicreateexecutiongroup MYNODE -e IntServer

This should create your integration server (execution group to use the old name for this component) underneath the IIB node named MYNODE which is in that container. I assume that's what you're trying to do (rather than run the command in one container to create an integration server somewhere else, which is what the current syntax you're using is essentially trying to do!).

vivekbisengrk commented 7 years ago

Hi Ben, Thanks for your reply.. After reading your reply here are further steps which I have attempted . I removed the old containers which and executed following commands as directed ..

  1. dockeriib@dockeriib-VirtualBox:~$ sudo docker run --name myNode -e LICENSE=accept -e NODENAME=MYNODE -P iibv10image Sourcing profile

    Version: '10.0.0.9' Product: 'IBM Integration Bus' Build Number: '345' IE02 level: 'ie02-L20140415-1143' IB Level: 'ib1000-L170605.345_P' Server level: 'S1000-L170601.10408' Toolkit level:'20170525-0951' [not installed]


    Node MYNODE does not exist... Creating node MYNODE BIP8071I: Successful command completion.


    Starting syslog Starting node MYNODE BIP8096I: Successful command initiation, check the system log to ensure that the component started without problem and that it continues to run without problem.


    Running - stop container to exit

  2. Reviewed the container ID dockeriib@dockeriib-VirtualBox:~$ sudo docker ps -a [sudo] password for dockeriib: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d69a3b8b4087 iibv10image "iib_manage.sh" About a minute ago Up About a minute 0.0.0.0:32769->4414/tcp, 0.0.0.0:32768->7800/tcp myNode

  3. Then executed the command to create the EG/Integration server as below .. dockeriib@dockeriib-VirtualBox:~$ sudo docker exec d69a3b8b4087 /bin/bash -c mqsicreateexecutiongroup MYNODE -e IntServer Sourcing profile

BIP1121I: Creates an integration server.

Syntax:
mqsicreateexecutiongroup integrationNodeSpec -e integrationServerName [-w timeoutSecs] [-v traceFileName]

Command options:
'integrationNodeSpec' is one of:
(a) 'integrationNodeName' : Name of a locally defined integration node
(b) '-n integrationNodeFileName' : File containing remote integration node connection parameters (*.broker)
(c) '[integrationNodeName] -i ipAddress -p port' : hostname and port of a remote integration node. 'integrationNodeName' optional for validation.
(d) '[integrationNodeName] -i uri' : URI for the remote integration node in the form tcp://[user>[:<password>]@]<host:
If a user name and password are supplied, any URI Reserved characters in the password must be percent-encoded.
'-e integrationServerName' name of the new integration server
'-w timeoutSecs' maximum number of seconds to wait for the integration server to be created (default is 60)
'-v traceFileName' send verbose internal trace to the specified file. dockeriib@dockeriib-VirtualBox:~$

Still same issue .. If possible please correct me and let me know when I am making mistake.. Thanks in advance ..

bthomps commented 7 years ago

Hi Vivek ... It looks like you are missing quotation marks around the command ... so the instruction is just executing "mqsicreateexecutiongroup" without the provided options. Think you should be using this: sudo docker exec d69a3b8b4087 /bin/bash -c "mqsicreateexecutiongroup MYNODE -e IntServer"

vivekbisengrk commented 7 years ago

Hi Ben, Thanks yes you are correct . The missing bit was quotation marks .. I couldn't figure it out since the earlier mqsilist command worked without any issue(when the quote was not there) . Thanks a lot for your help and prompt responses.