binance-proxy icon indicating copy to clipboard operation
binance-proxy copied to clipboard

Errors in binance-proxy docker

Open wildloveil opened this issue 3 years ago • 2 comments

Hi, In binance-proxy docker I get the following error: (node:1) UnhandledPromiseRejectionWarning: FetchError: request to https://api.binance.com/api/v3/klines?symbol=XTZUSDT&interval=5m failed, reason: getaddrinfo ENOTFOUND api.binance.com

at ClientRequest.<anonymous> (/usr/src/app/node_modules/node-fetch/lib/index.js:1483:11)

at ClientRequest.emit (events.js:400:28)

at TLSSocket.socketErrorListener (_http_client.js:475:9)

at TLSSocket.emit (events.js:400:28)

at emitErrorNT (internal/streams/destroy.js:106:8)

at emitErrorCloseNT (internal/streams/destroy.js:74:3)

at processTicksAndRejections (internal/process/task_queues.js:82:21)

(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 181)

I checked and my DNS servers are good, any idea how to solve it?

Thanks.

wildloveil avatar Oct 13 '21 17:10 wildloveil

Try to connect to the docker shell and see if ping is working, maybe it is a networking issue with docker.

abanchev avatar Oct 13 '21 18:10 abanchev

Thank you for the quick response, however, looks like it's not a networking issue. below is the console output from inside the docker:

/usr/src/app # ping api.binance.com PING api.binance.com (52.84.226.14): 56 data bytes 64 bytes from 52.84.226.14: seq=0 ttl=237 time=268.203 ms 64 bytes from 52.84.226.14: seq=1 ttl=237 time=268.155 ms 64 bytes from 52.84.226.14: seq=2 ttl=237 time=268.121 ms 64 bytes from 52.84.226.14: seq=3 ttl=237 time=268.326 ms 64 bytes from 52.84.226.14: seq=4 ttl=237 time=268.227 ms ^C --- api.binance.com ping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max = 268.121/268.206/268.326 ms /usr/src/app # _binance-proxy_logs.txt

The docker is connected with "host" as networking type and have around 10 bots behind it. If any other input is usefull, please let me know. Attached is the container log file.

wildloveil avatar Oct 13 '21 21:10 wildloveil