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 » IBM MQ Installation/Configuration Support » DOCKER and MQ

Post new topic  Reply to topic Goto page 1, 2  Next
 DOCKER and MQ « View previous topic :: View next topic » 
Author Message
abd.wsu
PostPosted: Thu Mar 05, 2015 8:26 am    Post subject: DOCKER and MQ Reply with quote

Acolyte

Joined: 12 Sep 2012
Posts: 65

Hello,

Has anybody tried or experimented with running MQ like we do in regular OS in Docker instead?
If so is there a good doc or a good link i can start off of? Not even sure if Docker and MQ work together. I am just feeling inventive, i guess.
Thanks in advance.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Mar 05, 2015 8:51 am    Post subject: Reply with quote

Grand High Poobah

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

So what have you tried?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu Mar 05, 2015 9:03 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I'd be surprised if there was any reason it didn't work.

You know, for supported versions.

I wouldn't try it with version 5.1, for example.
Back to top
View user's profile Send private message
abd.wsu
PostPosted: Thu Mar 05, 2015 9:49 am    Post subject: Reply with quote

Acolyte

Joined: 12 Sep 2012
Posts: 65

I was just going through some github documents to see if they had anything. Looks like we can run MQ Advanced for Developers on docker. Nothing beyond that.
We are working with our server teams to see how feasible it is or even how practical.
Back to top
View user's profile Send private message
RobFish3
PostPosted: Tue Mar 10, 2015 8:33 am    Post subject: Reply with quote

Newbie

Joined: 23 Mar 2005
Posts: 4
Location: United Kingdom

What image are you trying to build your MQ onto? One problem is that the MQ linux requirements are not well documented, so it will be a bit hit and miss.
Back to top
View user's profile Send private message Send e-mail
RobFish3
PostPosted: Thu Mar 12, 2015 12:54 pm    Post subject: Reply with quote

Newbie

Joined: 23 Mar 2005
Posts: 4
Location: United Kingdom

Check this out....
https://registry.hub.docker.com/u/ibmimages/mqadvanced/
Back to top
View user's profile Send private message Send e-mail
hughson
PostPosted: Thu Mar 26, 2015 3:14 am    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
Location: Bay of Plenty, New Zealand

Check this out Introducing a Docker image for MQ Advanced for Developers
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
MQFly
PostPosted: Wed Feb 03, 2016 8:45 am    Post subject: Reply with quote

Newbie

Joined: 20 Apr 2015
Posts: 8
Location: Toronto, ON

Hi guys,

does anyone really have it worked on Windows?

I tried to run it on RHEL7 and Win10.. but got a lot of headaches
I've got it working on linux, but not in the Win10..

1. I successfully built the mq-docker image( have done #docker build --t mq . )
2. once trying to run container ( #docker run -env=.. mq) I'm getting an error - container cannot start:

Quote:
Error response from daemon: Cannot start container d9652bef8fbb49778c9985a0646213477bdb6d087fac613695001e336b44332d: [8] System error: no such file or directory


docker.log file has something, but not so informative

still fighting, but it could be very appreciative if someone can share the good/bad experience
Back to top
View user's profile Send private message Visit poster's website
arthurbarr
PostPosted: Thu Feb 04, 2016 4:17 am    Post subject: Reply with quote

Newbie

Joined: 04 Feb 2016
Posts: 4

Hi,

Docker containers don't run on Windows as such (yet), so I guess you're using the Docker client on Windows connecting to the Docker daemon on a Linux VM (e.g. with boot2docker or Docker Toolbox). Is that correct?

I have definitely run MQ in Docker in this environment, and am sure that it will work. Can you please post some more details? The full `docker run` command you're using would be helpful. Are you using the MQ sample Docker image created from the code on GitHub?
Back to top
View user's profile Send private message
MQFly
PostPosted: Tue Feb 09, 2016 11:06 am    Post subject: Reply with quote

Newbie

Joined: 20 Apr 2015
Posts: 8
Location: Toronto, ON

Hi Arthur,

I didn't try to run it on a windows host, of course. Downloaded from Github and ran in the Linux VM. Right.

I've read your blog and seen demo.

Everything worked fine until run the container.
1. I successfully built the mq-docker image( have done #docker build --t mq . )

2. I'm getting an error once trying to run : docker run --env LICENSE=accept --env MQ_QMGR_NAME=QM1 --volume /var/example:/var/mqm --publish 1414:1414 --detach mq

what I have:

Quote:
$ docker images

REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE

mq latest 5d69536fc37a 7 days ago 844.7 MB

ubuntu 14.04 6cc0fc2a5ee3 2 weeks ago 187.9 MB

firehooper/mq-docker latest da99b985fbc7 11 months ago 792.2 MB



Quote:

$ docker run --env LICENSE=accept --env MQ_QMGR_NAME=QM1 --volume /var/example:/var/mqm --publish 1414:1414 --detach mq
0059faf9c8d1740dd601531b0454d85daacac2824c358e1283efaffc00996d12
Error response from daemon: Cannot start container 0059faf9c8d1740dd601531b0454d85daacac2824c358e1283efaffc00996d12: [8] System error: no such file or directory


$


This is my docker info:

Quote:
root@default:~# docker info
Containers: 3
Images: 27
Server Version: 1.9.1
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 33
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.1.13-boot2docker
Operating System: Boot2Docker 1.9.1 (TCL 6.4.1); master : cef800b - Fri Nov 20 19:33:59 UTC 2015
CPUs: 1
Total Memory: 1.956 GiB
Name: default
ID: 5XIT:LOE7:XZJX:WPNG:LQ7O:QWHS:77Q3:LXT5:KRXG:ZYLP:GE6M:RMRP
Debug mode (server): true
File Descriptors: 23
Goroutines: 34
System Time: 2016-02-09T18:52:06.942782794Z
EventsListeners: 1
Init SHA1:
Init Path: /usr/local/bin/docker
Docker Root Dir: /mnt/sda1/var/lib/docker
Labels:
provider=virtualbox
root@default:~#


my docker.log saying:

Quote:


time="2016-02-09T18:56:14.430198951Z" level=debug msg="Calling POST /v1.21/containers/create"
time="2016-02-09T18:56:14.430249633Z" level=info msg="POST /v1.21/containers/create"
time="2016-02-09T18:56:14.487585736Z" level=debug msg="Calling POST /v1.21/containers/0059faf9c8d1740dd601531b0454d85daacac2824c358e1283efaffc00996d12/start"
time="2016-02-09T18:56:14.487692234Z" level=info msg="POST /v1.21/containers/0059faf9c8d1740dd601531b0454d85daacac2824c358e1283efaffc00996d12/start"
time="2016-02-09T18:56:14.490228517Z" level=debug msg="Assigning addresses for endpoint grave_kirch's interface on network bridge"
time="2016-02-09T18:56:14.490294219Z" level=debug msg="RequestAddress(LocalDefault/172.17.0.0/16, <nil>, map[])"
time="2016-02-09T18:56:14.507168452Z" level=debug msg="Calling GET /containers/mq-docker/logs"
time="2016-02-09T18:56:14.507236889Z" level=info msg="GET /containers/mq-docker/logs?stdout=true&stderr=true&tail=1000&follow=false&timestamps=1"
time="2016-02-09T18:56:14.507923807Z" level=debug msg="logs: begin stream"
time="2016-02-09T18:56:14.509923324Z" level=error msg="Error streaming logs: invalid character '\\x00' looking for beginning of value"
time="2016-02-09T18:56:14.515433545Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -A DOCKER -p tcp -d 0/0 --dport 1414 -j DNAT --to-destination 172.17.0.3:1414 ! -i docker0]"
time="2016-02-09T18:56:14.520911017Z" level=debug msg="Calling GET /containers/0059faf9c8d1740dd601531b0454d85daacac2824c358e1283efaffc00996d12/json"
time="2016-02-09T18:56:14.521079096Z" level=info msg="GET /containers/0059faf9c8d1740dd601531b0454d85daacac2824c358e1283efaffc00996d12/json"
time="2016-02-09T18:56:14.522284404Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t filter -A DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.3 --dport 1414 -j ACCEPT]"
time="2016-02-09T18:56:14.534664780Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -A POSTROUTING -p tcp -s 172.17.0.3 -d 172.17.0.3 --dport 1414 -j MASQUERADE]"
time="2016-02-09T18:56:14.583391702Z" level=debug msg="Calling GET /containers/mq-docker/logs"
time="2016-02-09T18:56:14.583464284Z" level=info msg="GET /containers/mq-docker/logs?stdout=true&stderr=true&tail=0&follow=true&timestamps=1"
time="2016-02-09T18:56:14.584172802Z" level=debug msg="logs: begin stream"
time="2016-02-09T18:56:14.608381047Z" level=debug msg="Assigning addresses for endpoint grave_kirch's interface on network bridge"
time="2016-02-09T18:56:14.657858252Z" level=debug msg="Calling GET /containers/mq-docker/logs"
time="2016-02-09T18:56:14.657909532Z" level=info msg="GET /containers/mq-docker/logs?stdout=true&stderr=true&tail=0&follow=true&timestamps=1"
time="2016-02-09T18:56:14.658333834Z" level=debug msg="logs: begin stream"
time="2016-02-09T18:56:14.664040486Z" level=debug msg="Calling GET /containers/0059faf9c8d1740dd601531b0454d85daacac2824c358e1283efaffc00996d12/json"
time="2016-02-09T18:56:14.664097279Z" level=info msg="GET /containers/0059faf9c8d1740dd601531b0454d85daacac2824c358e1283efaffc00996d12/json"
time="2016-02-09T18:56:14.723620996Z" level=warning msg="exit status 1"
time="2016-02-09T18:56:14.756160849Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -D DOCKER -p tcp -d 0/0 --dport 1414 -j DNAT --to-destination 172.17.0.3:1414 ! -i docker0]"
time="2016-02-09T18:56:14.761555697Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t filter -D DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.3 --dport 1414 -j ACCEPT]"
time="2016-02-09T18:56:14.765164009Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -D POSTROUTING -p tcp -s 172.17.0.3 -d 172.17.0.3 --dport 1414 -j MASQUERADE]"
time="2016-02-09T18:56:14.790838457Z" level=debug msg="Releasing addresses for endpoint grave_kirch's interface on network bridge"
time="2016-02-09T18:56:14.790910133Z" level=debug msg="ReleaseAddress(LocalDefault/172.17.0.0/16, 172.17.0.3)"
time="2016-02-09T18:56:14.802058716Z" level=warning msg="failed to cleanup ipc mounts:\nfailed to umount /mnt/sda1/var/lib/docker/containers/0059faf9c8d1740dd601531b0454d85daacac2824c358e1283efaffc00996d12/shm: invalid argument\nfailed to umount /mnt/sda1/var/lib/docker/containers/0059faf9c8d1740dd601531b0454d85daacac2824c358e1283efaffc00996d12/mqueue: invalid argument"
time="2016-02-09T18:56:14.802192056Z" level=error msg="Handler for POST /v1.21/containers/0059faf9c8d1740dd601531b0454d85daacac2824c358e1283efaffc00996d12/start returned error: Cannot start container 0059faf9c8d1740dd601531b0454d85daacac2824c358e1283efaffc00996d12: [8] System error: no such file or directory"
time="2016-02-09T18:56:14.802222777Z" level=error msg="HTTP Error" err="Cannot start container 0059faf9c8d1740dd601531b0454d85daacac2824c358e1283efaffc00996d12: [8] System error: no such file or directory" statusCode=500
time="2016-02-09T18:56:14.889161565Z" level=debug msg="Calling GET /containers/0059faf9c8d1740dd601531b0454d85daacac2824c358e1283efaffc00996d12/json"
time="2016-02-09T18:56:14.889247810Z" level=info msg="GET /containers/0059faf9c8d1740dd601531b0454d85daacac2824c358e1283efaffc00996d12/json"


It could be very appreciative if you can point me where I'm wrong..

The same time, through Kitematic console, I'm able to run downloaded from repository "firehooper/mq-docker".

My Best Regards!
Vadim
Back to top
View user's profile Send private message Visit poster's website
arthurbarr
PostPosted: Wed Feb 10, 2016 2:32 am    Post subject: Reply with quote

Newbie

Joined: 04 Feb 2016
Posts: 4

I think I've managed to reproduce the problem. I think that what's happening is that the `git clone` on Windows is dynamically converting the line-endings of all files from UNIX-style LF to Windows-style CRLF. During the `docker build`, these files are uploaded to the Docker daemon in the Linux VM, and the image is created successfully. When the container is run, the ENTRYPOINT is set to run a Bash script, which fails due to the incorrect line-endings.

So the simplest fix for now is to run the following command on Windows, and then re-build the Docker image:

Code:
git config --global core.autocrlf input


This tells Git not to mess around with the line-endings, and leave them as they are. The Docker build should be really quick, as the Docker build cache means that MQ doesn't need to be re-installed, and only the script files should get updated.

I've tried this, and it worked for me.

I should also point out that you'll probably a different problem shortly, related to boot2docker. The Linux VM used as part of Docker Toolbox runs boot2docker, which uses 'tmpfs' as the filesystem for `/var`. MQ doesn't work with 'tmpfs', so you need to change your command to something like this:

Code:
docker run --env LICENSE=accept --env MQ_QMGR_NAME=QM1 --volume /mnt/sda1/var/example:/var/mqm --publish 1414:1414 --detach mq


This is discussed in the README on GitHub (https://github.com/ibm-messaging/mq-docker). I'll also add the line-ending issue, for other people to see.

Please let me know if this doesn't fix the problem, and I'd be happy to take another look.
Back to top
View user's profile Send private message
MQFly
PostPosted: Tue Feb 16, 2016 9:18 am    Post subject: Reply with quote

Newbie

Joined: 20 Apr 2015
Posts: 8
Location: Toronto, ON

Hi Arthur,

so sorry, had a small vacation..

Looks like you are right, there is the end of line conversion issue. But git global reconfiguration option didn't resolve it in my case, when I tried to fix it in the Docker quickStart Terminal ( Windows console).

But I resolved issue by moving whole bunch of operations in the Linux VM.
i.e. I built image and ran it in the Linux VM console( connected to VM by putty) directly.

Looks like this issue is just for WindowsToolBox. Everything should be OK for Linux based Docker.

How do you think we can troubleshoot conversion issue?


Thank you for the help.
Vadim
Back to top
View user's profile Send private message Visit poster's website
arthurbarr
PostPosted: Wed Feb 17, 2016 1:04 am    Post subject: Reply with quote

Newbie

Joined: 04 Feb 2016
Posts: 4

Hi Vadim,

I'm glad you got it working.

I forgot to mention that after changing the Git configuration, you would need to re-clone the project (as the one you already have has already had the line endings changed).

In terms of debug, it might be helpful to tell you how I debugged it. The error message was from Docker, which tells me that the container isn't even getting started. If it was another error inside the container, we'd probably see the stopped container with a `docker ps -a`. So what I did was to run the container again, but with some different options:

Code:
docker run --env LICENSE=accept --env MQ_QMGR_NAME=QM1 --volume /mnt/sda1/var/example:/var/mqm --publish 1414:1414 --tty --interactive --entrypoint /bin/bash mq


Note that I've removed `--detach`, and added `--tty` and `--interactive`, which means Docker will run the container in the foreground, and connect my terminal to whatever process I run. I also overrode the default entrypoint - this tells Docker to just run Bash as the process inside my container, instead of the script which starts the queue manager. What this leaves me with is a terminal connected to a Bash process, but with the MQ image as its filesystem.

At this point, I ran the normal entrypoint script, and saw the line ending error message from Bash.

I hope this helps.

Arthur
Back to top
View user's profile Send private message
MQFly
PostPosted: Wed Feb 17, 2016 1:26 pm    Post subject: Reply with quote

Newbie

Joined: 20 Apr 2015
Posts: 8
Location: Toronto, ON

Hi Arthur,

I've got it working in Windows as well. Thanks a lot for your help!

Vadim
Back to top
View user's profile Send private message Visit poster's website
blorro
PostPosted: Tue Jun 21, 2016 1:28 pm    Post subject: Reply with quote

Acolyte

Joined: 09 Jan 2014
Posts: 57
Location: Sweden

MQFly wrote:
Hi Arthur,

I've got it working in Windows as well. Thanks a lot for your help!

Vadim

Please enlighten us on how you got it working on a Windows Box, please.
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 » IBM MQ Installation/Configuration Support » DOCKER and MQ
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.