HTTPS requests with internal proxy are hanging

584 views
Skip to first unread message

Ioannis Mavroukakis

unread,
Dec 6, 2013, 12:10:03 PM12/6/13
to gat...@googlegroups.com
Hello all. I'm having real trouble getting Gattling to record an HTTPS session. I have a company proxy listening for HTTP/S on the same port (80) and I've set it up on the Gatling config. 
When I hit the page, I get the SSL warning, accept the certificate and then..nothing. The browser hangs and the Gatling console has this error (host redacted):

17:07:28.480 [WARN ] i.g.r.h.h.BrowserHttpsRequestHandler - Trying to connect to
 https://[xxxxx].com:443, make sure you've accepted the
 recorder certificate for this site
17:07:28.568 [WARN ] i.g.r.h.h.BrowserHttpsRequestHandler - Trying to connect to
 https://[xxx].com:443, make sure you've accepted the
 recorder certificate for this site
Dec 06, 2013 5:07:28 PM org.jboss.netty.channel.SimpleChannelHandler
WARNING: EXCEPTION, please implement io.gatling.recorder.http.handler.ServerHttp
ResponseHandler.exceptionCaught() for proper handling.
java.io.IOException: An established connection was aborted by the software in yo
ur host machine
        at sun.nio.ch.SocketDispatcher.read0(Native Method)
        at sun.nio.ch.SocketDispatcher.read(Unknown Source)
        at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
        at sun.nio.ch.IOUtil.read(Unknown Source)
        at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
        at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(Abstract
NioWorker.java:109)
        at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNi
oSelector.java:312)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioW
orker.java:90)
        at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Dec 06, 2013 5:07:28 PM org.jboss.netty.channel.SimpleChannelHandler
WARNING: EXCEPTION, please implement io.gatling.recorder.http.handler.ServerHttp
ResponseHandler.exceptionCaught() for proper handling.
java.nio.channels.ClosedChannelException
        at org.jboss.netty.handler.ssl.SslHandler$6.run(SslHandler.java:1580)
        at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunn
ableWrapper.java:40)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.executeInIoThrea
d(AbstractNioWorker.java:71)
        at org.jboss.netty.channel.socket.nio.NioWorker.executeInIoThread(NioWor
ker.java:36)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.executeInIoThrea
d(AbstractNioWorker.java:57)
        at org.jboss.netty.channel.socket.nio.NioWorker.executeInIoThread(NioWor
ker.java:36)
        at org.jboss.netty.channel.socket.nio.AbstractNioChannelSink.execute(Abs
tractNioChannelSink.java:34)
        at org.jboss.netty.handler.ssl.SslHandler.channelClosed(SslHandler.java:
1566)
        at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468)

        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.close(AbstractNi
oWorker.java:376)
        at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:93)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(Abstract
NioWorker.java:109)
        at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNi
oSelector.java:312)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioW
orker.java:90)
        at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Is there anything obvious I'm missing ?

Thanks!

Stéphane Landelle

unread,
Dec 6, 2013, 12:24:28 PM12/6/13
to gat...@googlegroups.com
Which version do you use?


2013/12/6 Ioannis Mavroukakis <imavro...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ioannis Mavroukakis

unread,
Dec 6, 2013, 12:25:27 PM12/6/13
to gat...@googlegroups.com
Hi Stephane, 2.0m3 but I've also had the same issues with 1.5.x 

Stéphane Landelle

unread,
Dec 6, 2013, 12:29:11 PM12/6/13
to gat...@googlegroups.com
As a workaround, could you try the HAR support in 2M3? https://github.com/excilys/gatling/wiki/Gatling%202#wiki-recorder


2013/12/6 Ioannis Mavroukakis <imavro...@gmail.com>

Ioannis Mavroukakis

unread,
Dec 6, 2013, 1:06:51 PM12/6/13
to gat...@googlegroups.com
I tried but it was unable to convert the  HAR file. The other issue is that there are login redirections involved before I hit the actual site so the HAR file won't have the complete picture (guessing here, not sure). 

Thanks!
You received this message because you are subscribed to a topic in the Google Groups "Gatling User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gatling/N4jE0_FKkzw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gatling+u...@googlegroups.com.

Nicolas Rémond

unread,
Dec 6, 2013, 6:50:44 PM12/6/13
to gat...@googlegroups.com
What happened with the HAR conversion? 
Did you get an exception? 

cheers
Nicolas

Stéphane Landelle

unread,
Dec 7, 2013, 5:33:15 AM12/7/13
to gat...@googlegroups.com
IIRC, there was an issue with HAR that's been fixed in master. Have you tried the snapshot?


2013/12/6 Ioannis Mavroukakis <imavro...@gmail.com>

Ioannis Mavroukakis

unread,
Dec 7, 2013, 9:23:55 AM12/7/13
to gat...@googlegroups.com
No I'll give it ago, thanks

Stéphane Landelle

unread,
Dec 10, 2013, 12:29:13 PM12/10/13
to gat...@googlegroups.com
Hi Ioannis,

I've managed to fix this on master: https://github.com/excilys/gatling/issues/1545

I'm crossing fingers it will work with your proxy (I only tested locally with Charles, both with http and https)

Please wait ~20 min and you'll get a snapshot on Sonatype.

Thanks for reporting,

Stéphane


2013/12/7 Ioannis Mavroukakis <imavro...@gmail.com>

Ioannis Mavroukakis

unread,
Dec 10, 2013, 1:24:39 PM12/10/13
to gat...@googlegroups.com
That's awesome Stephane, thanks for your hard work :) I will be giving it a test spin later.

Stéphane Landelle

unread,
Dec 11, 2013, 3:36:25 AM12/11/13
to gat...@googlegroups.com
Well, first give it a try, then tell me if it's awesome or crap... ;)


2013/12/10 Ioannis Mavroukakis <imavro...@gmail.com>

Ioannis Mavroukakis

unread,
Dec 11, 2013, 6:28:47 AM12/11/13
to gat...@googlegroups.com
Will do now :) 
When you say it's available on Sonatype, you mean search.maven.org ?

Stéphane Landelle

unread,
Dec 11, 2013, 6:39:24 AM12/11/13
to gat...@googlegroups.com
No, there's no snapshot on maven central.
Sonatype provides snapshots hosting and releases staging.


2013/12/11 Ioannis Mavroukakis <imavro...@gmail.com>

Ioannis Mavroukakis

unread,
Dec 11, 2013, 7:21:33 AM12/11/13
to gat...@googlegroups.com
Merci :)

Stéphane Landelle

unread,
Dec 11, 2013, 7:42:39 AM12/11/13
to gat...@googlegroups.com
De rien :)


2013/12/11 Ioannis Mavroukakis <imavro...@gmail.com>

Ioannis Mavroukakis

unread,
Dec 11, 2013, 9:09:52 AM12/11/13
to gat...@googlegroups.com
Semi success. I can now visit a secure page over the proxy, but when I submit a form on the page I get this in the Gatling logs

WARNING: EXCEPTION, please implement io.gatling.recorder.http.handler.ServerHttpResponseHandler.exceptionCaught() for proper handling.
java.nio.channels.ClosedChannelException
at org.jboss.netty.handler.ssl.SslHandler$7.run(SslHandler.java:1605)
at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunnableWrapper.java:40)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.executeInIoThread(AbstractNioWorker.java:70)
at org.jboss.netty.channel.socket.nio.NioWorker.executeInIoThread(NioWorker.java:36)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.executeInIoThread(AbstractNioWorker.java:56)
at org.jboss.netty.channel.socket.nio.NioWorker.executeInIoThread(NioWorker.java:36)
at org.jboss.netty.channel.socket.nio.AbstractNioChannelSink.execute(AbstractNioChannelSink.java:34)
at org.jboss.netty.handler.ssl.SslHandler.channelClosed(SslHandler.java:1591)
at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.close(AbstractNioWorker.java:375)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:93)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)
Dec 11, 2013 2:06:06 PM org.jboss.netty.channel.SimpleChannelHandler

Stéphane Landelle

unread,
Dec 11, 2013, 2:47:40 PM12/11/13
to gat...@googlegroups.com
Damn, seems the server or the proxy is closing the connection for whatever reason.
Will try to reproduce, but that will have to wait a bit, sorry...


2013/12/11 Ioannis Mavroukakis <imavro...@gmail.com>
Reply all
Reply to author
Forward
0 new messages