binance-trading-bot: #77 branch doesn't show symbols on frontend

I have deployed a brand new Linux Vm with Ubuntu 20.04.02 LTS, 64 bit with 4 cpus and 4 gb of memory to test #77 (feature-monitoring-simultaneously).

As a reference, I have a copy of the same VM with the same resources, settings and OS, running the master branch and everything works as expected.

I redeployed everything from scratch as per the documentation, and i have the following errors:

[2021-05-14T11:47:47.289Z]  INFO: binance-api/19 on f5536e1e40ac: Existing opened socket for candles found, clean first (version=0.0.65, gitHash=a9e4c36, server=binance)
[2021-05-14T11:47:48.291Z]  WARN: binance-api/19 on f5536e1e40ac: Binance candle is not received in last mintues. Reconfigure websocket (version=0.0.65, gitHash=a9e4c36, server=binance, debug=true)
[2021-05-14T11:47:48.291Z]  INFO: binance-api/19 on f5536e1e40ac: Set websocket for candles (version=0.0.65, gitHash=a9e4c36, server=binance)
[2021-05-14T11:47:48.291Z]  INFO: binance-api/19 on f5536e1e40ac: Finding document from MongoDB (version=0.0.65, gitHash=a9e4c36, server=binance, helper=mongo, funcName=findOne, collectionName=trailing-trade-common)
    query: {
      "key": "configuration"
    }
[2021-05-14T11:47:48.294Z]  INFO: binance-api/19 on f5536e1e40ac: Found document from MongoDB (version=0.0.65, gitHash=a9e4c36, server=binance, helper=mongo, funcName=findOne)
    result: {
      "_id": "609e627f17efb3a018af44b8",
      "key": "configuration",
      "buy": {
        "enabled": true,
        "maxPurchaseAmount": -1,
        "maxPurchaseAmounts": {
          "USDT": 100,
          "BTC": 0.001
        },
        "triggerPercentage": 1,
        "stopPercentage": 1.02,
        "limitPercentage": 1.021
      },
      "candles": {
        "interval": "1h",
        "limit": 100
      },
      "cronTime": "* * * * * *",
      "enabled": true,
      "sell": {
        "enabled": true,
        "triggerPercentage": 1.06,
        "stopPercentage": 0.98,
        "limitPercentage": 0.979,
        "stopLoss": {
          "enabled": false,
          "maxLossPercentage": 0.8,
          "disableBuyMinutes": 360,
          "orderType": "market"
        }
      },
      "symbols": [
        "ETHUSDT",
        "ADAUSDT",
        "BNBUSDT",
        "XRPUSDT"
      ]
    }
[2021-05-14T11:47:48.294Z]  INFO: binance-api/19 on f5536e1e40ac: Retrieved symbols (version=0.0.65, gitHash=a9e4c36, server=binance)
    symbols: [
      "ETHUSDT",
      "ADAUSDT",
      "BNBUSDT",
      "XRPUSDT"
    ]

Any thoughts on how to debug what the bot receives from Binance ? The only difference i see from the master branch is that the jobs are handled differently, on this branch you have and extra “server-binance.js” which handles the candles and websocket, and master branch doesn’t have this file and handles the operations in a different manner

Also, WS logs from Chrome:

image

image

_Originally posted by @radumalica in https://github.com/chrisleekr/binance-trading-bot/pull/77#issuecomment-841206541_

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

Ok, fixed the issue.

As I wrote in the wiki, when docker daemon uses host networking using docker0 network interface, you need to change the MTU of that to match your VM host interface MTU.

As i deployed the new VM with Docker 20.10.06, now the default networking is “bridge” mode and not using docker0 interface.

Because i changed only docker0 mtu, the bridge and veth interfaces are not visible until you start containers and i did not check the MTU on those

132: br-01ff77c182bd: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:09:86:af:10 brd ff:ff:ff:ff:ff:ff
    inet 172.22.0.1/16 brd 172.22.255.255 scope global br-01ff77c182bd
       valid_lft forever preferred_lft forever
    inet6 fe80::42:9ff:fe86:af10/64 scope link
       valid_lft forever preferred_lft forever
146: vethf37e752@if145: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-01ff77c182bd state UP group default
    link/ether a6:18:94:c7:af:41 brd ff:ff:ff:ff:ff:ff link-netnsid 4
    inet6 fe80::a418:94ff:fec7:af41/64 scope link tentative
       valid_lft forever preferred_lft forever
148: vethe4ca0db@if147: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-01ff77c182bd state UP group default
    link/ether c2:49:49:53:0e:e5 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::c049:49ff:fe53:ee5/64 scope link
       valid_lft forever preferred_lft forever
150: veth7f6d502@if149: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-01ff77c182bd state UP group default
    link/ether 2e:74:df:ed:ed:24 brd ff:ff:ff:ff:ff:ff link-netnsid 2
    inet6 fe80::2c74:dfff:feed:ed24/64 scope link
       valid_lft forever preferred_lft forever

After this find, the only thing which needs to be added (maybe you can set it up commented) is to modify the docker-compose.yml and add the last 2 lines, of course value should match VM host’s network interface MTU

networks:
  internal:
    driver: bridge
    driver_opts:
        com.docker.network.driver.mtu: 1442

I have also updated the Troubleshooting wiki.