I have a webservice with some input only operations. In the ESB i've created a proxy and sets the properties OUT_ONLY and FORCE_SC_ACCEPTED to true. Everytime I call the proxied operation I get the following error message in the wso2carbon.log:
TID: [0] [ESB] [2015-04-02 09:52:45,307] ERROR {org.apache.axis2.transport.base.threads.NativeWorkerPool} - Uncaught exception {org.apache.axis2.transport.base.threads.NativeWorkerPool}
java.lang.UnsupportedOperationException: Not yet implemented
at org.apache.axis2.description.OutOnlyAxisOperation.getMessage(OutOnlyAxisOperation.java:124)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.processResponse(MultitenantMessageReceiver.java:125)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.receive(MultitenantMessageReceiver.java:81)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:225)
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)
Althought everything seems to work OK, I am worried about this message. What am I doing wrong. These input only will be called very frequently in production, so I'd like them to be error free.
WSO2 ESB: 4.8.1
Thanks,
Danny
this exception will occur if OUT_ONLY=true and your backend sending a response back to the esb.if OUT_ONLY is set true, your are getting a response from the backend then it is not a valid scenarion for if OUT_ONLY property.check this post[1]
1.https://mohanadarshan.wordpress.com/2013/05/05/out_only-scenario-in-proxy-service-wso2-esb/
Out-only property is set to inform that this service does not return a response back. For instance if you are sending messages to a message broker. Force-sc-accepted flag causes ESB to send HTTP Accepted status response back to the client (which calls ESB) since otherwise client will timeout without a reaponse. So please make sure your backend service does not send a response and it is accessible to ESB.
Solved this issue for now: My ESB was running in multi-tenant mode. The proxy service were created in the tenant. I did a fresh install and put the config in (so no tenants). The error disappears immediately. When I remove the config and create a tenant and put the config into the tenant the error reappears. So might this be a bug. I can try to verify with running sample 253 (OneWayProxy) in a tenant.
Related
In WSO2 ESB 4.9.0 I configured a Scheduled Message Forwarding Processor to forward messages to a rabbitMQ message queue.
If I configure the targetEndpoint parameter in the message processor pointing to a proxy or API within the ESB, and then I send it to the rabbitMQ message queue, it works and no errors.
However, I would like the targetEndpoint to simply point directly to the external rabbitMQ message queue, with no proxy or API workaround.
For this, I create an endpoint whose address url is basically this (no properties nor parameters):
rabbitmq:/AMQPProxy?rabbitmq.confirm.delivery=true&rabbitmq.connection.pool.size=10&rabbitmq.server.host.name=localhost&rabbitmq.server.port=5672&rabbitmq.server.user.name=guest&rabbitmq.server.password=guest&rabbitmq.queue.name=MyQueue&rabbitmq.queue.routing.key=MyQueue
Then I point the targetEndpoint parameter in the message processor to this endpoint, and I get the following error.
[2017-05-08 16:49:12,298] ERROR - ForwardingService BlockingMessageSender of message processor [rabbitmq-message-processor] failed to send message to the endpoint
[2017-05-08 16:49:17,299] ERROR - ClientUtils The system cannot infer the transport information from the rabbitmq:/AMQPProxy?rabbitmq.confirm.delivery=true&rabbitmq.connection.pool.size=10&rabbitmq.server.host.name=localhost&rabbitmq.server.port=5672&rabbitmq.server.user.name=guest&rabbitmq.server.password=guest&rabbitmq.queue.name=MyQueue&rabbitmq.queue.routing.key=MyQueue URL.
[2017-05-08 16:49:17,299] ERROR - BlockingMsgSender Error sending Message to url : rabbitmq:/AMQPProxy?rabbitmq.confirm.delivery=true&rabbitmq.connection.pool.size=10&rabbitmq.server.host.name=localhost&rabbitmq.server.port=5672&rabbitmq.server.user.name=guest&rabbitmq.server.password=guest&rabbitmq.queue.name=MyQueue&rabbitmq.queue.routing.key=MyQueue
org.apache.axis2.AxisFault: The system cannot infer the transport information from the rabbitmq:/AMQPProxy?rabbitmq.confirm.delivery=true&rabbitmq.connection.pool.size=10&rabbitmq.server.host.name=localhost&rabbitmq.server.port=5672&rabbitmq.server.user.name=guest&rabbitmq.server.password=guest&rabbitmq.queue.name=MyQueue&rabbitmq.queue.routing.key=MyQueue URL.
at org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.java:81)
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.message.senders.blocking.BlockingMsgSender.sendRobust(BlockingMsgSender.java:265)
at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:183)
at org.apache.synapse.message.processor.impl.forwarder.ForwardingService.dispatch(ForwardingService.java:465)
at org.apache.synapse.message.processor.impl.forwarder.ForwardingService.execute(ForwardingService.java:208)
at org.wso2.carbon.mediation.ntask.NTaskAdapter.execute(NTaskAdapter.java:90)
at org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter.execute(TaskQuartzJobAdapter.java:67)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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)
[2017-05-08 16:49:17,301] ERROR - ForwardingService BlockingMessageSender of message processor [rabbitmq-message-processor] failed to send message to the endpoint
Could you tell me if it is possible to solve it and how?
Having WSO2 5.0.0 trying to implement the store and forward pattern with a JDBC message store.
Sending a message to the target endpoint throws an exception:
TID: [-1234] [] [2016-12-05 23:25:24,874] ERROR {org.apache.synapse.message.processor.impl.sampler.SamplingService} - Error occurred while executing the message {org.apache.synapse.message.processor.impl.sampler.SamplingService}
org.apache.synapse.SynapseException: Unexpected error during sending message out
at org.apache.synapse.core.axis2.Axis2Sender.handleException(Axis2Sender.java:257)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:84)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:548)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:382)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65)
at org.apache.synapse.endpoints.IndirectEndpoint.send(IndirectEndpoint.java:55)
at org.apache.synapse.mediators.builtin.CallMediator.handleNonBlockingCall(CallMediator.java:221)
at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:99)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.message.processor.impl.sampler.SamplingService$1.run(SamplingService.java:211)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:538)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:78)
... 15 more
I believe I am missing an important transport, Axis2 or Synapse property, but I am unable to find which one.
Sequences to store and forward are here.
I was trying to find out in the source codes what could be causing the NullPointerException, but for me it makes no sense as the httpMethod and messageType is defined.
Thank you all for any hint
Edit:
based on a comment, the Synapse source in use is here.
Where is your Message Processor here? Ideally your Message Processor should call the backend service using the call mediator. Can you please try out the steps as below.
Create a proxy service to accept messages and store them in your JDBC store using the store mediator inside that.
Then create a Scheduled Message Forwarding Processor which listens to the above JDBC store and forwards messages to the endpoint. If you need you can specify any reply sequence. Otherwise make sure you set following property inside your proxy service above. <property name="OUT_ONLY" value="true" />
If you still can not figure out the error get the wire logs by enabling the log4j.logger.httpclient.wire.header=DEBUG
log4j.logger.httpclient.wire.content=DEBUG in log4j.properties file and post it here so that I can analyze and help you out.
If you need guaranteed delivery, you have to use the Message Forwarding processor. Sampling processor is used to implement throttling related usecases which may lead to message loss.
For more information please refer the article [1]. Don't use the same synapse configuration since it is bit obsoleted, instead create artifacts using ESB web interface or developer studio. Otherwise you may run into different errors due to missing configurations.
[1] http://wso2.com/library/articles/2014/01/guaranteed-delivery-with-Message-Store-Message-Processor%20/
I got this error message a couple of times
21:36:01,172 ERROR [io.undertow.request] (default task-18) Undertow request failed HttpServerExchange{ CONNECT www.alipay.com:443}: java.lang.IllegalArgumentException: UT000068: Servlet path match failed
at io.undertow.servlet.handlers.ServletPathMatchesData.getServletHandlerByPath(ServletPathMatchesData.java:83)
at io.undertow.servlet.handlers.ServletPathMatches.getServletHandlerByPath(ServletPathMatches.java:76)
at io.undertow.servlet.handlers.ServletInitialHandler.handleRequest(ServletInitialHandler.java:121)
at org.projectodd.wunderboss.wildfly.WildFlyWeb$1.handleRequest(WildFlyWeb.java:80)
at io.undertow.server.session.SessionAttachmentHandler.handleRequest(SessionAttachmentHandler.java:68)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_80]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_80]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]
I believe Alipay is a chinese paymeny gateway. I am not using Alipay or any other payment gatweway currently. This is just a test application.
Any idea what is happening?
This is an attempt to use your site as a proxy tunnel. If you use a reverse proxy like nginx in front of your site, you can prevent requests like this from hitting your app.
I've created a proxy service in the ESB that is calling in-only soap operations. (So only an input message). The backend soap service responds with a HTTP 202/Accepted response with no content in the response. As far as I know, this is correct behavior for in-only operations.
When I call the the service via the ESB proxy service I keep getting errors in the logs:
java.lang.UnsupportedOperationException: Not yet implemented
at org.apache.axis2.description.OutOnlyAxisOperation.getMessage(OutOnlyAxisOperation.java:124)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.processResponse(MultitenantMessageReceiver.java:125)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.receive(MultitenantMessageReceiver.java:81)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:225)
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)
I've tried setting the OUT_ONLY property, FORCE_SC_ACCEPTED but the error persists. It seems that the ESB soap sender is not able to handle this scenario correctly.
Any idea how to handle this? I'm not able to change anything about the backend service.
my client sending me single request that time my proxy processing the response well
whenever number of clients increasing my proxy went error
means same service hit by number of client request with HTTP request
my error like this
PassThroughHttpListener System may be unstable: HTTP ListeningIOReactor encountered a runtime exception : null
java.lang.NullPointerException
at org.apache.synapse.transport.passthru.SourceResponse.start(SourceResponse.java:83)
at org.apache.synapse.transport.passthru.SourceHandler.responseReady(SourceHandler.java:184)
at org.apache.http.impl.nio.DefaultNHttpServerConnection.produceOutput(DefaultNHttpServerConnection.java:223)
at org.apache.http.impl.nio.DefaultServerIOEventDispatch.outputReady(DefaultServerIOEventDispatch.java:161)
at org.apache.http.impl.nio.reactor.BaseIOReactor.writable(BaseIOReactor.java:179)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:344)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:318)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:278)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:542)
at java.lang.Thread.run(Thread.java:679)
Can we handle number of clients in wso2esb for that i need to set any HTTP NOnBlocking Property