MQ

MQ

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only

IBM Managed File Transfer configuration to transfer files between two systems 

Wed March 04, 2020 01:29 PM

IBM Managed File Transfer configuration to transfer files between two systems

Ram Subbarao
Published on 18/04/2018 / Updated on 30/07/2018

Following steps help in setting up MFT agents across two machines to initiate a file transfer between those two machines.
Two agents will be created one on Machine1 and the other on Machine2. We will have a setup of 2 queue managers.
AGENT1QM – AGENT1 Queue Manager – On Machine1 – machine1.com
AGENG2QM – AGENT2 Queue Manager which also acts as the Coordination and Command Queue Managers – On Machine2 – machine2.com – user:mftuser

Step 1: Create OS user by name “mftuser” on both the machines.
login using “mftuser”
Step 2: Create AGENT1QM on the machine1 with port 1414 and set appropriate authorities on the queue manager and queue manager objects
• crtmqm AGENT1QM
• strmqm AGENT1QM
• define listener(L1) trptype(TCP) port(1414)
• start listener(L1)
• def channel(AGENT1.SVRCONN) CHLTYPE(SVRCONN)
• DEFINE QLOCAL(AGENT2QM) DESCR(‘Transmission queue to AGENT2QM’)
REPLACE USAGE(XMITQ) PUT(ENABLED) GET(ENABLED)
INITQ(SYSTEM.CHANNEL.INITQ)
• DEFINE CHANNEL(AGENT1QM_AGENT2QM) CHLTYPE(SDR) TRPTYPE(TCP)
CONNAME(‘machine2.com (1415)’) XMITQ(AGENT2QM) REPLACE
DESCR(‘Sender channel to AGENT1 QM’)
• DEFINE CHANNEL(AGENT2QM_AGENT1QM) CHLTYPE(RCVR) TRPTYPE(TCP)
REPLACE DESCR(‘Receiver channel from AGENT2 Queue Manager’)
• Set the user authorities on the queue manager
• setmqaut -m AGENT1QM -t qmgr -p “mftuser” -all
• setmqaut -m AGENT1QM -t qmgr -p “mftuser” +ctrl +connect +inq
• Create channel authentication record for the user “mftuser”
• SET CHLAUTH(‘AGENT1.SVRCONN’) TYPE(USERMAP) CLNTUSER(‘mftuser’)
USERSRC(MAP) MCAUSER(‘mftuser’) CHCKCLNT(REQUIRED) ACTION(ADD)
• REFRESH SECURITY(*)
• Set the user authorities on the transmission queue
• setmqaut -m AGENT1QM -n “AGENT2QM” -t q -p “mftuser” -remove
• setmqaut -m AGENT1QM -n “AGENT2QM” -t q -p “mftuser” +dsp +browse +get +inq +put +set

Step 3: Create AGENT2QM on the Machine2 with port 1415
• crtmqm AGENT2QM
• strmqm AGENT2QM
• define listener(L1) trptype(TCP) port(1415)
• start listener(L1)
• def channel(AGENT2.SVRCONN) CHLTYPE(SVRCONN)
• DEFINE QLOCAL(AGENT1QM) DESCR(‘Transmission queue to AGENT1QM’)
REPLACE USAGE(XMITQ) PUT(ENABLED) GET(ENABLED)
INITQ(SYSTEM.CHANNEL.INITQ)
• DEFINE CHANNEL(AGENT2QM_AGENT1QM) CHLTYPE(SDR) TRPTYPE(TCP)
CONNAME(‘ machine1.com (1414)’) XMITQ(AGENT1QM) REPLACE
DESCR(‘Sender channel to AGENT1 QM’)
• DEFINE CHANNEL(AGENT1QM_AGENT2QM) CHLTYPE(RCVR) TRPTYPE(TCP)
REPLACE DESCR(‘Receiver channel from AGENT1 Queue Manager’)
• Create Channel authentication record for user “mftuser”
• SET CHLAUTH(AGENT2.SVRCONN) TYPE(USERMAP) CLNTUSER(‘mftuser’)
USERSRC(MAP) MCAUSER(‘ mftuser’) CHCKCLNT(REQUIRED) ACTION(ADD)
• Set the user authorities on the queue manager for user
“mftuser”
• setmqaut -m AGENT2QM -t qmgr -p “mftuser” -all
• setmqaut -m AGENT2QM -t qmgr -p “mftuser” +ctrl +connect +inq
• Set the user authorities on the transmission queue
• setmqaut -m AGENT2QM -n “AGENT1QM” -t q -p “mftuser” -remove
• setmqaut -m AGENT2QM -n “AGENT1QM” -t q -p “mftuser” +dsp
+browse +get +inq +put +set
• Set the user authorities on the Server Connection channel
• setmqaut -m AGENT2QM -n “AGENT2.SVRCONN” -t chl -p “mftuser”
-remove
• setmqaut -m AGENT2QM -n “AGENT2.SVRCONN” -t chl -p “mftuser”
+chg +dlt +dsp +ctrl +ctrlx
• START CHANNEL(AGENT2QM_AGENT1QM)
Step 4: Start the channel on AGENT1QM queue manager
• START CHANNEL(AGENT1QM_AGENT2QM)
Step 5: Make sure Sender- Receiver channels are in running state on both the queue managers
Step 6: Copy the MQMFTCredentials.xml file from samples directory to user home
directory on the machine where AGENT2QM is running. Add the
following tag into the file
<tns:mqmftCredentials
xmlns:tns=”http://wmqfte.ibm.com/MQMFTCredentials”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://wmqfte.ibm.com/MQMFTCredentials
MQMFTCredentials.xsd”><tns:qmgr
name=”AGENT2QM” user=”mftuser” mqUserId=”mftuser”
mqPassword=”admin@123″ />
</tns:mqmftCredentials>

In the above tag
name: name of the agent queue manager/coordination queue manager.
user: logged-in user name of the machine
mqUserId: mq userid
Step 7: Copy the MQMFTCredentials.xml file from samples directory to user home directory on the machine where AGENT1QM is running. Add the following tag into the file
<tns:mqmftCredentials
xmlns:tns=”http://wmqfte.ibm.com/MQMFTCredentials”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://wmqfte.ibm.com/MQMFTCredentials
MQMFTCredentials.xsd”>
<tns:qmgr
name=”AGENT2QM” user=”mftuser” mqUserId=”mftuser”
mqPassword=”admin@123″ />
<tns:qmgr
name=”AGENT1QM” user=”mftuser” mqUserId=”mftuser”
mqPassword=”admin@123″ />
</tns:mqmftCredentials>
In the above tag
name: name of the agent queue manager/coordination queue manager.
user: logged-in user name of the machine
mqUserId: mq userid
Step 8: Setup Coordination and Command queue managers on both the machines. AGENT2QM acts as coordination and command queue manager
• Run the following command to setup the coordination queue manager on the machine where AGENT2QM is running
• fteSetupCoordination -coordinationQMgr AGENT2QM -f
• runmqsc AGENT2QM < “%MQ_DATA_PATH%\mqft\config\AGENT2QM
\AGENT2QM.mqsc”
• fteSetupCommands -connectionQMgr AGENT2QM -f -p AGENT2QM
• setmqaut -m AGENT2QM -t queue -p mftuser -n SYSTEM.FTE +all
• setmqaut -m AGENT2QM -t topic -p mftuser -n SYSTEM.FTE +all
• setmqaut -m AGENT2QM -t queue -p mftuser -n
SYSTEM.DEFAULT.MODEL.QUEUE +all
• Run the following command on the machine where AGENT1QM is
running
• fteSetupCoordination -coordinationQMgr AGENT2QM
-coordinationQMgrHost machine2.com -coordinationQMgrPort 1415
-coordinationQMgrChannel AGENT2.SVRCONN -f
• fteSetupCommands -connectionQMgr AGENT2QM -connectionQMgrHost
machine2.com -connectionQMgrPort 1415 -connectionQMgrChannel
AGENT2.SVRCONN -f -p AGENT2QM -f
Step 9: Create AGENT1 on the machine where AGENT1QM is running
• fteCreateAgent -agentName AGENT1 -agentQMgr AGENT1QM -f -p
AGENT2QM -mquserid mftuser -mqpassword admin@123
• runmqsc AGENT1QM < “%MQ_DATA_PATH%\mqft\config\AGENT2QM\agents
\AGENT1\AGENT1_create.mqsc”
• setmqaut -m AGENT1QM -t queue -p mftuser -n
SYSTEM.FTE.REPLY.AGENT1 +all
• setmqaut -m AGENT1QM -t queue -p mftuser -n
SYSTEM.FTE.EVENT.AGENT1 +all
• setmqaut -m AGENT1QM -t queue -p mftuser -n
SYSTEM.FTE.STATE.AGENT1 +all
• setmqaut -m AGENT1QM -t queue -p mftuser -n
SYSTEM.FTE.COMMAND.AGENT1 +all
• setmqaut -m AGENT1QM -t queue -p mftuser -n
SYSTEM.FTE.DATA.AGENT1 +all
• REFRESH SECURITY()
• fteStartAgent AGENT1 -p AGENT2QM
Step 10: Create AGENT2 on the machine where AGENT2QM is running
• fteCreateAgent -agentName AGENT2 -agentQMgr AGENT2QM -f -p
AGENT2QM -mquserid mftuser -mqpassword admin@123
• runmqsc AGETN2QM < %MQ_DATA_PATH%\mqft\config\AGENT2QM\agents
\AGENT2\AGENT2_create.mqsc
• setmqaut -m AGENT2QM -t queue -p mftuser -n
SYSTEM.FTE.REPLY.AGENT2 +all
• setmqaut -m AGENT2QM -t queue -p mftuser -n
SYSTEM.FTE.EVENT.AGENT2 +all
• setmqaut -m AGENT2QM -t queue -p mftuser -n
SYSTEM.FTE.STATE.AGENT2 +all
• setmqaut -m AGENT2QM -t queue -p mftuser -n
SYSTEM.FTE.COMMAND.AGENT2 +all
• setmqaut -m AGENT2QM -t queue -p mftuser -n
SYSTEM.FTE.DATA.AGENT2 +all
• REFRESH SECURITY(
)
• fteStartAgent AGENT2 -p AGENT2QM
Step 11: Running listagents command on machine where AGENT2QM is running, should show both the agent’s in “READY” state
fteListAgents -p AGENT2QM

 

Statistics
0 Favorited
14 Views
1 Files
0 Shares
16 Downloads
Attachment(s)
pdf file
IBM Managed File Transfer configuration to transfer files....pdf   157 KB   1 version
Uploaded - Wed March 04, 2020