Details
Description
OutOfMemoryError is thrown by Nimbus' SimpleTransportPlugin if malformed Thrift request is posted:
echo "Hello" | nc localhost 6627
In nimbus.log:
2016-10-20 12:54:09.978 b.s.d.nimbus [INFO] Starting Nimbus server... 2016-10-20 12:54:42.926 o.a.t.s.THsHaServer [ERROR] run() exiting due to uncaught error java.lang.OutOfMemoryError: Java heap space at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57) ~[?:1.8.0_92-internal] at java.nio.ByteBuffer.allocate(ByteBuffer.java:335) ~[?:1.8.0_92-internal] at org.apache.thrift7.server.AbstractNonblockingServer$FrameBuffer.read(AbstractNonblockingServer.java:371) ~[storm-core-0.10.3-SNAPSHOT.jar:0.10.3-SNAPSHOT] at org.apache.thrift7.server.AbstractNonblockingServer$AbstractSelectThread.handleRead(AbstractNonblockingServer.java:203) ~[storm-core-0.10.3-SNAPSHOT.jar:0.10.3-SNAPSHOT] at org.apache.thrift7.server.TNonblockingServer$SelectAcceptThread.select(TNonblockingServer.java:207) ~[storm-core-0.10.3-SNAPSHOT.jar:0.10.3-SNAPSHOT] at org.apache.thrift7.server.TNonblockingServer$SelectAcceptThread.run(TNonblockingServer.java:158) [storm-core-0.10.3-SNAPSHOT.jar:0.10.3-SNAPSHOT] 2016-10-20 12:54:42.942 b.s.d.nimbus [INFO] Shutting down master 2016-10-20 12:54:43.003 b.s.d.nimbus [INFO] Shut down master
The problem is caused by the lack of specification of the maxReadBufferBytes of THsHaServer's arguments.