#801 ✓ worksforme
AMT_EB

SSL in Play generates exception errors in application.log

Reported by AMT_EB | May 5th, 2011 @ 08:49 AM | in 1.3

Hi all

Framework version:

1.2.1 (also tried with 1.1.1)

Platform you're using:

Linux Debian 5 Lenny

Reproduction steps:

The exception errors can be reproduced by browsing to an application page and call this several times.
We could reproduce the problem using Internet Explorer 8 on Windows 2008.
It's defenitly easier to force the problem with Internet Explorer than with Firefox (those 2 were tested) and it's also more difficult to get the errors with IE 8 on Windows XP.
The application itself seems to work correctly, only the application.log shows that there are problems behind.

Details:

I've set up an instance of my application and configured SSL in the application.conf:

%prod.https.port=443 %prod.certificate.key.file=conf/local_domain_tld.key %prod.certificate.file=conf/local_domain_tld.crt

This seems to work fine, the page is displayed correctly and the SSL encryption seems to work.

When I now try to connect from a Windows 2008 machine with Internet Explorer I get the following error messages in my application.log about 100 times (after the crash the file is 1000 rows long).
The memory that instance consumes grows constantly until the application does not react anymore and needs to be shut down manually.

--\ 04 May 2011 17:48:52,718 INFO ~ Starting /srv/instance_prod
04 May 2011 17:48:52,727 WARN ~ Declaring modules in application.conf is deprecated. Use dependencies.yml instead (module.secure)
04 May 2011 17:48:52,727 INFO ~ Module secure is available (/srv/play/modules/secure)
04 May 2011 17:48:52,727 WARN ~ Declaring modules in application.conf is deprecated. Use dependencies.yml instead (module.ivy)
04 May 2011 17:48:52,728 INFO ~ Module ivy is available (/srv/play/modules/ivy-1.0.1)
04 May 2011 17:48:53,016 INFO ~ Precompiling ...
04 May 2011 17:49:09,591 INFO ~ Connected to jdbc:mysql://localhost:3306/instance_prod?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8
04 May 2011 17:49:13,463 INFO ~ Application 'instance_prod' is now started !
04 May 2011 17:49:13,802 INFO ~ Migrate Datasource: com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 10, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 5000, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> mypz828f1g6v971obhhnh|7860e590, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> mypz828f1g6v971obhhnh|7860e590, idleConnectionTestPeriod -> 10, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3306/instance_prod?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 30, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=, password=}, propertyCycle -> 0, testConnectionOnCheckin -> true, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
04 May 2011 17:49:14,119 INFO ~ Current schema version: 20110316123456
04 May 2011 17:49:14,123 INFO ~ Schema is up to date. No migration necessary.
04 May 2011 17:49:14,123 INFO ~ 0 migrations applied
04 May 2011 17:49:14,259 INFO ~ Listening for HTTPS on port 443 ...
04 May 2011 17:53:14,369 ERROR ~
java.io.IOException: Connection reset by peer

at sun.nio.ch.FileDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:237)
at sun.nio.ch.IOUtil.read(IOUtil.java:204)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:236)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:321)
at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:280)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

04 May 2011 17:53:14,385 ERROR ~
. . . --//

later on the I get additional messages (probably follow up errors):
--\ 04 May 2011 17:53:23,981 ERROR ~
java.io.IOException: Connection reset by peer

at sun.nio.ch.FileDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:29)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:100)
at sun.nio.ch.IOUtil.write(IOUtil.java:56)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:334)
at org.jboss.netty.channel.socket.nio.SocketSendBufferPool$PooledSendBuffer.transferTo(SocketSendBufferPool.java:239)
at org.jboss.netty.channel.socket.nio.NioWorker.write0(NioWorker.java:469)
at org.jboss.netty.channel.socket.nio.NioWorker.writeFromTaskLoop(NioWorker.java:392)
at org.jboss.netty.channel.socket.nio.NioSocketChannel$WriteTask.run(NioSocketChannel.java:276)
at org.jboss.netty.channel.socket.nio.NioWorker.processWriteTaskQueue(NioWorker.java:268)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:199)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

--//

--\ 04 May 2011 17:53:23,982 ERROR ~
java.nio.channels.ClosedChannelException

at org.jboss.netty.channel.socket.nio.NioWorker.cleanUpWriteBuffer(NioWorker.java:636)
at org.jboss.netty.channel.socket.nio.NioWorker.writeFromUserCode(NioWorker.java:369)
at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleAcceptedSocket(NioServerSocketPipelineSink.java:137)
at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:76)
at org.jboss.netty.handler.ssl.SslHandler.flushPendingEncryptedWrites(SslHandler.java:767)
at org.jboss.netty.handler.ssl.SslHandler.wrap(SslHandler.java:711)
at org.jboss.netty.handler.ssl.SslHandler.handleDownstream(SslHandler.java:446)
at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:68)
at org.jboss.netty.channel.Channels.write(Channels.java:632)
at org.jboss.netty.handler.stream.ChunkedWriteHandler.discard(ChunkedWriteHandler.java:169)
at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChunkedWriteHandler.java:143)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.cleanup(ReplayingDecoder.java:554)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.channelClosed(ReplayingDecoder.java:455)
at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:344)
at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:232)
at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:404)
at org.jboss.netty.channel.socket.nio.NioWorker.close(NioWorker.java:593)
at org.jboss.netty.channel.socket.nio.NioWorker.write0(NioWorker.java:512)
at org.jboss.netty.channel.socket.nio.NioWorker.writeFromTaskLoop(NioWorker.java:392)
at org.jboss.netty.channel.socket.nio.NioSocketChannel$WriteTask.run(NioSocketChannel.java:276)
at org.jboss.netty.channel.socket.nio.NioWorker.processWriteTaskQueue(NioWorker.java:268)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:199)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

--//

Please find the complete application.log and system.out files attached (it's intersting to see how fast these exceptions occured).

If you need further information I have not thought about, please let me know. I'd be happy to help.

Thanks
AMT_EB

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Play framework

Play makes it easier to build Web applications with Java. It is a clean alternative to bloated Enterprise Java stacks. It focuses on developer productivity and targets RESTful architectures. Learn more on the http://www.playframework.org website.

Source code is hosted on github

Check out our repository at http://github.com/playframework/play

Contributing, creating a patch

Please read the contributor guide

Reporting Security Vulnerabilities

Since all bug reports are public, please report any security vulnerability directly to guillaume dot bort at gmail dot com.

Creating a bug report

Bug reports are incredibly helpful, so take time to report bugs and request features in our ticket tracker. We’re always grateful for patches to Play’s code. Indeed, bug reports with attached patches will get fixed far quickly than those without any.

Please include as much relevant information as possible including the exact framework version you're using and a code snippet that reproduces the problem.

Don't have too much expectations. Unless the bug is really a serious "everything is broken" thing, you're creating a ticket to start a discussion. Having a patch (or a branch on Github we can pull from) is better, but then again we'll only pull high quality branches that make sense to be in the core of Play.

Shared Ticket Bins

Attachments

Pages