Gekko: Promise Error On Startup

Created on 21 Mar 2017  Â·  16Comments  Â·  Source: askmike/gekko

Hello,

I'm trying to use the develop branch to try out the UI. I am getting the error below when running "node gekko --ui"
(node:27792) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Exited with code 3

I am running gekko on a Debian headless install using an Orange PI for hardware. I am trying to access the site using Chrome running on Windows 10 over the internal network. When ever I try to attach to the site, I get a Disconnected message on the page saying something went wrong in the console and there are no other error messages.

I did modify the UIconfig.js so that it binds to the Internal IP address rather than localhost. Just in case the UI uses that as data that makes up absolute paths for API calls. However, I still get the disconnected message, but oddly enough if I go to the URL with "/api/strategies" instead of "/#/home" I will get JSON back.

If you could provide a place to look I would greatly appreciate it. Thank you and great work!!!

bug dev-branch waiting-for-answer

Most helpful comment

I have a simple solution!
in /web/vue/UIconfig.js
host: 'localhost' change to IP

All 16 comments

I am running gekko on a Debian headless install using an Orange PI for hardware.

Right now Gekko tries to open a browser pointing to the UI, this might fail here. Can you try the following?

instead of running:

node gekko --ui

run:

cd web
node server

And if that doesn't work, post the full output (without clicking anything on the UI).

The same issue: gekko runs on VM Fedora25 x64 server. Web browser FF Win10x64.
Just trying to view in browser I instantly get Disconnected alert, console ouput:

[bitfinex@gene web]$ node server.js
TAlib is disabled
Serving Gekko UI on http://localhost:3000/

firewall on F25 has open 3000/tcp.

Hey @nedievas,

When you say same issue, are you referring to the promise error:

(node:27792) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Exited with code 3

Or just the UI error? And can you make a screenshot of the Disconnected alert?

@askmike, just disconnect alert:
capture
/api/strategies:
[{"name":"CCI","params":"# constant multiplier. 0.015 gets to around 70% fit\nconstant = 0.015\n\n# history size, make same or smaller than history\nhistory = 90\n\n[thresholds]\nup = 100\ndown = -100\npersistence = 0"},{"name":"DEMA","params":"short = 10\nlong = 21\n\n[thresholds]\ndown = -0.025\nup = 0.025"},{"name":"MACD","params":"short = 10\nlong = 21\nsignal = 9\n\n[thresholds]\ndown = -0.025\nup = 0.025\npersistence = 1"},{"name":"PPO","params":"short = 12\nlong = 26\nsignal = 9\n\n[thresholds]\ndown = -0.025\nup = 0.025\npersistence = 2"},{"name":"RSI","params":"interval = 14\n\n[thresholds]\nlow = 30\nhigh = 70\npersistence = 1"},{"name":"StochRSI","params":"interval = 3\n\n[thresholds]\nlow = 20\nhigh = 80\npersistence = 3"},{"name":"TSI","params":"short = 13\nlong = 25\n\n[thresholds]\nlow = -25\nhigh = 25\npersistence = 1"},{"name":"UO","params":"[first]\nweight = 4\nperiod = 7\n\n[second]\nweight = 2\nperiod = 14\n\n[third]\nweight = 1\nperiod = 28\n\n[thresholds]\nlow = 30\nhight = 70\npersistence = 1"},{"name":"custom","params":"my_custom_setting = 10"},{"name":"debug-advice","params":""},{"name":"noop","params":""},{"name":"talib-macd","params":"[parameters]\noptInFastPeriod = 10\noptInSlowPeriod = 21\noptInSignalPeriod = 9\n\n[thresholds]\ndown = -0.025\nup = 0.025"},{"name":"varPPO","params":"momentum = \"TSI\" # RSI, TSI or UO\n\n[thresholds]\nweightLow = 120\nweightHigh = -120\n\n# How many candle intervals should a trend persist\n# before we consider it real?\npersistence = 0"}]
Console:

[bitfinex@gene web]$ node server.js
TAlib is disabled
Serving Gekko UI on http://localhost:3000/

  <-- GET /api/strategies
  --> GET /api/strategies 200 167ms 1.49kb

I've had the same disconnection issue. I run my gekko on a rpi3 and if I browse directly to it by hostname or IP, I get the "disconnected" message.

Not really sure what's causing it, but fortunately, we can get around it with the magic of SSH tunnels. SSHing to the pi3 with -L 3000:localhost:3000 added to the command, and then browsing to localhost:3000 works fine. I.e:
ssh -L 3000:localhost:3000 [email protected]

Some background on that disconnected error, the UI is a simple webserver that does 3 things:

  • serve static files (the UI) - this seems to be working.
  • serve a rest API (to do requests) - this seems to be working as well.
  • maintain a websocket connection for realtime updates (used to keep imports & live gekkos up to date) - this does not seem to work.

The disconnected message happens when Gekko is unable to setup the websocket connection, which unfortunately is required to keep the UI realtime.


I will try to debug this, in the meantime: if anyone who has the problem can debug in the browser if there is some error while connecting to the websocket (try this in either chrome or firefox):

check the console

  • right click on the page, click "inspect element"
  • check the console tab and look for any errors.

check the website connection

  • right click on the page, click "inspect element"
  • check the network tab
  • refresh the page
  • look for the call to /api with status code 101 and see if there is an error.
Error in parsing value for ‘display’.  Declaration dropped.  furtive.min.css:1:453
Error in parsing value for ‘display’.  Declaration dropped.  furtive.min.css:1:5432
Error in parsing value for ‘word-wrap’.  Declaration dropped.  furtive.min.css:1:5736
Unknown property ‘appearance’.  Declaration dropped.  furtive.min.css:31:12
Unknown pseudo-class or pseudo-element ‘-ms-input-placeholder’.  Ruleset ignored due to bad selector.  furtive.min.css:64:2
Unknown pseudo-class or pseudo-element ‘-ms-input-placeholder’.  Ruleset ignored due to bad selector.  furtive.min.css:68:2
Unknown pseudo-class or pseudo-element ‘-o-prefocus’.  Ruleset ignored due to bad selector.  furtive.min.css:120:2
Error in parsing value for ‘background’.  Declaration dropped.  furtive.min.css:160:14
Error in parsing value for ‘background’.  Declaration dropped.  furtive.min.css:161:14
Firefox can’t establish a connection to the server at ws://localhost:3000/api/.  reconnecting-websocket.min.js:2:1075
The connection to ws://localhost:3000/api/ was interrupted while the page was loading.  reconnecting-websocket.min.js:2:1075
GET 
http://localhost:3000/api/ [1254ms]

Firefox can’t establish a connection to the server at ws://localhost:3000/api/

This is the problem, localhost is not running gekko. Can you open up UIconfig.js and configure the host (and port) according to your settings?

I have a simple solution!
in /web/vue/UIconfig.js
host: 'localhost' change to IP

Great, @KryptoNova stated he already did that but is still experiencing problems.

@KryptoNova if you have time could you debug as described here?

I hadn't gotten to far into my testing of the new ui, so I deleted the directory and pulled down the most recent develop branch. I made the change the the UIconfig.js so it is my internal IP address. I still got the promise error, but now the UI seems to be functioning.

I can no longer reproduce the Disconnected problem I had earlier.

I do not necessarily want to close this as it appears there may be some others with a similar problem. @askmike I will leave it at your discretion to close this, but I think the fix may be in the most recent commits that were made to develop.

Hello,
Fresh pull from develop branch.
Have similar error about Promise Error on startup.
Disconnect problem was solved by updating UIconfig.js. Looks like not related to Promise Error.
Is method described here relevant to Promise Error debuging?

image

@MarvinDivo no, just this one.

And let me know the results please!

@MarvinDivo if that did not fix your problem, please open a new issue.

I am closing this since this describes two separate issues, one (the disconnected message) is fixed for most people and the other one is a warning which I think is also fixed.

I had same problem.

Make sure you set api: host to 0.0.0.0 or to the correct IP address. I only changed the UI host, api host was 'localhost' and it did not work.

If you only change the UI to ip address it will result in connection refused/disconnects. So check the API host address.

Hi all,

I still have issues with the gekko setup using a public Debian VPS, SSL, htpasswd, and Nginx. It would be very helpful if someone could provide a configuration that is known to work.

I have been following the steps provided at the Gekko documentation website [1,2] but couldn't made it fully working, i.e., ending up seeing the "disconnected" pop-up posted by @nedievas.

The combination of public Debian VPS, htpasswd, and Nginx (without SSL) works, i.e., no "disconnected" pop-up appears.

Thanks!

[1] https://gekko.wizb.it/docs/installation/installing_gekko.html
[2] https://gekko.wizb.it/docs/installation/installing_gekko_on_a_server.html

Was this page helpful?
0 / 5 - 0 ratings

Related issues

clownfish44 picture clownfish44  Â·  3Comments

prathanbomb picture prathanbomb  Â·  3Comments

yacindou picture yacindou  Â·  3Comments

gekkotrader picture gekkotrader  Â·  4Comments

GiordanoFlorian picture GiordanoFlorian  Â·  4Comments