ctubio / tribeca

Self-hosted crypto trading bot (automated high frequency market making) in node.js, angular, typescript and c++
https://127.0.0.1:3000
Other
95 stars 26 forks source link

Installation issue on ubuntu 16.04 #42

Closed viperzero closed 7 years ago

viperzero commented 7 years ago

I have tested several virtualbox distros while trying to install Tribeca with no luck

I made a fresh installation of ubuntu 16.04 with latest node and mongodb. Then attempted manual installation. However installation gave finally no errors but following warnings and server won't start:

warn: --minUptime not set. Defaulting to: 1000ms warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms info: Forever processing file: tribeca.js

Any help solving this issue would be appreciated. Like an working recipe for installation *nix distro etc.

ctubio commented 7 years ago

This is OK, this is not an error message. This is saying that the script will exit if not stay up at least 1000ms, but the script is already running.

To look for errors, you should read the file log/tribeca.log

To validate that the application is running, execute the following:

 sudo netstat -anp | egrep --color 'nodejs'

if the application is running you will see that nodejs is listening on port defined in etc/tribeca.json config file, in my case 8069: tcp6 0 0 :::8069 :::* LISTEN 30781/nodejs among other lines not relevant now

Then to open the user interface of the application you should visit the hostname of this machine and the defiend port on prtocol https, for example in my case: https://public_ip:8069 https://localhost:8069 https://example.com:8069 (if example.com have DNS setup) etc..

Hope it helps'¡

viperzero commented 7 years ago

Thankyou for Your fast response. Perhaps I was unclear with the issue. The webUI won't open.

I did the debugging and node process is there similar than yours and tribeca.log says:

{"name":"main","hostname":"osboxes","pid":4120,"level":30,"msg":"Listening to admins on *: 3000","time":"2017-04-19T09:01:48.323Z","v":0}

I tried to connect to gui both https://localhost:3000 and https://127.0.0.1:3000 and even with public ip with no luck. Seems the process is running but webgui is not rendered or I am missing something obvious.

ctubio commented 7 years ago

Hello viperzero'¡ can you see the output of (mine is now port 9333):

curl https://localhost:9333 -k -vvv

mine looks like:

 $ curl https://localhost:9333 -k -vvv
* Rebuilt URL to: https://localhost:9333/
* Hostname was NOT found in DNS cache
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 9333 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* Server certificate:
*        subject: C=AU; ST=Some-State; O=Internet Widgits Pty Ltd
*        start date: 2016-12-22 21:03:25 GMT
*        expire date: 2017-12-22 21:03:25 GMT
*        issuer: C=AU; ST=Some-State; O=Internet Widgits Pty Ltd
*        SSL certificate verify result: self signed certificate (18), continuing anyway.
> GET / HTTP/1.1
> User-Agent: curl/7.38.0
> Host: localhost:9333
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< X-Powered-By: Express
< WWW-Authenticate: Basic realm="Authorization Required"
< Date: Wed, 19 Apr 2017 17:07:07 GMT
< Connection: keep-alive
< Content-Length: 12
<

in case you have also a HTTP/1.1 401 Unauthorized response, that is good, that means you can then try with:

curl https://localhost:9333 -k -vvv -u youuser:yourpass

to see the html of the webUI.

Can you conclude from your output of curl what may be the problem? (feel free to paste it here if you need assistance)

viperzero commented 7 years ago

Hi, thanks again for debugging advice. I got some strange behaviour when implementing curl command:

curl https://localhost:8000 -k -vvv

Mostly I just got failed to connect. Problem seems perhaps be related to gnutils package. Perhaps openSSL certs dont work well? I didn"t use my own but with the ready made tribeca certs.

I dont know if there is something wrong with virtualbox networking, everything else network related seems to work fine on VM though. I am pretty clueless now.

ctubio commented 7 years ago

i used to see this in older machines, i don't know if this may be your problem, but you can check it with:

$ openssl version
OpenSSL 1.0.1t  3 May 2016

if you have some very old version instead of something similar to me, maybe you problem is that the machine is very old, so need to update the operating system.

anyway, if you already have an up-to-date machine, or if you dont wanna update it, you can also remove the files inside etc/sslcert folder; this way the application will run under HTTP instead if it can't find the ssl certificates. once you deleted the files in etc/sslcert, restart the application (npm restart) and go to HTTP protocol instead (once everything is running, you can fight back the https problem again without urgency).

Hope this helps'¡