jpos : 收到错误 o.j.t.p.QueryHost.prepare:97 'mux.S2M-E02-MPGS-AUTORESPONDER' 未连接
jpos : getting error o.j.t.p.QueryHost.prepare:97 'mux.S2M-E02-MPGS-AUTORESPONDER' is not connected
不知道为什么我会收到此错误:收到错误
o.j.t.p.QueryHost.prepare:97 'mux.S2M-E02-MPGS-AUTORESPONDER' is not
connected
我的 jpos 服务器 xml 文件如下
<server class="org.jpos.q2.iso.QServer" logger="Q2" name="mpgs-server-7276" realm="mpgs-server-7276">
<attr name="port" type="java.lang.Integer">7276</attr>
<channel class="org.jpos.iso.channel.NACChannel"
packager="org.jpos.iso.packager.GenericPackager"
type="server"
logger="Q2"
header="6000000000"
>
<property name="packager-config" value="cfg/packager/CISascii.xml" debug="True" />
<property name="timeout" value="180000"/>
</channel>
<request-listener class="org.jpos.iso.IncomingListener" logger="Q2" realm="incoming-request-listener">
<property name="queue" value="S2M_E02_MPGSTXNMGR" />
<property name="ctx.DESTINATION" value="S2M-E02-MPGS-AUTORESPONDER" />
</request-listener>
</server>
我的交易经理如下
<?xml version='1.0'?>
<txnmgr class="org.jpos.transaction.TransactionManager" logger="Q2">
<property name="queue" value="S2M_E02_MPGSTXNMGR"/>
<property name="sessions" value="2"/>
<property name="max-sessions" value="128"/>
<property name="debug" value="true"/>
<participant class="org.jpos.transaction.participant.QueryHost"/>
<participant class="org.jpos.transaction.participant.SendResponse"/>
</txnmgr>
我的 mux 如下
<?xml version="1.0" ?>
<mux class="org.jpos.q2.iso.QMUX" logger="Q2" name="S2M-E02-MPGS-AUTORESPONDER">
<in>mpgsrsc-s2me02-receive</in>
<out>mpgsrsc-s2me02-send</out>
<ready>mpgs-S2M-E02-channel</ready>
</mux>
我的频道如下
<?xml version="1.0" ?>
<channel-adaptor name='mpgs-S2M-E02-channel' class="org.jpos.q2.iso.ChannelAdaptor" logger="Q2">
<channel class="org.jpos.iso.channel.NACChannel"
packager="org.jpos.iso.packager.GenericPackager"
logger="Q2"
header="6000000000"
>
<property name="packager-config" value="cfg/packager/AS280501.xml" debug="True" />
<property name="host" value="127.0.0.1" />
<property name="port" value="6269" />
<property name="timeout" value="180000"/>
</channel>
<in>mpgsrsc-s2me02-send</in>
<out>mpgsrsc-s2me02-receive</out>
<reconnect-delay>10000</reconnect-delay>
</channel-adaptor>
我将以下交易发送到频道
<log realm="org.jpos.transaction.TransactionManager" at="2020-05-07T01:51:54.931" lifespan="12014ms">
<abort>
txnmgr-1:idle:1
<context>
TIMESTAMP: Thu May 07 01:51:42 AEST 2020
SOURCE: org.jpos.iso.channel.NACChannel@277ca244
REQUEST:
<isomsg direction="incoming">
<!-- org.jpos.iso.packager.GenericPackager[cfg/packager/CISascii.xml] -->
<header>6000000000</header>
<field id="0" value="0200"/>
<field id="2" value="5000100100700010"/>
<field id="3" value="000000"/>
<field id="4" value="900000005000"/>
<field id="7" value="0507015142"/>
<field id="11" value="015142"/>
<field id="12" value="015142"/>
<field id="13" value="0507"/>
<field id="14" value="2005"/>
<field id="18" value="7399"/>
<field id="22" value="812"/>
<field id="25" value="15"/>
<field id="32" value="599950"/>
<field id="33" value="004601"/>
<field id="37" value="070520015142"/>
<field id="41" value="UTIS2I25"/>
<field id="42" value="000000EUREKAAIR"/>
<field id="48" value="543432303730313033323132343332386A48796E2B3759466931455541524541414141764E5565364876383D39323033313233363130353030303031" type="binary"/>
<field id="49" value="356"/>
<field id="61" value="1025100006600356"/>
<field id="120" value="9049 9252 AirTicketNo0123OrderInf001234567890123456789012349360 940800000000"/>
</isomsg>
DESTINATION: S2M-E02-MPGS-AUTORESPONDER
RESULT:
<result>
<fail>
[HOST_UNREACHABLE] o.j.t.p.QueryHost.prepare:97 'mux.S2M-E02-MPGS-AUTORESPONDER' is not connected
</fail>
</result>
我可以看到 6269 端口已连接到服务器上,但它仍然抱怨无法访问 HOST
<log realm="channel/127.0.0.1:6269" at="2020-05-07T02:00:33.102">
<connect>
Try 0 127.0.0.1:6269
</connect>
</log>
非常感谢你帮助解决这个问题或任何指导我应该检查什么
提前致谢
注意:这个问题充满了代码,但我别无选择来解释这种情况下发生的事情。
您的复用器中的就绪密钥有误,通道适配器导出的就绪密钥是其名称加上 .ready
后缀。
<mux class="org.jpos.q2.iso.QMUX" logger="Q2" name="S2M-E02-MPGS-AUTORESPONDER">
<in>mpgsrsc-s2me02-receive</in>
<out>mpgsrsc-s2me02-send</out>
<ready>mpgs-S2M-E02-channel.ready</ready>
</mux>
由于 ready 指向一个从未被任何人更新的密钥,mux 始终认为目标未连接并且其 isConnected
方法 rteturns false
不知道为什么我会收到此错误:收到错误
o.j.t.p.QueryHost.prepare:97 'mux.S2M-E02-MPGS-AUTORESPONDER' is not connected
我的 jpos 服务器 xml 文件如下
<server class="org.jpos.q2.iso.QServer" logger="Q2" name="mpgs-server-7276" realm="mpgs-server-7276">
<attr name="port" type="java.lang.Integer">7276</attr>
<channel class="org.jpos.iso.channel.NACChannel"
packager="org.jpos.iso.packager.GenericPackager"
type="server"
logger="Q2"
header="6000000000"
>
<property name="packager-config" value="cfg/packager/CISascii.xml" debug="True" />
<property name="timeout" value="180000"/>
</channel>
<request-listener class="org.jpos.iso.IncomingListener" logger="Q2" realm="incoming-request-listener">
<property name="queue" value="S2M_E02_MPGSTXNMGR" />
<property name="ctx.DESTINATION" value="S2M-E02-MPGS-AUTORESPONDER" />
</request-listener>
</server>
我的交易经理如下
<?xml version='1.0'?>
<txnmgr class="org.jpos.transaction.TransactionManager" logger="Q2">
<property name="queue" value="S2M_E02_MPGSTXNMGR"/>
<property name="sessions" value="2"/>
<property name="max-sessions" value="128"/>
<property name="debug" value="true"/>
<participant class="org.jpos.transaction.participant.QueryHost"/>
<participant class="org.jpos.transaction.participant.SendResponse"/>
</txnmgr>
我的 mux 如下
<?xml version="1.0" ?>
<mux class="org.jpos.q2.iso.QMUX" logger="Q2" name="S2M-E02-MPGS-AUTORESPONDER">
<in>mpgsrsc-s2me02-receive</in>
<out>mpgsrsc-s2me02-send</out>
<ready>mpgs-S2M-E02-channel</ready>
</mux>
我的频道如下
<?xml version="1.0" ?>
<channel-adaptor name='mpgs-S2M-E02-channel' class="org.jpos.q2.iso.ChannelAdaptor" logger="Q2">
<channel class="org.jpos.iso.channel.NACChannel"
packager="org.jpos.iso.packager.GenericPackager"
logger="Q2"
header="6000000000"
>
<property name="packager-config" value="cfg/packager/AS280501.xml" debug="True" />
<property name="host" value="127.0.0.1" />
<property name="port" value="6269" />
<property name="timeout" value="180000"/>
</channel>
<in>mpgsrsc-s2me02-send</in>
<out>mpgsrsc-s2me02-receive</out>
<reconnect-delay>10000</reconnect-delay>
</channel-adaptor>
我将以下交易发送到频道
<log realm="org.jpos.transaction.TransactionManager" at="2020-05-07T01:51:54.931" lifespan="12014ms">
<abort>
txnmgr-1:idle:1
<context>
TIMESTAMP: Thu May 07 01:51:42 AEST 2020
SOURCE: org.jpos.iso.channel.NACChannel@277ca244
REQUEST:
<isomsg direction="incoming">
<!-- org.jpos.iso.packager.GenericPackager[cfg/packager/CISascii.xml] -->
<header>6000000000</header>
<field id="0" value="0200"/>
<field id="2" value="5000100100700010"/>
<field id="3" value="000000"/>
<field id="4" value="900000005000"/>
<field id="7" value="0507015142"/>
<field id="11" value="015142"/>
<field id="12" value="015142"/>
<field id="13" value="0507"/>
<field id="14" value="2005"/>
<field id="18" value="7399"/>
<field id="22" value="812"/>
<field id="25" value="15"/>
<field id="32" value="599950"/>
<field id="33" value="004601"/>
<field id="37" value="070520015142"/>
<field id="41" value="UTIS2I25"/>
<field id="42" value="000000EUREKAAIR"/>
<field id="48" value="543432303730313033323132343332386A48796E2B3759466931455541524541414141764E5565364876383D39323033313233363130353030303031" type="binary"/>
<field id="49" value="356"/>
<field id="61" value="1025100006600356"/>
<field id="120" value="9049 9252 AirTicketNo0123OrderInf001234567890123456789012349360 940800000000"/>
</isomsg>
DESTINATION: S2M-E02-MPGS-AUTORESPONDER
RESULT:
<result>
<fail>
[HOST_UNREACHABLE] o.j.t.p.QueryHost.prepare:97 'mux.S2M-E02-MPGS-AUTORESPONDER' is not connected
</fail>
</result>
我可以看到 6269 端口已连接到服务器上,但它仍然抱怨无法访问 HOST
<log realm="channel/127.0.0.1:6269" at="2020-05-07T02:00:33.102">
<connect>
Try 0 127.0.0.1:6269
</connect>
</log>
非常感谢你帮助解决这个问题或任何指导我应该检查什么
提前致谢
注意:这个问题充满了代码,但我别无选择来解释这种情况下发生的事情。
您的复用器中的就绪密钥有误,通道适配器导出的就绪密钥是其名称加上 .ready
后缀。
<mux class="org.jpos.q2.iso.QMUX" logger="Q2" name="S2M-E02-MPGS-AUTORESPONDER">
<in>mpgsrsc-s2me02-receive</in>
<out>mpgsrsc-s2me02-send</out>
<ready>mpgs-S2M-E02-channel.ready</ready>
</mux>
由于 ready 指向一个从未被任何人更新的密钥,mux 始终认为目标未连接并且其 isConnected
方法 rteturns false