java.rmi.RemoteException: Premature end of Content-Length delimited message body (expected: 422; received: 0)

Greetings everyone.

We are experiencing some issues with Validator 2.0.1, which i can't quite figure out on my own.
When attempting to start a Workflow through the UserAppConnector, it throws the following error:

Error while executing action method startWorkflow: java.lang.AssertionError: java.rmi.RemoteException: Premature end of Content-Length delimited message body (expected: 422; received: 0); nested exception is: org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 422; received: 0)

Looking at UserApp logs, the workflow seems to run as it should, but Validator 2.0.1 still seems to get dropped before it receives the response it is expecting. I don't see any sign of this in the UserApp catalina.out logs.
It seems like workflows are executing without any trouble when i start them directly through the Dashboard.

I suspect it could be caused by the LoadBalancer in front of UserApp misbehaving, but is there any other possible explanation?

  • 0  

    It seems like it is complaining about the Content-Length header.  I.e. Maybe the header says X bytes, but it is getting Y bytes (Because of the load balancer?) which is making it reject the connection?  Try a direct connection to the UA host not through the LB.

  • 0  

    We are having very similar issue and have not seen any errors till we raised RRSD logs to 99 trace level.

    So basically when we route the IDM engine running RRSD and UA through AccessManager new workflow request failed to be created, but if we route it directly to IA it works fine. We need to route it through AM because we are switching to clustered environment.

    We tried changing certificate on IA to the one AM uses, to see if that would produce the same error when IDM and IA are talking directly, but it did not.

    The only error we see is in RRSD driver on level 99:

    Reason: java.rmi.RemoteException: Premature end of chunk coded message body: closing chunk expected; nested exception is:
    org.apache.http.ConnectionClosedException: Premature end of chunk coded message body: closing chunk expected</status>

    Next thing we will try is to turn off AM's HTML rewriter (we also tried round robin and simple failover - I don't think this should have anything to do with it also at the moment we only have one server, but rather be safe than sorry).

  • Verified Answer

    +1   in reply to   

    Turning OFF HTML Rewriter on Access Manager solves the issue

  • 0 in reply to   

    Our setup had the UserApp placed behind a VMWare AVI Load Balancer.
    Moving it away from this LB solved the problem for us, as debugging and communicating with our neighboring team was a costly task, in terms of time spent.

    The primary reason for moving away from the Load Balancer however, is that the incoming renewal of our setup will leave only one instance of the UserApp, as its role becomes substantially less critical. This removes the need for Load Balancing.

    I will mark your answer as verified, as we saw signs in the traffic logs indicating, that this was a problem with how the LB treated traffic coming from the server, referring to itself.

    It is likely this was a misconfiguration on our part in ism-configuration.properties, but the new setup makes maintenance easier for us, and removes the complex environment that risk causing this kind of issue.