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 IndexIBM MQ Installation/Configuration SupportIBM MQ Docker Image not working with Kubernetes

Post new topicReply to topic
IBM MQ Docker Image not working with Kubernetes View previous topic :: View next topic
Author Message
MQ_AGENT
PostPosted: Fri Jan 04, 2019 7:19 am Post subject: IBM MQ Docker Image not working with Kubernetes Reply with quote

Newbie

Joined: 05 Feb 2016
Posts: 7

Hey all..

I intend to run the IBM provide MQ Docker Image at below path
through Kubernetes.

https://hub.docker.com/r/ibmcom/mq/

I have my Kubernetes Cluster setup with 1 Master and 2 Worker Nodes on Amazon Linux Machines in my AWS Account. The Kubernetes POD with MQ Container gets deployed without any errors. The thing is when I deploy my MQ POD I can't run MQ commands within the container :

Below is the error after I exec into my MQ Container :

[ec2-user@ip-172-31-83-249 ~]$ docker exec -it 2265faa9da06 /bin/bash
(mq:9.1.1.0)root@podnate:/# dspmq
2 - 'No such file or directory' from /var/mqm/mqs.ini
(mq:9.1.1.0)root@podnate:/#
(mq:9.1.1.0)root@podnate:/# dspmqver
AMQ7047E: An unexpected error was encountered by a command. Reason code is 0.
(mq:9.1.1.0)root@podnate:/#
(mq:9.1.1.0)root@podnate:/# su - mqm
No directory, logging in with HOME=/
$ dspmqver
AMQ7047E: An unexpected error was encountered by a command. Reason code is 0.
$
$ dspmq
2 - 'No such file or directory' from /var/mqm/mqs.ini
$
$ ls -rlt /var/mqm
lrwxrwxrwx 1 root root 13 Dec 10 11:13 /var/mqm -> /mnt/mqm/data
$
$ ls -rlt /mnt/mqm/data
ls: cannot access '/mnt/mqm/data': No such file or directory
$


Below is my Pod Definition yaml file :

apiVersion: v1
kind: Pod
metadata:
name: podnate
labels:
purpose: demonstrate-envars
spec:
containers:
- name: mymqimage
image: ibmcom/mq:latest
imagePullPolicy: IfNotPresent
env:
- name: LICENSE
value: "accept"
- name: MQ_QMGR_NAME
value: "HELLO"
command: [ "/bin/bash", "-c", "--" ]
args: [ "while true; do sleep 30; done;" ]
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jan 04, 2019 10:25 pm Post subject: Reply with quote

Grand Poobah

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

Obviously you need to have /opt/mqm or the equivalent on your image. Looks like it is not there...
At the same time you need /var/mqm to be external and mounted every time the pod gets deployed and before the qmgr gets started...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
MQ_AGENT
PostPosted: Sat Jan 05, 2019 8:02 am Post subject: Reply with quote

Newbie

Joined: 05 Feb 2016
Posts: 7

"Obviously you need to have /opt/mqm or the equivalent on your image. Looks like it is not there..."

-->The /opt/mqm directory is properly created within the Image. If I display the /opt/mqm dir in list format , I can see proper output :

(mq:9.1.1.0)root@podnatee:/var# ls -rlt /opt/mqm
total 32
-r--r--r-- 1 mqm mqm 0 Nov 21 10:48 mqpatch.dat
-r--r--r-- 1 mqm mqm 15999 Nov 21 10:48 instinfo.tsk
dr-xr-xr-x 2 mqm mqm 335 Dec 10 11:12 READMES
dr-xr-xr-x 16 mqm mqm 188 Dec 10 11:12 doc
dr-xr-xr-x 7 mqm mqm 65 Dec 10 11:12 java
dr-xr-xr-x 12 mqm mqm 4096 Dec 10 11:13 samp
dr-xr-xr-x 16 mqm mqm 188 Dec 10 11:13 msg
dr-xr-xr-x 3 mqm mqm 4096 Dec 10 11:13 lib64
dr-xr-xr-x 2 mqm mqm 24 Dec 10 11:13 inc
dr-xr-xr-x 2 mqm mqm 4096 Dec 10 11:13 swidtag
dr-xr-x--- 9 mqm mqm 150 Dec 10 11:13 web
dr-xr-xr-x 4 mqm mqm 253 Dec 10 11:13 lib
dr-xr-xr-x 7 mqm mqm 199 Dec 10 11:13 gskit8
dr-xr-xr-x 3 mqm mqm 4096 Dec 10 11:13 bin
dr-xr-xr-x 1 mqm mqm 35 Dec 10 11:14 licenses


"At the same time you need /var/mqm to be external and mounted every time the pod gets deployed"

I updated the yml file to mount the /mnt/mqm inside the container to a path on the host server (/var/example) . It failed with same error. Reason to mount /mnt/mqm rather than /var/mqm is available in the below link :

https://github.com/ibm-messaging/mq-container/issues/74

(/var/mqm is soft-linked to /mnt/mqm/data by default within container

(mq:9.1.1.0)root@podnatee:/mnt/mqm# ls -rlt /var/mqm
lrwxrwxrwx 1 root root 13 Dec 10 11:13 /var/mqm -> /mnt/mqm/data
)

Updated YML file :

apiVersion: v1
kind: Pod
metadata:
name: podnate
labels:
purpose: demonstrate-envars
spec:
volumes:
- name: task-pv-storage
hostPath:
path: /var/example
containers:
- name: mymqimage
image: ibmcom/mq:latest
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: "/mnt/mqm"
name: task-pv-storage
env:
- name: LICENSE
value: "accept"
- name: MQ_QMGR_NAME
value: "HELO"
command: [ "/bin/bash", "-c", "--" ]
args: [ "while true; do sleep 30; done;" ]

Error : Same as last case.

(mq:9.1.1.0)root@podnatee:/var#
(mq:9.1.1.0)root@podnatee:/var# dspmq
2 - 'No such file or directory' from /var/mqm/mqs.ini
(mq:9.1.1.0)root@podnatee:/var# dspmqver
AMQ7047E: An unexpected error was encountered by a command. Reason code is 0.
(mq:9.1.1.0)root@podnatee:/var# crtmqm TEST
AMQ8101S: IBM MQ error (893) has occurred.
(mq:9.1.1.0)root@podnatee:/var#
Back to top
View user's profile Send private message
MQ_AGENT
PostPosted: Sat Jan 19, 2019 8:37 am Post subject: Reply with quote

Newbie

Joined: 05 Feb 2016
Posts: 7

Not sure what went wrong there but using helm charts resolved that issue for me.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ Installation/Configuration SupportIBM MQ Docker Image not working with Kubernetes
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.