Gatling v3.0.2 Issue - Redirect failing

Hi

When I am trying to run my gatling script locally in my laptop then it’s working fine but when trying to run the same script under our pipeline using Gradle through Jenkins then it’s throwing following error and unable to understand what’s wrong here.

I tried playing with gatling.conf but no success yet

Please suggest what’s wrong here

Hoping to receive some reply from expert soon

:13 TC02_AAAAAAAAAAAA_SubmitLogin: OK
16:53:13 =========================
16:53:13 Session:
16:53:13 Session(SCN_AAAAAAAAAAAA_SSCSJourney,1,1549039966402,Map(gatling.http.cache.baseUrl → https://XXXXXXXXXXXXX, gatling.http.cache.dns → io.gatling.http.cache.DnsCacheSupport$$anon$1@71567b1c, state → , gatling.http.cache.contentCache → io.gatling.core.util.cache.Cache@1c133356, scope → , SSCSUsrPwd → Password12, csrftoken → 2nOrt8BC-VxSl2tBNxUCLD5GqeSY-NePOPlU, redirect_uri → https://XXXXXXXXXXXXX/oauth2/callback, client_id → AAAAAAAAAAAAwebapp, gatling.http.ssl.sslContexts → SslContexts(io.gatling.http.util.SslContextsFactory$$anon$1@3028897d,None), upliftToken → , SSCSUserName → AAAAAAAAAAAAloadtest1@gmail.com, gatling.http.cookies → CookieJar(Map(CookieKey(_csrf,YYYYYYYYYYYYYYYYYYYYYYY,/) → StoredCookie(_csrf=YanYwfBA4tJ7rJqcwCkC0W7O, path=/, secure, HTTPOnly,true,false,1549039966742))), continue → https://XXXXXXXXXXXXX/oauth2/callback, response_type → code),17,OK,List(),io.gatling.core.protocol.ProtocolComponentsRegistry$$Lambda$481/659937029@22659b70)
16:53:13 =========================
16:53:13 HTTP request:
16:53:13 POST https://YYYYYYYYYYYYYYYYYYYYYYY/login?response_type=code&client_id=AAAAAAAAAAAAwebapp&redirect_uri=https://XXXXXXXXXXXXX/oauth2/callback
16:53:13 headers=
16:53:13 accept: /
16:53:13 Referer: https://YYYYYYYYYYYYYYYYYYYYYYY/login?response_type=code&client_id=AAAAAAAAAAAAwebapp&redirect_uri=https://XXXXXXXXXXXXX/oauth2/callback
16:53:13 origin: https://XXXXXXXXXXXXX
16:53:13 host: XXXXXXXXXXXXX
16:53:13 cookies=
16:53:13 _csrf=YanYwfBA4tJ7rJqcwCkC0W7O, path=/, secure, HTTPOnly
16:53:13 formBody=
16:53:13 username: AAAAAAAAAAAAloadtest1@gmail.com
16:53:13 password: CCCC
16:53:13 continue: https://XXXXXXXXXXXXX/oauth2/callback
16:53:13 upliftToken:
16:53:13 response_type: code
16:53:13 _csrf: 2nOrt8BC-VxSl2tBNxUCLD5GqeSY-NePOPlU
16:53:13 redirect_uri: https://XXXXXXXXXXXXX/oauth2/callback
16:53:13 client_id: AAAAAAAAAAAAwebapp
16:53:13 scope:
16:53:13 state:
16:53:13 proxy=HttpProxyServer{realm=null, securedPort=8080, securedAddress=proxy.ZZZZZZZZZZZZZZZZZZ/172.16.0.7:8080, host=‘proxy.ZZZZZZZZZZZZZZZZZZ’, port=8080}
16:53:13 =========================
16:53:13 HTTP response:
16:53:13 status=
16:53:13 302 Found
16:53:13 headers=
16:53:13 X-DNS-Prefetch-Control: off
16:53:13 X-Frame-Options: SAMEORIGIN
16:53:13 Strict-Transport-Security: max-age=15552000; includeSubDomains
16:53:13 X-Download-Options: noopen
16:53:13 X-Content-Type-Options: nosniff
16:53:13 X-XSS-Protection: 1; mode=block
16:53:13 Surrogate-Control: no-store
16:53:13 Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate
16:53:13 Pragma: no-cache
16:53:13 Expires: 0
16:53:13 Location: https://XXXXXXXXXXXXX/oauth2/callback?code=dS5RwEtewrH6wWPQ
16:53:13 Vary: Accept
16:53:13 Content-Type: text/plain; charset=utf-8
16:53:13 Content-Length: 116
16:53:13 Date: Fri, 01 Feb 2019 16:53:13 GMT
16:53:13 Connection: keep-alive
16:53:13
16:53:13 body=
16:53:13 Found. Redirecting to https://XXXXXXXXXXXXX/oauth2/callback?code=dS5RwEtewrH6wWPQ
<<<<<<<<<<<<<<<<<<<<<<<<<
16:53:13 16:53:13.904 [WARN ] i.g.h.e.GatlingHttpListener - Request ‘TC02_AAAAAAAAAAAA_SubmitLogin’ failed for user 1
16:53:13 sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
16:53:13 at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
16:53:13 at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
16:53:13 at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
16:53:13 at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
16:53:13 … 43 common frames omitted
16:53:13 Wrapped by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
16:53:13 at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)
16:53:13 at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
16:53:13 at sun.security.validator.Validator.validate(Validator.java:262)
16:53:13 at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
16:53:13 at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:281)
16:53:13 at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:136)
16:53:13 at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1626)
16:53:13 … 37 common frames omitted
16:53:13 Wrapped by: javax.net.ssl.SSLHandshakeException: General SSLEngine problem
16:53:13 at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
16:53:13 at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1709)
16:53:13 at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:318)
16:53:13 at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)
16:53:13 at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)
16:53:13 at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)
16:53:13 at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)
16:53:13 at sun.security.ssl.Handshaker$1.run(Handshaker.java:970)
16:53:13 at sun.security.ssl.Handshaker$1.run(Handshaker.java:967)
16:53:13 at java.security.AccessController.doPrivileged(Native Method)
16:53:13 at sun.security.ssl.Handshaker$DelegatedTask.run(Handshaker.java:1459)
16:53:13 at io.netty.handler.ssl.SslHandler.runDelegatedTasks(SslHandler.java:1464)
16:53:13 at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1369)
16:53:13 … 29 common frames omitted
16:53:13 Wrapped by: javax.net.ssl.SSLHandshakeException: General SSLEngine problem
16:53:13 at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1521)
16:53:13 at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:528)
16:53:13 at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:802)
16:53:13 at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:766)
16:53:13 at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
16:53:13 at io.netty.handler.ssl.SslHandler$SslEngineType$3.unwrap(SslHandler.java:295)
16:53:13 at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1301)
16:53:13 at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1203)
16:53:13 at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1247)
16:53:13 at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:502)
16:53:13 at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:441)
16:53:13 at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278)
16:53:13 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
16:53:13 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
16:53:13 at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
16:53:13 at io.netty.handler.proxy.ProxyHandler.channelRead(ProxyHandler.java:255)
16:53:13 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
16:53:13 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
16:53:13 at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
16:53:13 at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
16:53:13 at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:255)
16:53:13 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
16:53:13 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
16:53:13 at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
16:53:13 at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
16:53:13 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
16:53:13 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
16:53:13 at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
16:53:13 at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
16:53:13 at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:656)
16:53:13 at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:591)
16:53:13 at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:508)
16:53:13 at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:470)
16:53:13 at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
16:53:13 at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
16:53:13 at java.lang.Thread.run(Thread.java:748)
16:53:13 16:53:13.911 [WARN ] i.g.h.e.r.DefaultStatsProcessor - Request ‘TC02_AAAAAAAAAAAA_SubmitLogin Redirect 1’ failed for user 1: j.n.s.SSLHandshakeException: General SSLEngine problem

Hello Gatling expert

Any idea how to accept self sign certificate in latest version of gatling 3.0.2 ?

I tried playing with following in gatling.conf but no success yet

enableSni = true                                    # When set to true, enable Server Name indication (SNI)
enableHostnameVerification = false                  # When set to true, enable hostname verification: SSLEngine.setHttpsEndpointIdentificationAlgorithm("HTTPS")
useInsecureTrustManager = true   
useOpenSsl = false    

Please suggest if some has seen this kind of error in gatling version 3.0.2 ?

Looking forward for some reply on this issue