Search code examples
dockerwso2-micro-integrator

WSO2 MI Infinite loop on invalid request line


I run a very simple micro integrator service that only has 1 proxy service and a single sequence. In this sequence the incoming XML message is transferred to amazon SQS service. If I run this in the Integration Studio on the instance that comes built in I have no problems. However, when I package the file into a CAR and feed it to the docker instance it will boot up and instantly gets bombarded with requests? That is to say, the following logs take over and the container can no longer be manually stopped:

[2020-04-15 12:45:44,585] INFO {org.apache.synapse.transport.passthru.SourceHandler} - Writer null when calling informWriterError ^[[?62;c^[[?62;c[2020-04-15 12:45:46,589] ERROR {org.apache.synapse.transport.passthru.SourceHandler} - HttpException occurred org.apache.http.ProtocolException: Invalid request line: ÇÃ^ú§ß¡ðO©%åË*29xÙVÀ$À(=À&À*kjÀ at org.apache.http.impl.nio.codecs.AbstractMessageParser.parse(AbstractMessageParser.java:208) at org.apache.synapse.transport.http.conn.LoggingNHttpServerConnection$LoggingNHttpMessageParser.parse(LoggingNHttpServerConnection.java:407) at org.apache.synapse.transport.http.conn.LoggingNHttpServerConnection$LoggingNHttpMessageParser.parse(LoggingNHttpServerConnection.java:381) at org.apache.http.impl.nio.DefaultNHttpServerConnection.consumeInput(DefaultNHttpServerConnection.java:265) at org.apache.synapse.transport.http.conn.LoggingNHttpServerConnection.consumeInput(LoggingNHttpServerConnection.java:114) at org.apache.synapse.transport.passthru.ServerIODispatch.onInputReady(ServerIODispatch.java:82) at org.apache.synapse.transport.passthru.ServerIODispatch.onInputReady(ServerIODispatch.java:39) at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:113) at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:159) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:338) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:316) at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:277) at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:105) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:586) at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.http.ParseException: Invalid request line: ÇÃ^þvHÅFmÉ (@ë¸'º¯æ¦V

I made sure there were no outside connections possible and I also found the older threads of someone describing this problem, but their solution (changing something in the keystore) did not work.

Also, I made sure to include the SQS certificate in the container as well.

I have no connections setup to connect to the container so that will be out of the equation as well.

What am I missing here?


Solution

  • I have no idea why, but I have identified the culprit to be none other than Portainer. When I shutdown Portainer the stream of requests stops.

    According to Wireshark, the requests are all made towards

    GET http://172.17.0.1:9000/api/endpoints/< containerID >/docker/< someId >/logs

    It seems that because the WSO2 container I'm trying to run is an ESB that uses endpoints and returns 400 status codes on non-existing endpoints portainer will retry until it succeeds. This is just my observation, so I could be wrong.

    I have confirmed my findings by uploading my container to AWS where the problem did not exist.