# Mycroft-cli-client gets stuck on a connection refused error

**URL:** https://community.openconversational.ai/t/mycroft-cli-client-gets-stuck-on-a-connection-refused-error/5704
**Category:** This category is being retired - Support
**Created:** [January 20, 2019, 8:04am UTC](https://community.openconversational.ai/t/mycroft-cli-client-gets-stuck-on-a-connection-refused-error/5704 "2019-01-20T08:04:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![marko](https://community.openconversational.ai/letter_avatar_proxy/v4/letter/m/dbc845/32.png) [@marko](https://community.openconversational.ai/u/marko)
#### Post date: [January 20, 2019, 8:04am UTC](https://community.openconversational.ai/t/mycroft-cli-client-gets-stuck-on-a-connection-refused-error/5704/1 "2019-01-20T08:04:32Z")

</div>

I’m trying to get Picroft (raspbian-stretch\_Picroft\_2018-09-12) running on a new  
Raspberry Pi 3 B+. The setup process goes fine until just _after_ I set up my microphone when the setup script crashes with errors. Anytime I try to complete the setup by running **mycroft-cli-client** the script errors out within seconds. From reading the errors the script throws out it looks as if its trying to make a websocket connection and getting stuck on that step. Here is the output. Its the same error every time it try to run mycroft-cli-client :

```
**07:31:24.924 - mycroft.configuration.config:load_local:124 - DEBUG - Configuration /home/pi/mycroft-core/mycroft/configuration/mycroft.conf loaded**

```

\*\* 07:31:25.066 - mycroft.configuration.config:load\_local:124 - DEBUG - Configuration /home/pi/mycroft-core/mycroft/configuration/mycroft.conf loaded\*\*  
\*\* 07:31:25.205 - mycroft.configuration.config:load\_local:124 - DEBUG - Configuration /etc/mycroft/mycroft.conf loaded\*\*  
\*\* 07:31:25.344 - mycroft.configuration.config:load\_local:129 - DEBUG - Configuration ‘/home/pi/.mycroft/mycroft.conf’ not found\*\*  
\*\* 07:31:25.356 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai:443\*\*  
\*\* 07:31:26.139 - urllib3.connectionpool - DEBUG - https//api.mycroft.ai:443 “GET /v1/device/ HTTP/1.1” 301 106\*\*  
\*\* 07:31:26.157 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): api.mycroft.ai:80\*\*  
\*\* 07:31:26.431 - urllib3.connectionpool - DEBUG - http//api.mycroft.ai:80 “GET /v1/device HTTP/1.1” 302 0\*\*  
\*\* 07:31:26.454 - urllib3.connectionpool - DEBUG - Resetting dropped connection: api.mycroft.ai\*\*  
\*\* 07:31:27.076 - urllib3.connectionpool - DEBUG - https//api.mycroft.ai:443 “GET /v1/device HTTP/1.1” 401 38\*\*  
\*\* 07:31:27.090 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai:443\*\*  
\*\* 07:31:28.056 - urllib3.connectionpool - DEBUG - [https://api.mycroft.ai:443](https://api.mycroft.ai:443) “GET /v1/auth/token HTTP/1.1” 401 38\*\*  
\*\* 07:31:28.274 - mycroft.configuration.config:load\_local:129 - DEBUG - Configuration ‘/var/tmp/mycroft\_web\_cache.json’ not found\*\*  
\*\* 07:31:28.413 - mycroft.configuration.config:load\_local:124 - DEBUG - Configuration /etc/mycroft/mycroft.conf loaded\*\*  
\*\* 07:31:28.551 - mycroft.configuration.config:load\_local:129 - DEBUG - Configuration ‘/home/pi/.mycroft/mycroft.conf’ not found\*\*  
\*\* ^[=07:31:28.579 - mycroft.messagebus.client.ws:on\_error:76 - ERROR - === ConnectionRefusedError(111, ‘Connection refused’) ===\*\*  
\*\* Traceback (most recent call last):\*\*  
\*\* File “/home/pi/mycroft-core/.venv/lib/python3.5/site-packages/websocket/\_app.py”, line 168, in run\_forever\*\*  
\*\* host=host, origin=origin)\*\*  
\*\* File “/home/pi/mycroft-core/.venv/lib/python3.5/site-packages/websocket/\_core.py”, line 266, in connect\*\*  
\*\* self.sock, addrs = connect(url, self.sock\_opt, proxy\_info(**options))**  
\*\* File “/home/pi/mycroft-core/.venv/lib/python3.5/site-packages/websocket/\_http.py”, line 63, in connect\*\*  
\*\* sock = \_open\_socket(addrinfo\_list, options.sockopt, options.timeout)\*\*  
\*\* File “/home/pi/mycroft-core/.venv/lib/python3.5/site-packages/websocket/\_http.py”, line 116, in \_open\_socket\*\*  
\*\* raise err\*\*  
\*\* File “/home/pi/mycroft-core/.venv/lib/python3.5/site-packages/websocket/\_http.py”, line 105, in \_open\_socket\*\*  
\*\* sock.connect(address)\*\*  
\*\* ConnectionRefusedError: [Errno 111] Connection refused\*\*

Can anyone advise me how to fix this?

---

<div class="post-metadata">

### Author: ![baconator](https://community.openconversational.ai/letter_avatar_proxy/v4/letter/b/d07c76/32.png) [@baconator](https://community.openconversational.ai/u/baconator)
#### Post date: [January 20, 2019, 4:13pm UTC](https://community.openconversational.ai/t/mycroft-cli-client-gets-stuck-on-a-connection-refused-error/5704/2 "2019-01-20T16:13:59Z")

</div>

have you run `start-mycroft.sh all` before trying the cli?

---

<div class="post-metadata">

### Author: ![marko](https://community.openconversational.ai/letter_avatar_proxy/v4/letter/m/dbc845/32.png) [@marko](https://community.openconversational.ai/u/marko)
#### Post date: [January 21, 2019, 1:58am UTC](https://community.openconversational.ai/t/mycroft-cli-client-gets-stuck-on-a-connection-refused-error/5704/3 "2019-01-21T01:58:31Z")

</div>

> [@baconator](#):
>
> start-mycroft.sh

Thank you. I tried running **start-mycroft.sh** before starting the cli interface, but it did not make a difference. Weirdly enough, the next day (and after several reboots) it apparently spontaneously connected to api.mycroft.ai. I was able to pair my Pi 3b+ and start using Mycroft.

Why it works now is still a mystery. Was api.mycroft.ai getting too many connection requests yesterday?
