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

Error: unexpected server response (520) #131

Closed jangrewe closed 7 years ago

jangrewe commented 7 years ago

I can't get Tribeca to start properly anymore, using the current commit.

17:23:47.109 main Requiring authentication to web client
17:23:47.130 main Listening to admins on *: 7134
17:23:47.952 main Exchange details { exchange: 'Coinbase',
  pair: 'BTC/EUR',
  minTick: 0.01,
  minSize: 0.01,
  makeFee: 0,
  takeFee: 0,
  hasSelfTradePrevention: true }
17:23:47.973 coinbase FIX Initiator Start
17:23:48.447 coinbase FIX Logon Connected
17:23:49.104 stdev Unable to compute value
17:23:49.105 main Event loop delay 100ms
17:23:50.105 stdev Unable to compute value
17:23:51.106 stdev Unable to compute value
17:23:52.106 stdev Unable to compute value
17:23:53.106 stdev Unable to compute value
17:23:54.108 stdev Unable to compute value
17:23:55.109 stdev Unable to compute value
17:23:56.109 stdev Unable to compute value
17:23:57.110 stdev Unable to compute value
17:23:58.110 stdev Unable to compute value
17:23:58.850 main Unhandled exception! Error: unexpected server response (520)
    at ClientRequest.response (/opt/tribeca/node_modules/ws/lib/WebSocket.js:719:15)
    at Object.onceWrapper (events.js:293:19)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:191:7)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:522:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
    at TLSSocket.socketOnData (_http_client.js:411:20)
    at emitOne (events.js:96:13)
    at TLSSocket.emit (events.js:191:7)
    at readableAddChunk (_stream_readable.js:178:18)
    at TLSSocket.Readable.push (_stream_readable.js:136:10)
    at TLSWrap.onread (net.js:561:20)
17:23:58.852 main All exiting event handlers have fired, exiting application.
17:23:58.852 main Exiting with code 0
error: Forever detected script exited with code: 0
error: Script restart attempt #1
jangrewe commented 7 years ago

Oh, i just noticed that it's now HTTPS - is there any way to disable this? I'm using a reverse proxy with a proper certificate, so i don't need HTTPS on the backend-side of things.

ctubio commented 7 years ago

oh sorry, i moved the certs from etc folder to dist folder, that may had activate them for you if it wasn't before; to disable HTTPS again simply rm -rf dist/sslcert

sorry again'¡

jangrewe commented 7 years ago

Ah, right, thanks!

ctubio commented 7 years ago

btw i belive the first issue is different than the sslcert so letme reopen this :P

ctubio commented 7 years ago

ok so lets try to answer https://community.coinbase.com/t/node-js-websocket-error/11770 xD

anyway meanwhile i recommend to use forever to avoid downtimes instead of directly nodejs

ctubio commented 7 years ago

see https://status.coinbase.com/