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

Gekko crashes while running watcher/tradebot #2442

Closed
alexandershalin opened this issue Aug 13, 2018 · 16 comments · Fixed by #2462
Closed

Gekko crashes while running watcher/tradebot #2442

alexandershalin opened this issue Aug 13, 2018 · 16 comments · Fixed by #2462

Comments

@alexandershalin
Copy link

Note: this is the technical bug tracker, please use other platforms for getting support and starting a (non technical) discussion. See the getting help page for details.

I'm submitting a ...
[x ] bug report
[ ] question about the decisions made in the repository

Action taken (what you did)
Installed version 0.6.5 from the scratch
Started live gekko (neuralnet) from UI at Binance

Expected result (what you hoped would happen)
Order should be placed

Actual result (unexpected outcome)
Gekko was running for a while and crased at one moment (seems that it tried to place an order)

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc)

Aug 13 09:15:22 ip-172-31-31-32 gekko[8596]: --> GET /api/imports 200 1ms 364b
Aug 13 09:27:26 ip-172-31-31-32 gekko[8596]: events.js:183
Aug 13 09:27:26 ip-172-31-31-32 gekko[8596]: throw er; // Unhandled 'error' event
Aug 13 09:27:26 ip-172-31-31-32 gekko[8596]: ^
Aug 13 09:27:26 ip-172-31-31-32 gekko[8596]: Error: read ECONNRESET
Aug 13 09:27:26 ip-172-31-31-32 gekko[8596]: at _errnoException (util.js:992:11)
Aug 13 09:27:26 ip-172-31-31-32 gekko[8596]: at TCP.onread (net.js:618:25)
Aug 13 09:27:26 ip-172-31-31-32 systemd[1]: gekko.service: Main process exited, code=exited, status=1/FAILURE
Aug 13 09:27:26 ip-172-31-31-32 systemd[1]: gekko.service: Unit entered failed state.
Aug 13 09:27:26 ip-172-31-31-32 systemd[1]: gekko.service: Failed with result 'exit-code'.
Aug 13 09:27:36 ip-172-31-31-32 systemd[1]: gekko.service: Service hold-off time over, scheduling restart.
Aug 13 09:27:36 ip-172-31-31-32 systemd[1]: Stopped gekko.service.
Aug 13 09:27:36 ip-172-31-31-32 systemd[1]: Started gekko.service.

2018-08-13-08-08-tradebot-710049575725727.log

@alexandershalin
Copy link
Author

Seems that this issue is not directly related to Binance or strat used. Gekko should handle this exception somehow and do not restart.

@alexandershalin
Copy link
Author

alexandershalin commented Aug 13, 2018

  1. Tried to start tradebot one more time. Watcher was created but strat runner was not.
  2. Tried to start watcher only. The same problem here.

Aug 13 10:36:38 ip-172-31-31-32 gekko[8959]: <-- GET /api/configPart/candleWriter
Aug 13 10:36:38 ip-172-31-31-32 gekko[8959]: --> GET /api/configPart/candleWriter 200 1ms 47b
Aug 13 10:36:38 ip-172-31-31-32 gekko[8959]: <-- GET /api/strategies
Aug 13 10:36:38 ip-172-31-31-32 gekko[8959]: <-- GET /api/configPart/performanceAnalyzer
Aug 13 10:36:38 ip-172-31-31-32 gekko[8959]: --> GET /api/configPart/performanceAnalyzer 200 1ms 144b
Aug 13 10:36:38 ip-172-31-31-32 gekko[8959]: --> GET /api/strategies 200 4ms 2.67kb
Aug 13 10:36:38 ip-172-31-31-32 gekko[8959]: <-- GET /api/configPart/paperTrader
Aug 13 10:36:38 ip-172-31-31-32 gekko[8959]: --> GET /api/configPart/paperTrader 200 0ms 132b
Aug 13 10:37:02 ip-172-31-31-32 gekko[8959]: <-- POST /api/startGekko
Aug 13 10:37:02 ip-172-31-31-32 gekko[8959]: 2018-08-13 10:37 Gekko 2018-08-13-10-37-watcher-205997879003161 started.
Aug 13 10:37:02 ip-172-31-31-32 gekko[8959]: --> POST /api/startGekko 200 8ms 1.23kb
Aug 13 10:40:30 ip-172-31-31-32 gekko[8959]: events.js:183
Aug 13 10:40:30 ip-172-31-31-32 gekko[8959]: throw er; // Unhandled 'error' event
Aug 13 10:40:30 ip-172-31-31-32 gekko[8959]: ^
Aug 13 10:40:30 ip-172-31-31-32 gekko[8959]: Error: read ECONNRESET
Aug 13 10:40:30 ip-172-31-31-32 gekko[8959]: at errnoException (util.js:992:11)
Aug 13 10:40:30 ip-172-31-31-32 gekko[8959]: at TCP.onread (net.js:618:25)
Aug 13 10:40:30 ip-172-31-31-32 systemd[1]: gekko.service: Main process exited, code=exited, status=1/FAILURE
Aug 13 10:40:30 ip-172-31-31-32 systemd[1]: gekko.service: Unit entered failed state.
Aug 13 10:40:30 ip-172-31-31-32 systemd[1]: gekko.service: Failed with result 'exit-code'.
Aug 13 10:40:40 ip-172-31-31-32 systemd[1]: gekko.service: Service hold-off time over, scheduling restart.
Aug 13 10:40:40 ip-172-31-31-32 systemd[1]: Stopped gekko.service.
Aug 13 10:40:40 ip-172-31-31-32 systemd[1]: Started gekko.service.
Aug 13 10:40:40 ip-172-31-31-32 gekko[9599]: ______ ________ __ __ __ __ ______
Aug 13 10:40:40 ip-172-31-31-32 gekko[9599]: / \ / |/ | / |/ | / | /
Aug 13 10:40:40 ip-172-31-31-32 gekko[9599]: /$$$$$$ |$$$$$$$$/ $$ | /$$/ $$ | /$$/ /$$$$$$ |
Aug 13 10:40:40 ip-172-31-31-32 gekko[9599]: $$ | $$/ $$ |
$$ |/$$/ $$ |/$$/ $$ | $$ |
Aug 13 10:40:40 ip-172-31-31-32 gekko[9599]: $$ |/ |$$ | $$ $$&lt; $$ $$&lt; $$ | $$ |
Aug 13 10:40:40 ip-172-31-31-32 gekko[9599]: $$ |$$$$ |$$$$$/ $$$$$ \ $$$$$ \ $$ | $$ |
Aug 13 10:40:40 ip-172-31-31-32 gekko[9599]: $$ _$$ |$$ |_____ $$ |$$ \ $$ |$$ \ $$ _$$ |
Aug 13 10:40:40 ip-172-31-31-32 gekko[9599]: $$ $$/ $$ |$$ | $$ |$$ | $$ |$$ $$/
Aug 13 10:40:40 ip-172-31-31-32 gekko[9599]: $$$$$$/ $$$$$$$$/ $$/ $$/ $$/ $$/ $$$$$$/
Aug 13 10:40:40 ip-172-31-31-32 gekko[9599]: Gekko v0.6.5
Aug 13 10:40:40 ip-172-31-31-32 gekko[9599]: I'm gonna make you rich, Bud Fox.

@alexandershalin alexandershalin changed the title Gekko crashes trying to place live order Gekko crashes while running tradebot Aug 13, 2018
@alexandershalin alexandershalin changed the title Gekko crashes while running tradebot Gekko crashes while running watcher/tradebot Aug 13, 2018
@askmike
Copy link
Owner

askmike commented Aug 14, 2018

Strange:

Error: read ECONNRESET

So something got disconnected, but I'm not sure what.

Could you tell me:

  • What kind of gekko (live or paper trader)?
  • What exchange? -> Binance
  • Did you use any plugins?
  • Did you have a browser session open at the time?
  • What browser (& version)?
  • What database (assuming default sqlite)?

@alexandershalin
Copy link
Author

alexandershalin commented Aug 14, 2018

What kind of gekko (live or paper trader)?

Didn't try to run paper trader. Tried market watcher and tradebot to reproduce this issue.

What exchange? -> Binance

Yes, Binance

Did you use any plugins?

No additional plugins were used.

Did you have a browser session open at the time?

Yes, I guess browser was open.

What browser (& version)?

Google Chrome, 68.0.3440.106 (x64)

What database (assuming default sqlite)?

Yes, SQLite.

@xbromy
Copy link

xbromy commented Aug 14, 2018

That's the error on my instance. Same Answers like @alexandershalin. Current dev branch today.

Aug 14 10:02:42 Test02 gekko[7963]: <-- GET /api/imports
Aug 14 10:02:42 Test02 gekko[7963]: --> GET /api/imports 200 2ms 2b
Aug 14 10:02:42 Test02 gekko[7963]: <-- GET /api/gekkos
Aug 14 10:02:42 Test02 gekko[7963]: --> GET /api/gekkos 200 1ms 4.6kb
Aug 14 10:02:42 Test02 gekko[7963]: <-- GET /api/apiKeys
Aug 14 10:02:42 Test02 gekko[7963]: --> GET /api/apiKeys 200 1ms 11b
Aug 14 10:02:42 Test02 gekko[7963]: <-- GET /api/exchanges
Aug 14 10:02:42 Test02 gekko[7963]: --> GET /api/exchanges 200 6ms 87.73kb
Aug 14 10:02:45 Test02 gekko[7963]: <-- POST /api/getCandles
Aug 14 10:02:45 Test02 gekko[7963]: --> POST /api/getCandles 200 308ms 248b
Aug 14 10:16:14 Test02 gekko[7963]: events.js:167
Aug 14 10:16:14 Test02 gekko[7963]: throw er; // Unhandled 'error' event
Aug 14 10:16:14 Test02 gekko[7963]: ^
Aug 14 10:16:14 Test02 gekko[7963]: Error: read ECONNRESET
Aug 14 10:16:14 Test02 gekko[7963]: at TCP.onread (net.js:659:25)
Aug 14 10:16:14 Test02 gekko[7963]: Emitted 'error' event at:
Aug 14 10:16:14 Test02 gekko[7963]: at WebSocket.finalize (/home/username/gekko/node_modules/ws/lib/WebSocket.js:182:41)
Aug 14 10:16:14 Test02 gekko[7963]: at Socket.emit (events.js:182:13)
Aug 14 10:16:14 Test02 gekko[7963]: at emitErrorNT (internal/streams/destroy.js:82:8)
Aug 14 10:16:14 Test02 gekko[7963]: at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
Aug 14 10:16:14 Test02 gekko[7963]: at process._tickCallback (internal/process/next_tick.js:63:19)
Aug 14 10:16:14 Test02 gekko[7963]: disconnect
Aug 14 10:16:14 Test02 gekko[7963]: disconnect
Aug 14 10:16:14 Test02 systemd[1]: gekko.service: Main process exited, code=exited, status=1/FAILURE
Aug 14 10:16:14 Test02 systemd[1]: gekko.service: Unit entered failed state.
Aug 14 10:16:14 Test02 systemd[1]: gekko.service: Failed with result 'exit-code'.
Aug 14 10:16:24 Test02 systemd[1]: gekko.service: Service hold-off time over, scheduling restart.
Aug 14 10:16:24 Test02 systemd[1]: Stopped gekko.service.

@xbromy
Copy link

xbromy commented Aug 14, 2018

@askmike let us know if there is more to test 😄

@alexandershalin
Copy link
Author

Tried to more things:

  • Paper trader: the same problem
  • Internet Explorer instead of Chrome (actually do not think that it is browser related): the same problem.

Gekko is not usable for me currently :(

@xbromy
Copy link

xbromy commented Aug 14, 2018

Yes it's strange. it's running fine using commandline but on UI setup it crashes. And yes, I had also crashes in night when I haven't open the web browser.

@askmike
Copy link
Owner

askmike commented Aug 20, 2018

I just pushed a bunch of error handling related to the websocket. Can everyone (@xbromy, @alexandershalin, et al.) please run the development branch and report strange logs? See here: https://gekko.wizb.it/docs/installation/updating_gekko.html#Updating-the-develop-branch

@xbromy
Copy link

xbromy commented Aug 20, 2018

Okay, I updated and switched to UI. Let's see.

@askmike
Copy link
Owner

askmike commented Aug 20, 2018 via email

@alexandershalin
Copy link
Author

@askmike yes, forgot to update dependencies. Seems that this issue is fixed on my side now.

@xbromy
Copy link

xbromy commented Aug 20, 2018

@alexandershalin How to update dependencies?

@askmike
Copy link
Owner

askmike commented Aug 20, 2018 via email

@alexandershalin
Copy link
Author

@xbromy in the case of using some custom strats (Neuralnet e.g.) you also need to update dependencies for these strats.

@xbromy
Copy link

xbromy commented Aug 20, 2018

Ah yes rest I already did. It's working fine since a few hours. Looks great.

@xbromy xbromy mentioned this issue Aug 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants