[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[jetty-users] Jetty 9.2.13 DefaultServlet static file download error ; HP Nonstop (Tandem) Operating system
|
Hi,
We are using jetty in HP nonstop operating system for many applications. Recently found one issue, DefaultServlet fails serving static contents from jetty9 which size more
than 54KB.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Awesome Font Test</title>
<link rel="stylesheet" href="" <
<link rel="stylesheet" href=""> <link rel="stylesheet" href=""> </head>
<body>
<h1>Awesome Font Test</h1>
<ul class="fa-ul">
<li><i class="fa-li fa fa-check-square"></i>List icons</li>
<li><i class="fa-li fa fa-spinner fa-spin"></i>as bullets</li>
<li><i class="fa-li fa fa-square"></i>in lists</li>
<li><i class="fa-li fa fa-refresh" title="Refresh" >Refresh</i>
</ul>
</body>
</html>
For the above simple html page, a static file like JS or CSS file which size is morethan 54KB fails while downloading and jetty logs the following error.
015-12-14 07:07:02,228 DEBUG [qtp26845234-13 - /fonttest/font-awesome-4.5.0/css/font-awesome2.min.css] o.eclipse.jetty.server.HttpChannel -
org.eclipse.jetty.io.EofException: null
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:192) ~[jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:408) ~[jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:302) ~[jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:129) ~[jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:676) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:246) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:208) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:471) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:763) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:147) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.HttpOutput.sendContent(HttpOutput.java:588) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.HttpOutput.sendContent(HttpOutput.java:674) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.HttpOutput.sendContent(HttpOutput.java:576) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.servlet.DefaultServlet.sendData(DefaultServlet.java:960) ~[jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:534) ~[jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[servlet-api-3.1.jar:3.1.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[servlet-api-3.1.jar:3.1.0]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808) ~[jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) ~[jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) ~[jetty-security-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) ~[jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.Server.handle(Server.java:499) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65]
Caused by: java.io.IOException: Invalid function argument (errno:4022)
at sun.nio.ch.FileDispatcherImpl.writev0(Native Method) ~[na:1.7.0_65]
at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51) ~[na:1.7.0_65]
at sun.nio.ch.IOUtil.write(IOUtil.java:148) ~[na:1.7.0_65]
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:537) ~[na:1.7.0_65]
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:172) ~[jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730]
Default HP Nonstop http output buffer size is 54k. and Jetty.output.buffer.size is set 32768 however static files not being chuked and buffered through
NIO connector where as our own servlets output buffering work with chunks without any error. Default Servlet trying to flush entire file content at once instead of multiple chunks.
I didnt some anaylse commented out writing it throuh GatheringByteChannel and jetty able to serves static js files but still throws the error for woff type web fonts.
org.eclipse.jetty.io.ChannelEndPoint.Java
@Override
public boolean flush(ByteBuffer... buffers) throws IOException
{
int flushed=0;
try
{
if (buffers.length==1)
flushed=_channel.write(buffers[0]);
//else if (buffers.length>1 && _channel instanceof GatheringByteChannel)
// flushed= (int)((GatheringByteChannel)_channel).write(buffers,0,buffers.length); //fails buffering
else
{
for (ByteBuffer b : buffers)
{
if (b.hasRemaining())
{
int l=_channel.write(b);
if (l>0)
flushed+=l;
if (b.hasRemaining())
break;
}
}
}
if (LOG.isDebugEnabled())
LOG.debug("flushed {} {}", flushed, this);
}
catch (IOException e)
{
throw new EofException(e);
}
if (flushed>0)
notIdle();
for (ByteBuffer b : buffers)
if (!BufferUtil.isEmpty(b))
return false;
return true;
}
I've also tried adding adding the following MIME mapping in webdefault.xml but no help.
<mime-mapping>
<extension>woff</extension>
<mime-type>application/font-woff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>woff2</extension>
<mime-type>application/font-woff2</mime-type>
</mime-mapping>
<mime-mapping>
<extension>eot</extension>
<mime-type>application/vnd.ms-fontobject</mime-type>
</mime-mapping>
Can some one look at this issue.
os.name = NONSTOP_KERNEL
java.runtime.version = 1.7.0_65-b19
os.version = L15.08
Attached system.properties for more details.
Attachment:
System.properties
Description: Binary data