Unable to Deploy Files Greater than 2MB via REST API when Secure Admin is Enabled in Oracle GlassFish Server 3.1 (Doc ID 1329115.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle GlassFish Server - Version 3.1 and later
Information in this document applies to any platform.
***Checked for relevance on 22-Feb-2013***

Symptoms

Deploying files greater than 2 MB  in size via the REST API fails when secure admin is enabled (ie. enable-secure-admin) in Oracle GlassFish Server 3.1.

Using a REST client to deploy a large Web Application, the error response returned might look like the following:

{"message":"POST on \"https:\/\/localhost:4848\/management\/domain\/applications\/application\/webapps-simple-big7755612715784657121.war\" is forbidden.","exit_code":"FAILURE"}


with an error in the server.log that looks like this:

[#|2011-06-15T17:57:29.950+0800|SEVERE|oracle-glassfish3.1|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=20;_ThreadName=Thread-1;|GRIZZLY0040: Request header is too large.
java.nio.BufferOverflowException
at com.sun.grizzly.tcp.http11.InternalInputBuffer.fill(InternalInputBuffer.java:765)
at com.sun.grizzly.tcp.http11.InternalInputBuffer.parseHeader(InternalInputBuffer.java:669)
at com.sun.grizzly.tcp.http11.InternalInputBuffer.parseHeaders(InternalInputBuffer.java:555)
at com.sun.grizzly.http.ProcessorTask.parseRequest(ProcessorTask.java:875)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:692)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:619)
|#]

Changes

This issue happens when "secure admin" is enabled. For example, the following command enables secure admin:

$ asadmin enable-secure-admin
Command enable-secure-admin executed successfully.


The following exception is thrown in the server.log file of Oracle GlassFish Server 3.1 under certain conditions. For example. deployment of files greater 2MB and secure admin is enabled.

[#|2011-06-10T11:20:26.769+0200|SEVERE|oracle-glassfish3.1|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=18;_ThreadName=Th
read-1;|GRIZZLY0040: Request header is too large.
java.nio.BufferOverflowException
        at com.sun.grizzly.tcp.http11.InternalInputBuffer.fill(InternalInputBuffer.java:765)
        at com.sun.grizzly.tcp.http11.InternalInputBuffer.parseHeader(InternalInputBuffer.java:669)
        at com.sun.grizzly.tcp.http11.InternalInputBuffer.parseHeaders(InternalInputBuffer.java:555)
        at com.sun.grizzly.http.ProcessorTask.parseRequest(ProcessorTask.java:875)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:692)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
        at java.lang.Thread.run(Thread.java:662)
|#]



Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms