ibm-messaging / mq-container-mft

Samples for integrating MQ MFT in Cloud scenarios
13 stars 12 forks source link

Failed to configure bridge agent #15

Closed josephsadek closed 4 months ago

josephsadek commented 6 months ago

Iam try to create bridge agent on mft over openshift using cp4i 2022.2 and the following my configration cat << EOF > mft-mqsc.mqsc apiVersion: v1 kind: ConfigMap metadata: name: mft-mqsc data: agt.mqsc: | DEFINE CHANNEL(SABER.MFTCHL) CHLTYPE(SVRCONN) TRPTYPE(TCP) DEFINE CHANNEL(AGT.MFTCHL) CHLTYPE(SVRCONN) TRPTYPE(TCP) DEFINE CHANNEL(AGTQMSVRCONN) CHLTYPE(SVRCONN) TRPTYPE(TCP) SSLCAUTH(OPTIONAL) SSLCIPH('ANY_TLS12_OR_HIGHER') SET CHLAUTH(AGTQMSVRCONN) TYPE(BLOCKUSER) USERLIST('nobody') ACTION(ADD) ALTER QMGR REPOS(MCLMFT) DEFINE CHANNEL(AGTQM.CRDQM) CHLTYPE(CLUSSDR) TRPTYPE(TCP) CONNAME('agtqm-ibm-mq (1414), crdqm-ibm-mq (1414)') CLUSTER(MCLMFT) START CHANNEL(AGTQM.CRDQM) DEFINE CHANNEL(CRDQM.AGTQM) CHLTYPE(CLUSRCVR) TRPTYPE(TCP) CONNAME('agtqm-ibm-mq (1414), crdqm-ibm-mq (1414)') CLUSTER(MCLMFT) START CHANNEL(CRDQM.AGTQM) ALTER QMGR CHLAUTH(DISABLED) CONNAUTH('') crd.mqsc: | DEFINE CHANNEL(CRDQMSVRCONN) CHLTYPE(SVRCONN) TRPTYPE(TCP) SSLCAUTH(OPTIONAL) SSLCIPH('ANY_TLS12_OR_HIGHER') SET CHLAUTH(CRDQMSVRCONN) TYPE(BLOCKUSER) USERLIST('nobody') ACTION(ADD) DEFINE CHANNEL(MFTCORDSVRCONN) CHLTYPE(SVRCONN) TRPTYPE(TCP) ALTER QMGR REPOS(MCLMFT) DEFINE CHANNEL(AGTQM.CRDQM) CHLTYPE(CLUSRCVR) TRPTYPE(TCP) CONNAME('agtqm-ibm-mq (1414), crdqm-ibm-mq (1414)') CLUSTER(MCLMFT) START CHANNEL(AGTQM.CRDQM) DEFINE CHANNEL(CRDQM.AGTQM) CHLTYPE(CLUSSDR) TRPTYPE(TCP) CONNAME('crdqm-ibm-mq (1414), agtqm-ibm-mq (1414)') CLUSTER(MCLMFT) START CHANNEL(CRDQM.AGTQM) ALTER QMGR CHLAUTH(DISABLED) CONNAUTH('') DEFINE TOPIC('SYSTEM.FTE') TOPICSTR('SYSTEM.FTE') REPLACE ALTER TOPIC('SYSTEM.FTE') NPMSGDLV(ALLAVAIL) PMSGDLV(ALLAVAIL) DEFINE QLOCAL(SYSTEM.FTE) LIKE(SYSTEM.BROKER.DEFAULT.STREAM) REPLACE ALTER QLOCAL(SYSTEM.FTE) DESCR('Stream for MQMFT Pub/Sub interface') DISPLAY NAMELIST(SYSTEM.QPUBSUB.QUEUE.NAMELIST) ALTER NAMELIST(SYSTEM.QPUBSUB.QUEUE.NAMELIST) + NAMES(SYSTEM.BROKER.DEFAULT.STREAM+ ,SYSTEM.BROKER.ADMIN.STREAM,SYSTEM.FTE) DISPLAY QMGR PSMODE ALTER QMGR PSMODE(ENABLED) EOF


cat << EOF > saberpba01-mft.yaml apiVersion: v1 kind: ConfigMap metadata: name: saberpba01-mft namespace: mft data: saberpba01.mqsc: | DEFINE QLOCAL(SYSTEM.FTE.COMMAND.SABERPBA01) + DEFPRTY(0) + DEFSOPT(SHARED) + GET(ENABLED) + MAXDEPTH(5000) + MAXMSGL(4194304) + MSGDLVSQ(PRIORITY) + PUT(ENABLED) + RETINTVL(999999999) + SHARE + NOTRIGGER + USAGE(NORMAL) + REPLACE DEFINE QLOCAL(SYSTEM.FTE.DATA.SABERPBA01) + DEFPRTY(0) + DEFSOPT(SHARED) + GET(ENABLED) + MAXDEPTH(5000) + MAXMSGL(4194304) + MSGDLVSQ(PRIORITY) + PUT(ENABLED) + RETINTVL(999999999) + SHARE + NOTRIGGER + USAGE(NORMAL) + REPLACE DEFINE QLOCAL(SYSTEM.FTE.REPLY.SABERPBA01) + DEFPRTY(0) + DEFSOPT(SHARED) + GET(ENABLED) + MAXDEPTH(5000) + MAXMSGL(4194304) + MSGDLVSQ(PRIORITY) + PUT(ENABLED) + RETINTVL(999999999) + SHARE + NOTRIGGER + USAGE(NORMAL) + REPLACE DEFINE QLOCAL(SYSTEM.FTE.STATE.SABERPBA01) + DEFPRTY(0) + DEFSOPT(SHARED) + GET(ENABLED) + MAXDEPTH(5000) + MAXMSGL(4194304) + MSGDLVSQ(PRIORITY) + PUT(ENABLED) + RETINTVL(999999999) + SHARE + NOTRIGGER + USAGE(NORMAL) + REPLACE DEFINE QLOCAL(SYSTEM.FTE.EVENT.SABERPBA01) + DEFPRTY(0) + DEFSOPT(SHARED) + GET(ENABLED) + MAXDEPTH(5000) + MAXMSGL(4194304) + MSGDLVSQ(PRIORITY) + PUT(ENABLED) + RETINTVL(999999999) + SHARE + NOTRIGGER + USAGE(NORMAL) + REPLACE DEFINE QLOCAL(SYSTEM.FTE.AUTHAGT1.SABERPBA01) + DEFPRTY(0) + DEFSOPT(SHARED) + GET(ENABLED) + MAXDEPTH(0) + MAXMSGL(0) + MSGDLVSQ(PRIORITY) + PUT(ENABLED) + RETINTVL(999999999) + SHARE + NOTRIGGER + USAGE(NORMAL) + REPLACE DEFINE QLOCAL(SYSTEM.FTE.AUTHTRN1.SABERPBA01) + DEFPRTY(0) + DEFSOPT(SHARED) + GET(ENABLED) + MAXDEPTH(0) + MAXMSGL(0) + MSGDLVSQ(PRIORITY) + PUT(ENABLED) + RETINTVL(999999999) + SHARE + NOTRIGGER + USAGE(NORMAL) + REPLACE DEFINE QLOCAL(SYSTEM.FTE.AUTHOPS1.SABERPBA01) + DEFPRTY(0) + DEFSOPT(SHARED) + GET(ENABLED) + MAXDEPTH(0) + MAXMSGL(0) + MSGDLVSQ(PRIORITY) + PUT(ENABLED) + RETINTVL(999999999) + SHARE + NOTRIGGER + USAGE(NORMAL) + REPLACE DEFINE QLOCAL(SYSTEM.FTE.AUTHSCH1.SABERPBA01) + DEFPRTY(0) + DEFSOPT(SHARED) + GET(ENABLED) + MAXDEPTH(0) + MAXMSGL(0) + MSGDLVSQ(PRIORITY) + PUT(ENABLED) + RETINTVL(999999999) + SHARE + NOTRIGGER + USAGE(NORMAL) + REPLACE DEFINE QLOCAL(SYSTEM.FTE.AUTHMON1.SABERPBA01) + DEFPRTY(0) + DEFSOPT(SHARED) + GET(ENABLED) + MAXDEPTH(0) + MAXMSGL(0) + MSGDLVSQ(PRIORITY) + PUT(ENABLED) + RETINTVL(999999999) + SHARE + NOTRIGGER + USAGE(NORMAL) + REPLACE DEFINE QLOCAL(SYSTEM.FTE.AUTHADM1.SABERPBA01) + DEFPRTY(0) + DEFSOPT(SHARED) + GET(ENABLED) + MAXDEPTH(0) + MAXMSGL(0) + MSGDLVSQ(PRIORITY) + PUT(ENABLED) + RETINTVL(999999999) + SHARE + NOTRIGGER + USAGE(NORMAL) + REPLACE DEFINE QLOCAL(SYSTEM.FTE.HA.SABERPBA01) + DEFPRTY(0) + DEFSOPT(SHARED) + GET(ENABLED) + MAXDEPTH(0) + MAXMSGL(0) + MSGDLVSQ(PRIORITY) + PUT(ENABLED) + RETINTVL(999999999) + SHARE + NOTRIGGER + USAGE(NORMAL) + REPLACE EOF


cat << EOF > configMapnew.yaml kind: ConfigMap apiVersion: v1 metadata: name: mqmft-bridge-config namespace: mft

data: mqmftcfg.json: > {"waitTimeToStart":20,"coordinationQMgr":{"name":"CRDQM","host":"crdqm-ibm-mq","port":1414,"channel":"MFTCORDSVRCONN","additionalProperties":{}},"commandQMgr":{"name":"CRDQM","host":"crdqm-ibm-mq","port":1414,"channel":"MFTCORDSVRCONN","additionalProperties": {}},"agents":[{"name":"SABERPBA01","type":"BRIDGE", "deleteOnTermination":"true","cleanOnStart":"all", "qmgrName":"AGTQM","qmgrHost":"agtqm-ibm-mq","qmgrPort":1414,"qmgrChannel":"SABER.MFTCHL","protocolBridge": {"serverType":"SFTP","serverHost":"saneussftptestinng02.blob.core.windows.net","serverPlatform":"UNIX","serverLocale":"en-GB","listFormat"="UNIX", "limitedWrite"="false", "serverFileEncoding"="UTF8", "passiveMode"="true", "protocolBridgeProperties" : {}}, "additionalProperties":{"logCapture":"true","enableQueueInputOutput":"false", "protocolBridgeCredentialConfiguration":"/mqmftbridgecred/agentcreds/ProtocolBridgeCredentials.prop"}}]} EOF

cat << EOF> CRDQM.yaml apiVersion: mq.ibm.com/v1beta1 kind: QueueManager metadata: name: crdqm spec: license: accept: true license: L-YBXJ-ADJNSM use: NonProduction queueManager: name: CRDQM mqsc:


cat << EOF> AGTQM.yaml apiVersion: mq.ibm.com/v1beta1 kind: QueueManager metadata: name: agtqm spec: license: accept: true license: L-YBXJ-ADJNSM use: NonProduction queueManager: name: AGTQM mqsc:


cat << EOF > saberpba01mod.yaml kind: Deployment apiVersion: apps/v1 metadata: name: ibm-mq-managed-file-transfer-saberpba01 namespace: mft spec: replicas: 1 selector: matchLabels: app: ibm-mq-managed-file-transfer-saberpba01 template: metadata: labels: app: ibm-mq-managed-file-transfer-saberpba01 deploymentconfig: ibm-mq-managed-file-transfer-saberpba01 spec: volumes:

ShashikanthRaoT commented 6 months ago

Hello @josephsadek Thank you for raising this issue. I shall investigate and update you at the earliest.

Regards

josephsadek commented 6 months ago

I figure some problem in my configuration and fixed it as following kind: ConfigMap apiVersion: v1 metadata: name: mqmft-bridge-config namespace: mft data: mqmftcfg.json: | { "waitTimeToStart":20, "coordinationQMgr":{ "name":"CRDQM", "host":"crdqm-ibm-mq", "port":1414, "channel":"MFTCORDSVRCONN", "qmgrCredentials" : { "mqUserId":"mquser", "mqPassword":"cGFzc3cwcmQ="}, "additionalProperties":{} }, "commandQMgr":{ "name":"CRDQM", "host":"crdqm-ibm-mq", "port":1414, "channel":"MFTCORDSVRCONN", "qmgrCredentials" : { "mqUserId":"mquser", "mqPassword":"cGFzc3cwcmQ="}, "additionalProperties": {} }, "agents":[ { "name":"SABERPBA01", "type":"BRIDGE", "deleteOnTermination":"true", "cleanOnStart":"all", "qmgrName":"AGTQM", "qmgrHost":"agtqm-ibm-mq", "qmgrPort":1414, "qmgrChannel":"SABER.MFTCHL", "qmgrCredentials" : { "mqUserId":"mquser", "mqPassword":"cGFzc3cwcmQ="}, "defaultServer" :"mySFTPserver", "maxActiveDestinationTransfers":25, "failTransferWhenCapacityReached":"true", "additionalProperties":{ "logCapture":"true", "enableQueueInputOutput":"false", "protocolBridgeCredentialConfiguration":"/mnt/credentials/ProtocolBridgeCredentials.prop" }, "protocolServers": [{ "name":"mySFTPserver", "type":"SFTP", "host":"saneussftptestinng02.blob.core.windows.net", "platform":"windows", "locale":"en_GB", "fileEncoding":"UTF-8", "limitedWrite":"false", "connectionTimeout":60 }] }] }

and create Deployment again as following kind: Deployment apiVersion: apps/v1 metadata: name: ibm-mq-managed-file-transfer-saberpba01 namespace: mft spec: replicas: 1 selector: matchLabels: app: ibm-mq-managed-file-transfer-saberpba01 template: metadata: labels: app: ibm-mq-managed-file-transfer-saberpba01 deploymentconfig: ibm-mq-managed-file-transfer-saberpba01 spec: volumes:

and I can see agent configure but facing new error as following

[14/03/2024 20:47:52:231 GMT] 00000001 Agent I BFGAG0204I: Agent is running in 'oci' container runtime. [14/03/2024 20:47:52:372 GMT] 00000001 RASImpl I BFGUT0039I: The transfer log specification has changed to "info". [14/03/2024 20:47:52:453 GMT] 00000001 UserExitsFact E BFGUE0034E: The agent cannot continue because the user exit class 'com.ibm.wmq.bridgecredentialexit.ProtocolBridgeCustomCredentialExit' referenced by property 'protocolBridgeCredentialExitClasses' because this class threw an exception during its instantiation. The exception is: java.lang.NoClassDefFoundError: org.json.JSONException Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal Caused by: java.lang.ClassNotFoundException: org.json.JSONException Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal Failed to process log message - invalid character '\t' in string literal

[14/03/2024 20:47:52:686 GMT] 00000001 ABENDImpl E BFGUT0003E: An internal error has occurred. An unexpected condition has occurred that has resulted in the abnormal end of this process. Failure data was captured in file "ABEND.FTE.20240314204752455.9078085139541639507.log". [14/03/2024 20:48:05.672 UTC] Command output: 5724-H72 Copyright IBM Corp. 2008, 2023. ALL RIGHTS RESERVED Couldn't create user preferences directory. User preferences are unusable. java.io.IOException: No such file or directory BFGCL0212I: Issuing ping request to agent SABERPBA01 BFGCL0214I: Agent SABERPBA01 didn't respond to ping after 10 seconds.

Error: . [14/03/2024 20:48:05.672 UTC] Agent SABERPBA01 has not started yet. Status will be verified again after 10 seconds. [14/03/2024 20:48:15.672 UTC] Verifying status of agent SABERPBA01. [14/03/2024 20:48:29.097 UTC] Command output: 5724-H72 Copyright IBM Corp. 2008, 2023. ALL RIGHTS RESERVED Couldn't create user preferences directory. User preferences are unusable. java.io.IOException: No such file or directory BFGCL0212I: Issuing ping request to agent SABERPBA01 BFGCL0214I: Agent SABERPBA01 didn't respond to ping after 10 seconds.

Error: . [14/03/2024 20:48:29.097 UTC] Agent SABERPBA01 did not start. ibm-mq-managed-file-transfer-saberpba01-b766bcdd-krw9b-ibm-mq-managed-file-transfer-saberpba01 (4).log

you can see full log from attach

ShashikanthRaoT commented 6 months ago

Thanks for update.

An update has been made to the developer version of the MFT container image that fixes the reported issue. Please try again with the latest image from icr.io/ibm-messaging/mqmft:latest.

josephsadek commented 4 months ago

thanks shahikanth for your support