ExchangeUnion / market-maker-bot

MM Bot for OpenDEX. Make profits via arbitrage between OpenDEX and a connected CEX account like Binance 🤖
GNU Affero General Public License v3.0
105 stars 20 forks source link

Unable to reconnect to xud #57

Closed kilrau closed 3 years ago

kilrau commented 3 years ago

... and takes ages to recover. Something is wrong there. Sure there is no authenticated price stream to use?

2020-07-24 03:10:13.1313 [Centralized] info: Base asset balance 123 and quote asset balance 321
2020-07-24 03:10:13.1313 [OpenDEX] warn: 14 UNAVAILABLE: No connection established. Retrying in 5000ms.
2020-07-24 03:10:13.1313 [Centralized] trace: ETHBTC stream closed
2020-07-24 03:10:18.1818 [Centralized] info: Base asset balance 123 and quote asset balance 321
2020-07-24 03:10:18.1818 [OpenDEX] warn: 14 UNAVAILABLE: No connection established. Retrying in 5000ms.
2020-07-24 03:10:18.1818 [Centralized] trace: ETHBTC stream closed
2020-07-24 03:10:23.2323 [Centralized] info: Base asset balance 123 and quote asset balance 321
2020-07-24 03:10:23.2323 [OpenDEX] warn: 14 UNAVAILABLE: No connection established. Retrying in 5000ms.
2020-07-24 03:10:23.2323 [Centralized] trace: ETHBTC stream closed
2020-07-24 03:10:28.2828 [Centralized] info: Base asset balance 123 and quote asset balance 321
2020-07-24 03:10:28.2828 [OpenDEX] warn: 14 UNAVAILABLE: No connection established. Retrying in 5000ms.
2020-07-24 03:10:28.2828 [Centralized] trace: ETHBTC stream closed
2020-07-24 03:10:33.3333 [Centralized] info: Base asset balance 123 and quote asset balance 321
2020-07-24 03:10:33.3333 [OpenDEX] warn: 14 UNAVAILABLE: No connection established. Retrying in 5000ms.
2020-07-24 03:10:33.3333 [Centralized] trace: ETHBTC stream closed
2020-07-24 03:10:38.3838 [Centralized] info: Base asset balance 123 and quote asset balance 321
2020-07-24 03:10:38.3838 [OpenDEX] warn: 14 UNAVAILABLE: No connection established. Retrying in 5000ms.
2020-07-24 03:10:38.3838 [Centralized] trace: ETHBTC stream closed
kilrau commented 3 years ago

If i restart arby, it immediately reconnects to the price stream successfully.

erkarl commented 3 years ago

This one looks it's not related to the price stream rather than arby being unable to connect to xud and retrying every 5s. We had this before, but haven't been able to reproduce it in my environments. I'll start couple of environments on simnet to see if I can reproduce.

kilrau commented 3 years ago

Could it be that arby can't reconnect to xud if xud is restarted or otherwise becomes temporarily unavailable leading to above scenario? Just noticed exactly this when my setup updated & restarted xud:

2020-07-27 04:10:27.2727 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 04:10:28.2828 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 04:10:29.2929 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 04:10:30.3030 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 04:10:31.3131 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 04:10:32.3232 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 04:10:33.3333 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 04:10:34.3434 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 04:10:35.3535 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 04:10:36.3636 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 04:10:37.3737 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 04:10:38.3838 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 04:10:39.3939 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
erkarl commented 3 years ago

Could it be that arby can't reconnect to xud if xud is restarted or otherwise becomes temporarily unavailable leading to above scenario? Just noticed exactly this when my setup updated & restarted xud

It could, yes. I'll try to reproduce. This is very helpful, thanks.

erkarl commented 3 years ago

Should be fixed by: https://github.com/ExchangeUnion/market-maker-tools/pull/61

Please reopen the issue if you experience this again @raladev @kilrau