java.net.ConnectionException: Connection timed out: no further information

163 views
Skip to first unread message

Ng Zhi Kai

unread,
Mar 31, 2015, 5:35:50 AM3/31/15
to gat...@googlegroups.com
Hi All,

I was trying to run gatling test on RESTFUL API (trying to run the BasicSimulation example) under my maven project.

Unfortunately, I keep getting Connection timed out
1) no matter whichever URL I tried.
2) even when i added the .disableWarmup

However, it works when I try to "gatling" localhost RESTFUL URL.

I would like to seek some advices to see what am I missing?

gatling-maven-plugin version: 2.0.0

Example Code
package restful // 1

import io.gatling.core.Predef._ // 2
import io.gatling.http.Predef._
import scala.concurrent.duration._

class Test extends Simulation { // 3

  val httpConf = http // 4
    .baseURL("http://www.google.com") // 5
    .acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8") // 6
    .doNotTrackHeader("1")
    .acceptLanguageHeader("en-US,en;q=0.5")
    .acceptEncodingHeader("gzip, deflate")
    .userAgentHeader("Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0")

  val scn = scenario("BasicSimulation") // 7
    .exec(http("request_1")

    .get("/")) // 9
    .pause(5) // 10

  setUp( // 11
    scn.inject(atOnceUsers(1)) // 12
  ).protocols(httpConf) // 13
}

empty account

unread,
Mar 31, 2015, 5:46:28 AM3/31/15
to gat...@googlegroups.com
Could this be a proxy issue?

--
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/d/optout.

Kenny

unread,
Mar 31, 2015, 10:21:12 PM3/31/15
to gat...@googlegroups.com
It might be proxy issue configured i preassume which is something i cannot change due to organization setup, still looking into it.

empty account

unread,
Apr 1, 2015, 2:14:57 AM4/1/15
to gat...@googlegroups.com

--

Kenny

unread,
Apr 1, 2015, 10:32:09 PM4/1/15
to gat...@googlegroups.com
Thanks for the feedback.

You are right. It is the proxy problem.

empty account

unread,
Apr 2, 2015, 5:33:47 AM4/2/15
to gat...@googlegroups.com
Hi Stéphane,

Do you think it would be a good idea to allow a proxy to be set in the gatling.conf?

Stéphane LANDELLE

unread,
Apr 2, 2015, 5:51:10 AM4/2/15
to gat...@googlegroups.com
Hi Aidy,

We try to avoid having many ways of doing the same thing: complexity, confusion and more code to maintain.
The provided way is the HttpProtocol.

Usually, you only need a proxy when you're in dev mode.


Stéphane Landelle
Lead developer

Reply all
Reply to author
Forward
0 new messages