# Connection refused logging

**URL:** <https://community.gatling.io/t/connection-refused-logging/6244>\
**Category:** Gatling (Open-Source)\
**Created:** [September 9, 2021, 9:55am UTC](https://community.gatling.io/t/connection-refused-logging/6244 "2021-09-09T09:55:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arditi\_One](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@Arditi\_One](https://community.gatling.io/u/Arditi_One)\
**Post date:** [September 9, 2021, 9:55am UTC](https://community.gatling.io/t/connection-refused-logging/6244/1 "2021-09-09T09:55:00Z")

</div>

Hi.

I’m currently executing some gatling simulations against an application and I’m getting a number of Connection refused errors but can’t see any other information.

Is there a way to better log the full response of such errors?

---

<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:** [September 9, 2021, 10:06am UTC](https://community.gatling.io/t/connection-refused-logging/6244/2 "2021-09-09T10:06:21Z")

</div>

Well, no, that’s exactly that: it’s a TCP error where the endpoint you’re hitting can’t deal with that many connections and refuses to open new ones.

---

<div class="post-metadata">

**Author:** ![Mohan](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@Mohan](https://community.gatling.io/u/Mohan)\
**Post date:** [September 9, 2021, 10:09am UTC](https://community.gatling.io/t/connection-refused-logging/6244/3 "2021-09-09T10:09:50Z")

</div>

1. is your application reachable from the machine where the tests are running on?
2. did you try with one request in the simulation and successful?
3. was all requests failing or starts failing after few successful requests? If it’s the latter, you might have to look into load profile of the simulation. It might be generating too many requests and can’t establish connections from just one machine

Best /Mohan

---

<div class="post-metadata">

**Author:** ![Daniil\_Z](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@Daniil\_Z](https://community.gatling.io/u/Daniil_Z)\
**Post date:** [September 9, 2021, 2:37pm UTC](https://community.gatling.io/t/connection-refused-logging/6244/4 "2021-09-09T14:37:38Z")

</div>

Have you tried adding logback.xml configuration on the classpath and enabling debug root level? If not, here is the configuration you could use:

true %d{HH:mm:ss.SSS} [%-5level] %logger{15} - %msg%n%rEx

---

<div class="post-metadata">

**Author:** ![Daniil\_Z](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@Daniil\_Z](https://community.gatling.io/u/Daniil_Z)\
**Post date:** [September 10, 2021, 2:35am UTC](https://community.gatling.io/t/connection-refused-logging/6244/5 "2021-09-10T02:35:39Z")

</div>

I forgot to change it in the above, but root level shall be debug i.e.:
