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
104 stars 20 forks source link

arby can't connect to xud/OpenDEX, fixed by arby restart #38

Closed kilrau closed 4 years ago

kilrau commented 4 years ago

still need to restart arby once to get it working

arby commit: ef72b1757e69890207af22b5e81e4560af4c1c9c

2020-06-25 01:26:09.099 [Centralized] trace: ETHBTC stream closed
2020-06-25 01:26:14.1414 [Centralized] info: Base asset balance 123 and quote asset balance 321
2020-06-25 01:26:14.1414 [OpenDEX] warn: 14 UNAVAILABLE: No connection established. Retrying in 5000ms.
2020-06-25 01:26:14.1414 [Centralized] trace: ETHBTC stream closed
2020-06-25 01:26:19.1919 [Centralized] info: Base asset balance 123 and quote asset balance 321
2020-06-25 01:26:19.1919 [OpenDEX] warn: 14 UNAVAILABLE: No connection established. Retrying in 5000ms.
2020-06-25 01:26:19.1919 [Centralized] trace: ETHBTC stream closed
2020-06-25 01:26:24.2424 [Centralized] info: Base asset balance 123 and quote asset balance 321
2020-06-25 01:26:24.2424 [OpenDEX] warn: 14 UNAVAILABLE: No connection established. Retrying in 5000ms.
2020-06-25 01:26:24.2424 [Centralized] trace: ETHBTC stream closed
2020-06-25 13:26:25,430 WARN received SIGTERM indicating exit request
2020-06-25 13:26:25,432 INFO waiting for arby to die
2020-06-25 01:26:25.2525 [Centralized] info: Removing CEX orders
Error: 14 UNAVAILABLE: No connection established
2020-06-25 13:26:28,455 INFO waiting for arby to die
2020-06-25 13:26:31,459 INFO waiting for arby to die
2020-06-25 13:26:34,463 INFO waiting for arby to die
2020-06-25 13:26:35,465 WARN killing 'arby' (7) with SIGKILL
2020-06-25 13:26:35,473 INFO stopped: arby (terminated by SIGKILL)
2020-06-25 13:26:38,042 INFO Set uid to user 0 succeeded
2020-06-25 13:26:38,052 INFO supervisord started with pid 1
2020-06-25 13:26:39,060 INFO spawned: 'arby' with pid 7

> market-maker-tools@0.1.0 start:arby /app
> npm run compile && node dist/arby.js

> market-maker-tools@0.1.0 compile /app
> npm run lint && tsc && cross-os postcompile

2020-06-25 13:26:40,743 INFO success: arby entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

> market-maker-tools@0.1.0 lint /app
> eslint . --ext .js,.ts

2020-06-25 01:26:59.5959 [GLOBAL] info: Starting. Hello, Arby.
2020-06-25 01:26:59.5959 [GLOBAL] info: Running with config:
LOG_LEVEL: trace
DATA_DIR: /root/.arby
OPENDEX_CERT_PATH: /root/.xud/tls.cert
OPENDEX_RPC_HOST: xud
OPENDEX_RPC_PORT: 28886
MARGIN: 0.04
BASEASSET: ETH
QUOTEASSET: BTC
TEST_CENTRALIZED_EXCHANGE_BASEASSET_BALANCE: 123
TEST_CENTRALIZED_EXCHANGE_QUOTEASSET_BALANCE: 321
2020-06-25 01:26:59.5959 [GLOBAL] info: Cleaning up all orders before shutting down
2020-06-25 01:26:59.5959 [Centralized] info: Base asset balance 123 and quote asset balance 321
2020-06-25 01:26:59.5959 [OpenDEX] trace: Base asset balance 9 (maxinbound: 90071992.54740991, maxoutbound: 9) and quote asset balance 2.53431914 (maxinbound: 2.41559035, maxoutbound: 2.48431914).
2020-06-25 01:27:00.000 [Centralized] trace: ETHBTC established connection to wss://stream.binance.com:9443/ws/ethbtc@aggTrade
2020-06-25 01:27:00.000 [Centralized] trace: heartbeat from ETHBTC socket
2020-06-25 01:27:01.011 [Centralized] trace: New price: 0.025254
2020-06-25 01:27:01.011 [OpenDEX] trace: Starting to update OpenDEX orders
2020-06-25 01:27:01.011 [OpenDEX] trace: Removed all open orders for ETH/BTC
2020-06-25 01:27:01.011 [OpenDEX] trace: Creating ETH/BTC buy order with id 0c7f7a6c-eb86-412c-b734-bb3703171ffe, quantity 102.47218015 and price 0.02424384
2020-06-25 01:27:01.011 [OpenDEX] trace: Creating ETH/BTC sell order with id 75a9449d-c13f-4dfe-97c1-8225bcba11de, quantity 9 and price 0.02626416
2020-06-25 01:27:01.011 [OpenDEX] trace: Order 75a9449d-c13f-4dfe-97c1-8225bcba11de created
2020-06-25 01:27:01.011 [OpenDEX] trace: Order 0c7f7a6c-eb86-412c-b734-bb3703171ffe created
2020-06-25 01:27:01.011 [OpenDEX] trace: OpenDEX orders updated
2020-06-25 01:27:01.011 [Centralized] trace: New price: 0.025254
2020-06-25 01:27:03.033 [Centralized] trace: New price: 0.025254
simnet > 
kilrau commented 4 years ago

Didn't see this one these days. Will reopen if I see it again.

kilrau commented 4 years ago

Saw this again today. Arby trying to remove orders but continues to fail after xud was restarted (and unlocked):

2020-07-27 07:49:26.2626 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:27.2727 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:28.2828 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:29.2929 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:30.3030 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:31.3131 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:32.3232 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:33.3333 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:34.3434 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:35.3535 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:36.3636 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:37.3737 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:38.3838 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:39.3939 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:40.4040 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:42.4242 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:43.4343 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:44.4444 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:45.4545 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms
2020-07-27 07:49:46.4646 [OpenDEX] warn: Failed to remove orders: 14 UNAVAILABLE: No connection established - retrying in 1000ms

Restarting arby fixed it.

kilrau commented 4 years ago

Looks closely related: https://github.com/ExchangeUnion/market-maker-tools/issues/15

erkarl commented 4 years ago

Duplicate of https://github.com/ExchangeUnion/market-maker-tools/issues/57