Skip to content

Uncaught exception org.apache.axis2.engine.AxisError: ServiceContext in OperationContext does not match ERROR observing when API in multi tenant environment #4414

@virajxx

Description

@virajxx

Description

Hi Team,

A customer reported an issue where they encountered the following error when invoking an API in a multi-tenant environment. we observed the same behavior by following these steps:

ERROR {org.apache.axis2.transport.base.threads.NativeWorkerPool} - Uncaught exception org.apache.axis2.engine.AxisError: ServiceContext in OperationContext does not match !
at org.apache.axis2.context.MessageContext.setOperationContext(MessageContext.java:1404)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.processResponse(MultitenantMessageReceiver.java:159)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.receive(MultitenantMessageReceiver.java:92)
at org.apache.synapse.transport.passthru.TargetErrorHandler$1.run(TargetErrorHandler.java:157)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)

Thanks,
Viraj.

Steps to Reproduce

We reproduced the issue in our local setup:

  • Create a tenant and deploy an API.
  • Use this backend to read the client request first, then send a proper HTTP response, and finally force-close the connection with a TCP RST.[1], which forwards the response to the API Gateway and immediately sends a RST packet after the response.
  • Configure this backend endpoint as the API endpoint and invoke the API.

Version

3.2.0

Environment Details (with versions)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions