UI port don't open
Hello, i run gekko with server configuration on my VDS on ip 212.86.102.103. And port 3000 api work and open but port 3001 for UI don't work and dont't open.
I tried to enter the ip server and 0.0.0.0 Also in netstat port 3000 is open, but 3001 does not listen.
In the console Gekko does not write errors, where can I see them? The system I have is Ubuntu 14, Nodejs 7.9
Hey,
Gekko runs the UI from a single port, this defaults to 3000. The easy setup is to serve Gekko from port 3000 and to connect the UI to port 3000. Is this working for you?
If you are running Gekko to a machine exposed to the open internet we recommend putting a reverse proxy (like NGINX) in front of it so that only you can connect to the UI. It doesn't sound like you did this so in that case you need to configure both the UI and the API to the same port.
const CONFIG = { headless: true, api: { host: '127.0.0.1', port: 3000, }, ui: { ssl: false, host: '127.0.0.1', port: 3000, path: '/' } } This is my config. I run server with this config and connect to server with ssh tunnel local port 3000 to 127.0.0.1:3000 and open browser http://127.0.0.1:3000, connection failed
And on the server (where gekko is running) are you able to connect? You can try this with curl:
curl http://localhost:3000
Closing because of inactivity. Feel free to comment or reopen!
First of all, great project! Unfortunately I'm having trouble getting this to work on a remote server.
I've set-up Gekko with the following settings:
const CONFIG = {
headless: true,
api: {
host: '127.0.0.1',
port: 3000,
},
ui: {
ssl: true,
host: 'domain.com',
port: 443,
path: '/'
}
}
My nginx reverse proxy looks like this:
# HTTP - redirect all requests to HTTPS:
server {
listen 80;
listen [::]:80 default_server ipv6only=on;
return 301 https://$host$request_uri;
}
# HTTPS - proxy requests on to local Node.js app:
server {
listen 443;
server_name domain.com;
ssl on;
# Use certificate and key provided by Let's Encrypt:
ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
# Pass requests for / to localhost:3000:
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://localhost:3000/;
proxy_ssl_session_reuse off;
proxy_set_header Host $http_host;
proxy_cache_bypass $http_upgrade;
proxy_redirect off;
}
}
When I connect to domain.com, the UI loads, but the websocket fails to connect. I suspect my nginx configuration is at fault: reconnecting-websocket.min.js:2 WebSocket connection to 'wss://domain.com/api/' failed: Error during WebSocket handshake: Unexpected response code: 404
Here's the console output:
TAlib is disabled
Serving Gekko UI on https://domain.com:443/
<-- GET /api/imports
--> GET /api/imports 200 3ms 2b
<-- GET /api/gekkos
--> GET /api/gekkos 200 1ms 2b
<-- GET /api/gekkos
--> GET /api/gekkos 200 1ms 2b
<-- GET /api/
--> GET /api/ 404 1ms -
<-- GET /favicon.ico
--> GET /favicon.ico 404 1ms -
<-- GET /api/
--> GET /api/ 404 1ms -
<-- GET /api/
--> GET /api/ 404 1ms -
<-- GET /api/
I'd appreciate your input!
First of all, great project!
I agree!
Unfortunately I'm having trouble getting this to work on a remote server.
I had a similar time with it myself and decided to make a PR #709 to have it covered in the documentation in case anyone else were to have the same problems setting it up.
Let me know if that documentation helps you at all with your issue or if I need to revise it
Perfect, thanks! Your suggested NGINX config works beautifully.
Hi, I'm using Safari with the above nginx configs. I can get to my server no problem, but it appears that the basic auth is blocking the websockets.
I don't have any problem pulling up the main page, but I get the 'Disconnected' white box on my screen. Looking at the js inspector it says:
WebSocket connection to 'wss://mydomain.com/api/' failed: Unexpected response code: 401
I even went into the ./web/vue/src/tools/api.js file and made the following changes:
// ws API path
if(config.ssl) {
var wsPath = `wss://username:basicauthpass@{host}`;
} else {
var wsPath = `ws://username:basicauthpass@${host}`;
}
and still, websocket 401 error.
If I remove basic auth, everything works. However, I can't leave gekko on a public domain without at least basic auth.
Suggestions?
Not sure if I missed it in the docs. But you actually have to go into the web directory and run node server. The WebUI doesn't fire-up with gekko itself.
Mike, Please help, I tried to follow your code below is my configuration, when I do the curl http://localhost:3000 it refuses the connection. Any help will be greatly appreciated. Is there anything I'm missing? I am really trying to get this up and running it is a fantastic concept!
Code: const CONFIG = { headless: true, api: { host: '0.0.0.0', port: 3000, timeout: 120000 // 2 minutes }, ui: { ssl: false, host: '192.168.1.xx', //Home IP port: 3000, path: '/' }, adapter: 'sqlite' }
if(typeof window === 'undefined') module.exports = CONFIG; else window.CONFIG = CONFIG;
Had Gekko running fine on vps without any issue for a while. Today I am unable to access the website UI because of "connection refused". Tried the curl command in console as suggested but got the same message "failed to connect to localhost port 3000: connection refused". Any advice on how to solve?
Are you sure you the gekko proces was running?
On Wed, 5 Sep 2018, 16:15 fabrixpo, [email protected] wrote:
Had Gekko running fine on vps without any issue. Today I am unable to access the website UI because of "connection refused". Tried the curl command in console as suggested but got the same message "failed to connect to localhost port 3000: connection refused". Any advice on how to solve?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/askmike/gekko/issues/698#issuecomment-418640830, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7MD-Uzb-rgl1sijyv7y_HJ7l2U9N2fks5uX4gEgaJpZM4M_Iok .
How can I see if it's running?
You are supposed to start the gekko proces by running "node gekko --ui" on the server (over ssh). So you need to log in and check. You can use something like screen or pm2 to keep it alive outside your ssh connection.
On Wed, 5 Sep 2018, 16:25 fabrixpo, [email protected] wrote:
How can I see if it's running?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/askmike/gekko/issues/698#issuecomment-418643999, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7MD8kL3nJ5Q2PPRlexSfykHVdWnWuaks5uX4p5gaJpZM4M_Iok .
Ok. It was not running anymore, don't know why... Now I started it again but my live gekkos list is empty... :-( my previously running Gekko trading bot disappeared. BTW thank you for support!
Yep, they close when you stop the server. You got to keep the server running! I am working on having them restart when you restart the server. Not there yet though...
On Wed, 5 Sep 2018, 17:06 fabrixpo, [email protected] wrote:
Ok. It was not running anymore, don't know why... Now I started it again but my live gekkos list is empty... :-( my previously running Gekko trading bot disappeared. BTW thank you for support!
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/askmike/gekko/issues/698#issuecomment-418656435, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7MD_NmzeQno6pq5pa7jqqr875gatTqks5uX5QdgaJpZM4M_Iok .