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

**URL:** <https://community.gatling.io/t/java-net-connectionexception-connection-timed-out-no-further-information/2165>\
**Category:** Gatling (Open-Source)\
**Created:** [March 31, 2015, 9:35am UTC](https://community.gatling.io/t/java-net-connectionexception-connection-timed-out-no-further-information/2165 "2015-03-31T09:35:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kenny](https://avatars.discourse-cdn.com/v4/letter/k/90db22/32.png) [@Kenny](https://community.gatling.io/u/Kenny)\
**Post date:** [March 31, 2015, 9:35am UTC](https://community.gatling.io/t/java-net-connectionexception-connection-timed-out-no-further-information/2165/1 "2015-03-31T09:35:50Z")

</div>

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](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  
}

---

<div class="post-metadata">

**Author:** ![empty\_account](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@empty\_account](https://community.gatling.io/u/empty_account)\
**Post date:** [March 31, 2015, 9:46am UTC](https://community.gatling.io/t/java-net-connectionexception-connection-timed-out-no-further-information/2165/2 "2015-03-31T09:46:27Z")

</div>

Could this be a proxy issue?

---

<div class="post-metadata">

**Author:** ![Kenny](https://avatars.discourse-cdn.com/v4/letter/k/90db22/32.png) [@Kenny](https://community.gatling.io/u/Kenny)\
**Post date:** [April 1, 2015, 2:21am UTC](https://community.gatling.io/t/java-net-connectionexception-connection-timed-out-no-further-information/2165/3 "2015-04-01T02:21:12Z")

</div>

It might be proxy issue configured i preassume which is something i cannot change due to organization setup, still looking into it.

---

<div class="post-metadata">

**Author:** ![empty\_account](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@empty\_account](https://community.gatling.io/u/empty_account)\
**Post date:** [April 1, 2015, 6:14am UTC](https://community.gatling.io/t/java-net-connectionexception-connection-timed-out-no-further-information/2165/4 "2015-04-01T06:14:56Z")

</div>

Have you tried setting the proxy in your requests?  
[http://gatling.io/docs/2.1.4/http/http\_request.html?highlight=proxy#outgoing-proxy](http://gatling.io/docs/2.1.4/http/http_request.html?highlight=proxy#outgoing-proxy)

---

<div class="post-metadata">

**Author:** ![Kenny](https://avatars.discourse-cdn.com/v4/letter/k/90db22/32.png) [@Kenny](https://community.gatling.io/u/Kenny)\
**Post date:** [April 2, 2015, 2:32am UTC](https://community.gatling.io/t/java-net-connectionexception-connection-timed-out-no-further-information/2165/5 "2015-04-02T02:32:09Z")

</div>

Thanks for the feedback.

You are right. It is the proxy problem.

---

<div class="post-metadata">

**Author:** ![empty\_account](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@empty\_account](https://community.gatling.io/u/empty_account)\
**Post date:** [April 2, 2015, 9:33am UTC](https://community.gatling.io/t/java-net-connectionexception-connection-timed-out-no-further-information/2165/6 "2015-04-02T09:33:46Z")

</div>

Hi Stéphane,

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

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [April 2, 2015, 9:51am UTC](https://community.gatling.io/t/java-net-connectionexception-connection-timed-out-no-further-information/2165/7 "2015-04-02T09:51:07Z")

</div>

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.
