question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Couldn't connect to WS! Exiting.

See original GitHub issue

UPDATE: Seems to be working now. Must have been an issue with BitMEX servers.


I’ve been running MM without a hitch for two weeks and just today I came across the following error:

2018-10-05 15:28:22,756 - INFO - ws_thread - Connecting to wss://www.bitmex.com/realtime?subscribe=quote:ETHUSD,trade:ETHUSD,instrument,order:ETHUSD,execution:ETHUSD,margin,position
2018-10-05 15:28:22,756 - INFO - ws_thread - Authenticating with API Key.
2018-10-05 15:28:22,758 - INFO - ws_thread - Started thread
2018-10-05 15:28:27,761 - ERROR - ws_thread - Couldn't connect to WS! Exiting.

I tried running MM on three different systems and come across the same error. I’ve also tried creating a new API key (livenet) but that didn’t fix the problem. I’ve also tried upgrading websocket-client to 0.53.0 (originally 0.47.0) to no avail.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

4reactions
miryalaacommented, Oct 9, 2018

I had the same issue and fixed it:

steps:

  1. Copied the latest market maker from _https://github.com/BitMEX/sample-market-maker_ to your project directory
  2. Uninstalled bitmex-ws by running pip uninstall bitmex-ws in the same project directory
  3. Ran pip install -r requirements.txt
1reaction
gitgitgat-zzcommented, May 13, 2019

I’m still getting the error after following the steps mentioned above

Read more comments on GitHub >

github_iconTop Results From Across the Web

Localhost Refused to Connect Error: 5 Confirmed Ways to Fix It
Localhost refused to connect error can be caused by an incorrectly configured port, insufficient permissions, or an inoperative web server.
Read more >
Developers - Couldn't connect to WS! Exiting. - - Bountysource
UPDATE: Seems to be working now. Must have been an issue with BitMEX servers. I've been running MM without a hitch for two...
Read more >
How to resolve cURL Error (7): couldn't connect to host?
“CURL ERROR 7 Failed to connect to Permission denied” error is caused, when for any reason curl request is blocked by some firewall...
Read more >
How to Fix java.net.ConnectException: Connection refused
1) First try to ping the destination host, if the host is ping-able it means the client and server machine are in the...
Read more >
'Unable to connect to server' error when starting client
Check to see if the App Server is started, and if not, try restarting the App Server. Is the connection information in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found