Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

[gdax.js] Live tradebot crash after order not filled - irrecoverable error #1817

Closed
SebFourault opened this issue Jan 30, 2018 · 4 comments
Closed

Comments

@SebFourault
Copy link

SebFourault commented Jan 30, 2018

  • I'm submitting a ...
    [X] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository

  • Action taken (what you did)
    I launched several time a live tradebot using gdax exchange, running gekko on a raspberry pi.

  • Expected result (what you hoped would happen)
    I would expect gekko to continue running all the time unless I stop it manually.

  • Actual result (unexpected outcome)
    After running well for several hours, I receive an irrecoverable error that make Gekko crash and kill the live tradebot. Each time it was after an attempt to SELL or BUY which was not filled :

018-01-28 20:25:57 (INFO): SELL order was not (fully) filled, cancelling and creating new order 2018-01-28 20:25:57 (DEBUG): Waiting 10 seconds before starting a new trade on GDAX!

And after that, I receive and irrecoverable error.
2 times this error message :
[gdax.js] (getTicker) returned an irrecoverable error: getaddrinfo EAI_AGAIN api.gdax.com:443
And one time this one :
[gdax.js] (getTicker) returned an irrecoverable error: write EPROTO 1995669376:error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number:../deps/openssl/openssl/ssl/s3_pkt.c:365:

In the UI I see a popup message indicating that Gekko has crashed. And in the console the following message :
Gekko encountered an error and can't continue Error: [gdax.js] getaddrinfo EAI_AGAIN api.gdax.com:443 Meta debug info: Gekko version: v0.5.12 Nodejs version: v8.9.4

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc)
    The 3 times, it happened after an BUY/SELL attempt not filled, and an attempt from gekko to cancel current order to place another one.

Thanks a lot for you precious help 😃

@askmike
Copy link
Owner

askmike commented Jan 30, 2018

Hey,

  • EAI_AGAIN is a DNS lookup timed out error, this means that sometimes the internet (or connection with your router) is flaky. Are you experiencing any problems with other applications?
  • write EPROTO 1995669376:error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number:../deps/openssl/openssl/ssl/s3_pkt.c:365 is a very strange low level error, never seen this before. Did you run npm install on the Raspberry PI or did you copy files over? I'd suggest to manually remove the folder gekko/node_modules and run npm install again.

@SebFourault
Copy link
Author

Hey Mike,

Thanks for your answer !

  • Ok I'll try to npm install again.
  • But for the DNS lookup, I can't figure out what it may be. My internet seems to be working well 24/7, and my raspberri pi 3 is connected via wifi to my router. Is there a way to set a longer timeout in gekko before throwing a "no internet" error ?
    Thanks again

@askmike
Copy link
Owner

askmike commented Jan 30, 2018

Ok I'll try to npm install again.

Great! Please reply here and re-open if it does.

Is there a way to set a longer timeout in gekko before throwing a "no internet" error ?

After doing some more research this error means that the DNS server (most likely your home router) gave raspberry pi that specific error. This is not really an issue with Gekko and Gekko cannot do anything about it, the only things I can recommend trying and looking into are:

  • Use your raspberry pi hostfile to hardcode gdax IP addresses. This way you don't need a DNS server.
  • Use another DNS server (sometimes DNS servers on routers are flaky) you can use google's 8.8.8.8, read more here: https://developers.google.com/speed/public-dns/

@askmike askmike closed this as completed Jan 30, 2018
@SebFourault
Copy link
Author

Thanks a lot for you help there 😃
I've changed my DNS servers to the Google's one (8.8.8.8). If it crashes again i'll try to hardcode gdax IP addresses !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants