michaelgrosner / tribeca

A high frequency, market making cryptocurrency trading platform in node.js
Other
3.99k stars 949 forks source link

Unable to Connect #200

Open bbarney213 opened 6 years ago

bbarney213 commented 6 years ago

I have run out of idea for solving this issue. I used docker compose to set up Tribeca, and I can get through the build process. I connect to the UI and get a blank dashboard with 'Not Connected' displayed. After reading other issues I was able to trace the issue back to the logs. This seems to be the source:

{"name":"tribeca:main","hostname":"d2b22622f390","pid":54,"level":50,"err":{"message":"socket hang up","name":"Error","stack":"Error: socket hang up\n at createHangUpError (_http_client.js:302:15)\n at TLSSocket.socketCloseListener (_http_client.js:334:23)\n at emitOne (events.js:101:20)\n at TLSSocket.emit (events.js:191:7)\n at _handle.close (net.js:510:12)\n at TCP.done [as _onclose] (_tls_wrap.js:332:7)","code":"ECONNRESET"},"msg":"Unhandled promise rejection! Promise {\n <rejected> { Error: socket hang up\n at createHangUpError (_http_client.js:302:15)\n at TLSSocket.socketCloseListener (_http_client.js:334:23)\n at emitOne (events.js:101:20)\n at TLSSocket.emit (events.js:191:7)\n at _handle.close (net.js:510:12)\n at TCP.done [as _onclose] (_tls_wrap.js:332:7) code: 'ECONNRESET' } }","time":"2017-12-23T02:18:08.282Z","v":0} {"name":"tribeca:main","hostname":"d2b22622f390","pid":54,"level":40,"msg":"Did not complete clean-up tasks successfully, still shutting down.","time":"2017-12-23T02:18:10.285Z","v":0} {"name":"tribeca:main","hostname":"d2b22622f390","pid":54,"level":30,"msg":"Exiting with code 1","time":"2017-12-23T02:18:10.286Z","v":0} error: Forever detected script exited with code: 1

This is the full log for a single attempt:

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 {"name":"tribeca:config","hostname":"d2b22622f390","pid":14,"level":30,"msg":"TradedPair = BTC/USD","time":"2017-12-23T02:15:26.804Z","v":0} {"name":"tribeca:config","hostname":"d2b22622f390","pid":14,"level":30,"msg":"WebClientUsername = user","time":"2017-12-23T02:15:26.810Z","v":0} {"name":"tribeca:config","hostname":"d2b22622f390","pid":14,"level":30,"msg":"WebClientPassword = password","time":"2017-12-23T02:15:26.810Z","v":0} {"name":"tribeca:main","hostname":"d2b22622f390","pid":14,"level":30,"msg":"Requiring authentication to web client","time":"2017-12-23T02:15:26.810Z","v":0} {"name":"tribeca:config","hostname":"d2b22622f390","pid":14,"level":30,"msg":"WebClientListenPort = 3000","time":"2017-12-23T02:15:26.814Z","v":0} {"name":"tribeca:config","hostname":"d2b22622f390","pid":14,"level":30,"msg":"EXCHANGE = coinbase","time":"2017-12-23T02:15:26.817Z","v":0} {"name":"tribeca:config","hostname":"d2b22622f390","pid":14,"level":30,"msg":"MongoDbUrl = mongodb://tribeca-mongo:27017/tribeca","time":"2017-12-23T02:15:26.817Z","v":0} {"name":"tribeca:main","hostname":"d2b22622f390","pid":14,"level":30,"msg":"Listening to admins on *: 3000","time":"2017-12-23T02:15:26.828Z","v":0} {"name":"tribeca:config","hostname":"d2b22622f390","pid":14,"level":30,"msg":"ShowAllOrders = true","time":"2017-12-23T02:15:26.886Z","v":0} {"name":"tribeca:config","hostname":"d2b22622f390","pid":14,"level":30,"msg":"ShowAllOrders = true","time":"2017-12-23T02:15:26.887Z","v":0} {"name":"persister:osr","hostname":"d2b22622f390","pid":14,"level":30,"selector":{"exchange":5,"pair":{"base":1,"quote":0}},"limit":10000,"nLoaded":0,"dbName":"osr","msg":"load docs completed","time":"2017-12-23T02:15:26.903Z","v":0} {"name":"persister:trades","hostname":"d2b22622f390","pid":14,"level":30,"selector":{"exchange":5,"pair":{"base":1,"quote":0}},"limit":10000,"nLoaded":0,"dbName":"trades","msg":"load docs completed","time":"2017-12-23T02:15:26.903Z","v":0} {"name":"persister:mt","hostname":"d2b22622f390","pid":14,"level":30,"selector":{"exchange":5,"pair":{"base":1,"quote":0}},"limit":100,"nLoaded":0,"dbName":"mt","msg":"load docs completed","time":"2017-12-23T02:15:26.904Z","v":0} {"name":"persister:msg","hostname":"d2b22622f390","pid":14,"level":30,"selector":{"exchange":5,"pair":{"base":1,"quote":0}},"limit":50,"nLoaded":0,"dbName":"msg","msg":"load docs completed","time":"2017-12-23T02:15:26.905Z","v":0} {"name":"persister:rfv","hostname":"d2b22622f390","pid":14,"level":30,"selector":{"exchange":5,"pair":{"base":1,"quote":0}},"limit":50,"nLoaded":0,"dbName":"rfv","msg":"load docs completed","time":"2017-12-23T02:15:26.905Z","v":0} {"name":"tribeca:config","hostname":"d2b22622f390","pid":14,"level":30,"msg":"CoinbaseApiKey = apikey","time":"2017-12-23T02:15:26.906Z","v":0} {"name":"tribeca:config","hostname":"d2b22622f390","pid":14,"level":30,"msg":"CoinbaseSecret = apisecret","time":"2017-12-23T02:15:26.906Z","v":0} {"name":"tribeca:config","hostname":"d2b22622f390","pid":14,"level":30,"msg":"CoinbasePassphrase = apipass","time":"2017-12-23T02:15:26.906Z","v":0} {"name":"tribeca:config","hostname":"d2b22622f390","pid":14,"level":30,"msg":"CoinbaseRestUrl = https://api-public.sandbox.gdax.com","time":"2017-12-23T02:15:26.906Z","v":0} starting coinbase public client, apiURI = https://api-public.sandbox.gdax.com {"name":"tribeca:main","hostname":"d2b22622f390","pid":14,"level":50,"err":{"message":"socket hang up","name":"Error","stack":"Error: socket hang up\n at createHangUpError (_http_client.js:302:15)\n at TLSSocket.socketCloseListener (_http_client.js:334:23)\n at emitOne (events.js:101:20)\n at TLSSocket.emit (events.js:191:7)\n at _handle.close (net.js:510:12)\n at TCP.done [as _onclose] (_tls_wrap.js:332:7)","code":"ECONNRESET"},"msg":"Unhandled promise rejection! Promise {\n <rejected> { Error: socket hang up\n at createHangUpError (_http_client.js:302:15)\n at TLSSocket.socketCloseListener (_http_client.js:334:23)\n at emitOne (events.js:101:20)\n at TLSSocket.emit (events.js:191:7)\n at _handle.close (net.js:510:12)\n at TCP.done [as _onclose] (_tls_wrap.js:332:7) code: 'ECONNRESET' } }","time":"2017-12-23T02:15:56.936Z","v":0} {"name":"tribeca:main","hostname":"d2b22622f390","pid":14,"level":40,"msg":"Did not complete clean-up tasks successfully, still shutting down.","time":"2017-12-23T02:15:58.940Z","v":0} {"name":"tribeca:main","hostname":"d2b22622f390","pid":14,"level":30,"msg":"Exiting with code 1","time":"2017-12-23T02:15:58.940Z","v":0} error: Forever detected script exited with code: 1

It will continue attempting over and over, each time failing with the same message. I have tried changing it from dev mode to prod mode. I have double-checked the api key and secret. The secret also had a '==' at the end which I tried removing in case it wasnt actually part of the secret. Nothing has worked so far.

Any suggestions on what to try next?

bbarney213 commented 6 years ago

The issue appears to be with the API for GDAX. I have entered the production API keys, but I need the API keys for the sandbox environment as well. Currently, the GDAX sandbox is down, so I can't try adding these keys in order to connect.

rettori commented 6 years ago

GDAX does not have e a sandbox anymore.

ngeslani63 commented 6 years ago

Was having the same issue (cannot connect to sandbox). Can connect fine to https://api.gdax.com. If I set tribeca_mode=dev, will I be trading live? what does the dev vs prod setting do? Thanks

IntrinsicInnovation commented 6 years ago

Yes, I was wondering the dev vs prod? Is that the same as sandbox (dev I mean.)? I guess I would need to have an account to get the market data displaying, and something happening even in Dev mode?