简体   繁体   中英

wso2esb failover configuration throws error

this is my proxy configuration

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="FileProcessorProxy" transports="vfs" startOnLoad="true" trace="disable">
    <target>
        <inSequence>
            <log level="full"/>
            <property xmlns:ns2="http://org.apache.synapse/xsd" name="transport.vfs.ReplyFileName" expression="fn:concat(fn:substring-after(get-property('MessageID'), 'urn:uuid:'), '.txt')" scope="transport" type="STRING"/>
            <property name="OUT_ONLY" value="true" scope="default" type="STRING"/>
            <send>
                <endpoint name="FailOverTest">
                    <failover>
                        <endpoint name="endpoint_urn_uuid_6179155B57847314A656794419902014617670556">
                            <address uri="vfs:file:///opt/wso2/wso2data/esboverviewtest/out"/>
                        </endpoint>
                        <endpoint name="endpoint_urn_uuid_failureOut">
                            <address uri="vfs:file:///opt/wso2/wso2data/esboverviewtest/failureOut"/>
                        </endpoint>
                    </failover>
                </endpoint>
            </send>
        </inSequence>
        <outSequence/>
        <faultSequence>
            <log level="full">
                <property name="faultSequence" value="send endpoint error"/>
            </log>
        </faultSequence>
    </target>
    <parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
    <parameter name="transport.PollInterval">5</parameter>
    <parameter name="transport.vfs.MoveAfterProcess">file:///opt/wso2/wso2data/esboverviewtest/original</parameter>
    <parameter name="transport.vfs.FileURI">file:///opt/wso2/wso2data/esboverviewtest/in</parameter>
    <parameter name="transport.vfs.MoveAfterFailure">file:///opt/wso2/wso2data/esboverviewtest/failureIn</parameter>
    <parameter name="transport.vfs.FileNamePattern">.*.txt</parameter>
    <parameter name="transport.vfs.ContentType">text/plain</parameter>
    <parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
    <parameter name="transport.vfs.MoveTimestampFormat">yyyy-MM-dd'T'HH:mm:ss.SSSZ_</parameter>
</proxy>

when I drop a proper file to to the "in" folder I got the following error -

[2015-09-06 18:36:50,092]  INFO - LogMediator To: , WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: urn:uuid:3D8967DAB6BB7F719D1441546610096, Direction: request, Envelope: <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><text xmlns="http://ws.apache.org/commons/ns/payload">test message 1
</text></soapenv:Body></soapenv:Envelope>
[2015-09-06 18:36:50,092] ERROR - ClientUtils Address information does not exist in the Endpoint Reference (EPR).The system cannot infer the transport mechanism.
[2015-09-06 18:36:50,092] ERROR - Axis2Sender Unexpected error during sending message out
org.apache.axis2.AxisFault: Address information does not exist in the Endpoint Reference (EPR).The system cannot infer the transport mechanism.
    at org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.java:73)
    at org.apache.axis2.client.OperationClient.prepareMessageContext(OperationClient.java:288)
    at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:249)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
    at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:482)
    at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:59)
    at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:338)
    at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:94)
    at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:77)
    at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:47)
    at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:131)
    at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:166)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
    at org.apache.axis2.transport.base.AbstractTransportListener.handleIncomingMessage(AbstractTransportListener.java:328)
    at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:597)
    at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:328)
    at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:158)
    at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:107)
    at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
    at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
[2015-09-06 18:36:50,093]  INFO - LogMediator To: , WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: urn:uuid:3D8967DAB6BB7F719D1441546610096, Direction: request, faultSequence = send endpoint error, Envelope: <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><text xmlns="http://ws.apache.org/commons/ns/payload">test message 1
</text></soapenv:Body></soapenv:Envelope>

to be short:

[2015-09-06 18:36:50,092] ERROR - Axis2Sender Unexpected error during sending message out
org.apache.axis2.AxisFault: Address information does not exist in the Endpoint Reference (EPR).The system cannot infer the transport mechanism.

However, if I remove failover configuration and leave just simple endpoint with "out" directory the file is process succesfully.

I cannot understand why failover throws such exception and how to fix it.

Somehow, by checking various options, i figured out that if you change endpoint name you MUST call "publish" command against the wso2esb server again (in WSO2 development studio). In other case, wso2esb does not see endpoint's new name

I am still not sure why it is so (bug?). At least, now I have a workaround...

在我的情况下,我从数据库中获取 URL,不小心将其设置为空,这就是为什么我遇到上述问题的原因。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM