# Tcp connect error 111 Connection refused

**URL:** <https://forum.dfinity.org/t/tcp-connect-error-111-connection-refused/12317>\
**Category:** Developers\
**Tags:** Functional-Programming\
**Created:** [April 21, 2022, 6:19am UTC](https://forum.dfinity.org/t/tcp-connect-error-111-connection-refused/12317 "2022-04-21T06:19:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![avi](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/avi/32/1904_2.png) [@avi](https://forum.dfinity.org/u/avi)\
**Post date:** [April 21, 2022, 6:19am UTC](https://forum.dfinity.org/t/tcp-connect-error-111-connection-refused/12317/1 "2022-04-21T06:19:35Z")

</div>

```auto
 Apr 21 06:17:03.952 WARN Internal Error during request:
hyper::Error(
    Connect,
    ConnectError(
        "tcp connect error",
        Os {
            code: 111,
            kind: ConnectionRefused,
            message: "Connection refused",
        },
    ),
)
 Apr 21 06:17:03.956 WARN Internal Error during request:
hyper::Error(
    Connect,
    ConnectError(
        "tcp connect error",
        Os {
            code: 111,
            kind: ConnectionRefused,
            message: "Connection refused",
        },
    ),
)
 Apr 21 06:17:05.496 WARN Internal Error during request:
hyper::Error(
    Connect,
    ConnectError(
        "tcp connect error",
        Os {
            code: 111,
            kind: ConnectionRefused,
            message: "Connection refused",
        },
    ),
)
 Apr 21 06:17:05.500 WARN Internal Error during request:
hyper::Error(
    Connect,
    ConnectError(
        "tcp connect error",
        Os {
            code: 111,
            kind: ConnectionRefused,
            message: "Connection refused",
        },
    ),
)
Apr 21 06:17:05.536 WARN s:4fgim-mlzas-7pefb-2r4qc-ef4eg-jd64r-4wcu5-fawlz-6z7oe-iguhk-aae/n:ddei3-mqvg5-gryjd-buvv5-3cwbl-rid3y-2l5hb-u2wxs-52ynn-lvobo-qqe/ic_p2p/advert_utils AdvertRequestBuilder::new(): advert_config = Some(GossipAdvertConfig { best_effort_percentage: 20 })
Stopping icx-proxy...
Stopped.
version: 0.8.1
 Apr 21 06:17:05.570 INFO Log Level: INFO
 Apr 21 06:17:05.571 INFO Starting server. Listening on http://0.0.0.0:8000/
Apr 21 06:17:05.749 WARN s:4fgim-mlzas-7pefb-2r4qc-ef4eg-jd64r-4wcu5-fawlz-6z7oe-iguhk-aae/n:ddei3-mqvg5-gryjd-buvv5-3cwbl-rid3y-2l5hb-u2wxs-52ynn-lvobo-qqe/ic_consensus/batch_delivery Batch delivery failed: QueueIsFull
Apr 21 06:17:10.824 WARN s:4fgim-mlzas-7pefb-2r4qc-ef4eg-jd64r-4wcu5-fawlz-6z7oe-iguhk-aae/n:ddei3-mqvg5-gryjd-buvv5-3cwbl-rid3y-2l5hb-u2wxs-52ynn-lvobo-qqe/ic_consensus/batch_delivery Batch delivery failed: QueueIsFull
Apr 21 06:17:15.889 WARN s:4fgim-mlzas-7pefb-2r4qc-ef4eg-jd64r-4wcu5-fawlz-6z7oe-iguhk-aae/n:ddei3-mqvg5-gryjd-buvv5-3cwbl-rid3y-2l5hb-u2wxs-52ynn-lvobo-qqe/ic_consensus/batch_delivery Batch delivery failed: QueueIsFull
Apr 21 06:17:20.985 WARN s:4fgim-mlzas-7pefb-2r4qc-ef4eg-jd64r-4wcu5-fawlz-6z7oe-iguhk-aae/n:ddei3-mqvg5-gryjd-buvv5-3cwbl-rid3y-2l5hb-u2wxs-52ynn-lvobo-qqe/ic_consensus/batch_delivery Batch delivery failed: QueueIsFull
Apr 21 06:17:25.898 WARN s:4fgim-mlzas-7pefb-2r4qc-ef4eg-jd64r-4wcu5-fawlz-6z7oe-iguhk-aae/n:ddei3-mqvg5-gryjd-buvv5-3cwbl-rid3y-2l5hb-u2wxs-52ynn-lvobo-qqe/ic_consensus/block_maker Cannot propose block as the locally available validation context is smaller than the parent validation context (locally available=ValidationContext { registry_version: 1, certified_height: 544890, time: Time(1650521845898112112) }, parent context=ValidationContext { registry_version: 1, certified_height: 544899, time: Time(1650521810265742705) })

```

I’m in development and started `dfx start`  
After a potentially long run, a large number of local development containers are running  
dfx service will report an error

```auto
hyper::Error(
     Connect,
     ConnectError(
         "tcp connect error",
         Os {
             code: 111,
             kind: ConnectionRefused,
             message: "Connection refused",
         },
     ),
)

```

Is there any way to deal with these errors without cleaning the container data?

---

<div class="post-metadata">

**Author:** ![cymqqqq](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cymqqqq/32/14515_2.png) [@cymqqqq](https://forum.dfinity.org/u/cymqqqq)\
**Post date:** [May 5, 2022, 7:11am UTC](https://forum.dfinity.org/t/tcp-connect-error-111-connection-refused/12317/2 "2022-05-05T07:11:41Z")

</div>

Hi,I meet the same error a few days ago.  
Then I reinstall cargo and dfx in “sudo su” mode.  
When everything is installed. I run “source $HOME/.cargo/env”, and then run “dfx start”.  
Finally, it works.  
But I don’t know whether it works for you.

---

<div class="post-metadata">

**Author:** ![LeeZSir](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/leezsir/32/5117_2.png) [@LeeZSir](https://forum.dfinity.org/u/LeeZSir)\
**Post date:** [May 10, 2022, 10:12am UTC](https://forum.dfinity.org/t/tcp-connect-error-111-connection-refused/12317/3 "2022-05-10T10:12:48Z")

</div>

dfx start --background --emulator
